
Lesson 12-5: Header and Implementation Files
Classes and Abstraction | 295
Name __________________________________________ Date _______________________
Section _________________________________________
Exercise 1: Take program Money and reorganize it into three files: money.h, money.cpp, and
UseMoney.cpp. UseMoney.cpp is the client program that uses class Money. Run program
UseMoney. The results should be the same as when they were combined into one program.
Exercises 2 through 4 use files fraction.h and fraction.cpp.
// Header file fraction.h declares class Fraction.
class Fraction
// Class Fraction represents the numerator and
// denominator of a fraction. ...