callmeFilip / Thinking-in-CPP-Volume-1-2nd-Edition

Homework and Classwork repository
0 stars 0 forks source link

Chapter_15 Task_06 #300

Open callmeFilip opened 3 years ago

callmeFilip commented 3 years ago

Create an inheritance hierarchy of Rodent: Mouse, Gerbil, Hamster, etc. In the base class, provide methods that are common to all Rodents, and redefine these in the derived classes to perform different behaviors depending on the specific type of Rodent. Create an array of pointers to Rodent, fill it with different specific types of Rodents, and call your base-class methods to see what happens.