Based on many tutorials that I have read, the following is the definition of Polymorphism:
Polymorphism is the ability of an object to take on many forms
Now let's assume that we have an
Animal parent class, and a
Dog and a
Cat child classes.
Is the above Polymorphism definition means that an
Animal variable can have many forms in the sense that an
Animal variable can be an
Animal or it can be a
Dog or it can be a
Cat, or does it mean something else?