
Chapter 15: Prelab Assignment
Inheritance, Polymorphism, and Object-Oriented Design | 387
Name __________________________________________ Date _______________________
Section _________________________________________
Read the following header files and driver carefully. The implementation files are not shown.
// File Money.h is the specification file for class Money.
// class Money
{
public:
// Constructors
Money();
Money(long dollars, long cents);
// Initializes dollars and cents
// Knowledge responsibilities
long GetDollars() const;
// Returns dollars
long GetCents() const;
// Returns cents
// Action responsibilities
Money Add(Money otherMoney) const;
// Returns ...