In C++, there are 2 types of Polymorphism:
- Object Polymorphism
- Function Polymorphism
Function polymorphism is exactly the same thing as method or function overloading i.e. We use the same method names with different parameters and return types. Now the question is why do we have this fancy name Polymorphism in OOP?
What distinctly distinguishes polymorphism from method overloading? Can someone explain with a scenario. Thanks
Polymorphism means “multiple forms”.
In computer science there are mainly three different kinds of polymorphism:
Polymorphism is a concept. AdHoc polymorphism means same name different implementation.