0
Inheritance & polymorphism
Did Inheritance & polymorphism can be combined in the same class, Such that a class Inherited from another class also posses polymorphism
2 Antworten
+ 2
yes of course,this is the base feature od object oriented principlas.
+ 1
A class needs to use inheritance in order to be polymorphic. Polymorphism is just that: treating a group of different classes that inherit from the same parent as if they were the parent class. For example, treating a fish, a monkey and a bird as just animals.