Question: Continue working with three classes Animal, Cat, Dog in the Lab 2 Activity. This time you will practice implementing polymorphism using virtual functions by: Write
Continue working with three classes Animal, Cat, Dog in the Lab Activity. This time you will practice implementing polymorphism using virtual functions by:
Write a function to handle the polymorphism in representing name, number of legs, speak, and move of three above classes' instances
Then in the main function please call the function written in to demonstrate that name, number of legs, speak, and move were output correctly for each class instance sample output as a below picture. Note: output is the same as in lab however, this time you must implement polymorphism using virtual functions to have this output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
