Question: Is it better to use constructors with parameters to initialize the members of a class or do that indirectly using setter functions? I did not get a clear answer on this question so far. Any insights would be appreciated.

Answer: 
It is almost certainly a matter of design choice or sometimes style. I would consider a number of things:

1. Would constructing an object without setting the member variables leave the class in an invalid state? If so, you'll need your constructor to take valid values for those members. Otherwise, you should be able to provide useful defaults.
2. Would setting individual members of variables violate a class invariant? If so, they should not have their own setters.
3. Is the user of this class likely to want to modify individual members? If so, then setters may be appropriate.
4. Does it make conceptual sense to be able to change individual members of an object? I would argue that it makes no sense to be able to change a `Person`'s date of birth. However, you could argue that changing a `Person`'s name does make sense. It depends. Do you consider a `Person` whose name has changed to be a different `Person` in your system?
5. Can you group setters together to be more useful? Instead of `Rectangle::setX(int)` and `Rectangle::setY(int)`, does `Rectangle::setPosition(int,int)` make more sense? Perhaps even `Rectangle::setPosition(Point)` is better.

In any case, a class whose full set of members are exposed through individual setters and getters is usually a code smell.
The one thing you want to avoid is having an object that isn't complete. If you can supply sensible defaults for every parameter then it's OK to skip setting them in the constructor, otherwise you really should put them there.

Naturally there's no reason you can't do both.