Program
Consider the following class definition
Class father
{
Protected:
int age;
public:
father (int x) {age=x;}
virtual void iam ()
{
Cout<<"I AM THE FATHER, my age is:"};
Derive the two classes son and daughter from the above class and for each, define iam() to write our similar but appropriate messages. you should also define suitable constructors for these classes.
Now write a main() that creates objects of the three and then calls iam() for them. Declare pointer and in each case call iam() through the pointer to demonstrate polymorphism in action.