Question: Write a program that has an abstract base class. This class should have four member data variables and a pure virtual function. It should also
Write a program that has an abstract base class. This class should have four member data variables and a pure virtual function. It should also have a method for setting the data variables. Derive a class from Base class and override a method in the base class. Write a main function that creates an object of derived class and sets the variables. Also write a top-level function that will take a parameter of type base class and return the value of the appropriate (override) function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
