Class Hierarchies

We can describe these levels of abstraction in a type of picture known as a class hierarchy. A class hierarchy picture is similar to the genus-species categorization familiar from biology. The idea is that more abstract categories are presented at the top of the hierarchy, and more specific categories below.

In this picture both living things and non-living things are forms of material object. Information that I have concerning material objects, such as the fact they have mass and occupy some volume of space, is applicable to both things living and things not living. Information I have about living things is applicable to both plants and animals. Information I know about human being is applicable to both my dentist Ken and my friend Elizabeth, as well as the Florist Fred.

We will often use the term parent class and child class to refer to a particular relationship in the class hierarchy. Mammal is a child class of Animal, for example, and Material Object is a parent class of Living Thing. The phrase superclass and subclass is also sometimes used to represent the same idea. Extending the parent/child metaphor, we will often say, for example, that Living Thing is an ancestor class to Human Being.

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