Constructor

A constructor is a functional member of a class that is called when the class is instantiated. Constructors can take parameters.

Cascading Constructors
Constructors can call other constructors, using the :this syntax immediately following the constructor:

The Wrong Way
In this example, each constructor has to know how to do all the initializing necessary, resulting in duplicated code.

The Right Way
In this example, code is not duplicated due to some constructors relying on others.