Question: Write a program with a base class B and an inherited D1 class and D2 class, all of them have a function void display ()
Write a program with a base class B and an inherited D1 class and D2 class, all of them have a function void display () that prints a message ( content of the name class) the base class use PURE VIRTUAL function. In the main define base class use pointer b points to objects d1 and d2 of subclasses .call the display() using pointer of subclasses.
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
