Describe and give an example of Ad-hoc, Parametric and Subtype polymorphism
MediumUpdated: Jan 22, 2025
Problem
Describe and give an example of each of the following types of polymorphism:
- Ad-hoc polymorphism
- Parametric polymorphism
- Subtype polymorphism
Solution
The explanation and examples of these different types of polymorphism is covered here:
- [Ad-hoc Polymorphism](/cs/ood/core-pillars/polymorphism/ad-hoc-polymorphism)
- [Parametric Polymorphism](/cs/ood/core-pillars/polymorphism/parametric-polymorphism)
- [Subtype Polymorphism](/cs/ood/core-pillars/polymorphism/subtype-polymorphism)