1/6
Looks like no tags are added yet.
2 Types of polymorphism
Dynamic
Static
Static Polymorphism
When a same method or operator operators differently depending on the type of data or parameters provided. It happens in compile time. Method Overloading
Dynamic Polymorphism
When a method call produces a different behaviour depending on the object that calls it, usually through methods overriding the inheritance. It is run time polymorphism. Method Overriding
Advantages of polymorphism
Flexibility
Maintainability
Reusability
Extensibility
Polymorphism
It allows object from different classes to use the same method name but exhibits different behaviour.
Abstarction
It hides the complex internal implementations of the system and displays only the essential information and functionality to the user
Advantages of Abstraction
Reduce complexity
Enhancing Reusability
Improving Maintenance
Facilitating Collaboration