Q2: 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...


Q2: Write a program that has an abstract base class. This class should have four member data variables and<br>a pure virtual function. It should also have a method for setting the data variables. Derive a class from Base<br>class and override a method in the base class. Write a main function that creates an object of derived class<br>and sets the variables. Also write a top-level function that will take a parameter of type base class and return<br>the value of the appropriate (override) function.<br>LANGUAGE: C++<br>

Extracted text: Q2: 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. LANGUAGE: C++

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here