2 Replies
You have the animal class that all other classes are derived from
And to show polymorphism in use, there's a little program that creates three animals of different types to have them all print their sound
The array doesn't only hold birds, cows or humans. It holds animals which they all are
You can think of it like all subclasses of Animal are "morphs" of Animal
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.