August 2002
Beginner
1122 pages
22h 1m
English
| 1. | Suppose that the store using our inventory control program adds a new pharmacy department. Most of their items are nonprescription medications that can be handled with the DatedStockItem class we already created, but their prescription drug items need to be handled more carefully. This means that the member function DeductSaleFromInventory has to ask for a password before allowing the sale to take place. Create a new DrugStockItem class that enforces this new rule without using inheritance. |
| 2. | The store also needs some way to keep track of its employees' hours so it can calculate their pay. We'll assume that the employees are paid their gross wages, ignoring taxes. These wages are calculated as follows:
|
Read now
Unlock full access