Home / Object Oriented Programming / Advantages of Function overloading, Constructors, Destructors, constructor, Overriding

Advantages of Function overloading, Constructors, Destructors, constructor, Overriding

Mention the advantages of Function overloading

  1. Overload method give programmes the flexibility.
  2. It speed up the execution of program.

Mention the advantages of Constructors

  1. It initialize an object.
  2. We can use a constructor to perform class related logic at the time of instantiation.

Mention the advantages of Destructors

  1. Destructors is called when lifetime of a program end.
  2. It is useful to make a final set of instructions.

Advantages of Copy constructor

  1. It is used to create a new object by duplicating the state of an existing object.
  2. It is used to pass an object as arguments to a function.

Advantages of Operator Overriding

  1. Its use for run-time polymorphism.
  2. It helps in writing generic code based on parent class.