Quantcast
Channel: polymorphism
Viewing all articles
Browse latest Browse all 7

polymorphism

$
0
0

Polymorphism describes a pattern in object oriented programming in which classes have different functionality while sharing a common interface.

If you, like in your example, have a base class with a virtual method and override it in one or more subclasses, you have a common interface with different implementations. The answer should be yes, it is polymorphism. And if you do not override the base class implementation, it is "just" inheritance.



Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>