
Postlab Activities
Classes and Abstraction | 301
Exercise 1: Convert the ADT MuseumPainting into class MuseumPainting. Put the class
specification in a .h file and the implementation in a .cpp file. Write a driver that creates
MuseumPainting objects and prints them out.
Exercise 2: Write and implement a test plan for class MuseumPainting.
Exercise 3: Write a test plan for class Fraction.
Exercise 4: Write a command-driven driver to implement the test plan written for Exercise 3. A
command-driven program is one in which the user enters the operation to be tested, followed by
the values to use in the test. For example, to test whether the Add member function ...