OOAD Princhiples Q/A #5



Question:What is the difference between Polymorphism and Overloading?

Answer:

Sr. No. Polymorphism Overloading
1 Polymorphism is an important concept of OOPS. Overloading is the mechanism to implement polymorphism.
2 Polymorphism means ability of one object to take many different forms. Overloading is the mechanism to use same thing for different purposes.
3 C++ supports two types of polymorphism:
  • Runtime polymorphism

  • Compile time polymorphism

C++ supports two types of overlading
  • Operator overloading

  • Function overloading

Advertisements