...

/

Exercise 3: Displaying Message Using Virtual Functions

Exercise 3: Displaying Message Using Virtual Functions

Let's display information about two base classes by using virtual functions.

Problem Statement

We will first build three classes: Mammal (parent class), Dog (derived class) and Cat (derived class). The Dog and Cat class will inherit from Mammal.

In the exercise, you have to implement these classes with the following characteristics: ...