creation 4/17/99; revised: 09/12/99, 01/21/00, 07/14/02, 01/18/06

CHAPTER 31—Designing a Class
(Miles per Gallon)

This chapter contains another example of designing a class, and then using objects of that type. The class is named Car, and is a simple miles-per-gallon calculator.

Chapter Topics:

QUESTION 1:

What three values are you likely to use in calculating miles per gallon for a car?