Trees versus Forests

There is another distinction we can make in the way different languages approach the concept of inheritance. In some languages, Java is a good example, there is one class that is the ultimate ancestor to all other classes. Thus, all classes can be placed into a single large inheritance hierarchy.

Other object-oriented programming languages, C++ is a good example, do not do this. Instead, classes in these languages are placed into an inheritance hierarchy if appropriate, and not otherwise. Thus, we have a forest of many small trees, but no single large hierarchy.

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