Exercise 2: Displaying Message Using Virtual Functions
This exercise requires you to implement the concept of virtual functions to display information about two base classes.
We'll cover the following...
We'll cover the following...
Problem Statement
You will first build three classes:
Mammal(parent class)Dog(derived class)Cat(derived class)
Dog and Cat class will inherit from Mammal.
In the exercise you have to implement the following:
-
Mammalclass:- Has one
protectedproperty
- Has one