Representing a Distance

We need now a way to represent the total distance to a new city, something that can be compared and ordered based on the distance values. There is not existing data type for this purpose, so we create a new one. We define the less than operator so that two distances can be placed in order.

[audio] [real] Text to accompany slide18, in Chapter 16 of An Introduction to Object-Oriented Programming