August 2002
Beginner
1122 pages
22h 1m
English
| 1. | Rewrite the DrugStockItem class that you wrote in Chapter 9 as a derived class of DatedStockItem, using virtual functions to allow DrugStockItem objects to be used in place of StockItem objects or DatedStockItem objects, just as you can use DatedStockItem objects in place of StockItem objects. |
| 2. | Rewrite the Employee class that you wrote in Chapter 9 as three classes: a base Employee class, an Exempt class and an Hourly class. The latter two classes will be derived from the base class. The virtual CalculatePay member function for each of these derived classes should use the appropriate method of calculating the pay for each class so that an Exempt object or an Hourly object can be substituted for an Employee class object. ... |
Read now
Unlock full access