
Lesson 12-3: Class Data Type
Classes and Abstraction | 293
Name __________________________________________ Date _______________________
Section _________________________________________
Exercise 1: Add a member function, Normalize, to class Money, which normalizes the cents to
between 0 and 99 and adjusts the dollar amount accordingly. Apply function Normalize to
money3 before printing it. Run the revised program Money. What is printed?
Exercises 2: Write the specification for a class Distance, made up of the data fields feet, yards,
and miles. You should provide a constructor and the usual getters in addition to the following
two operations:
• ConvertFeet ...