The Need for Inheritance

The Greek philosopher Aristotle was the first well-known taxonomist in that he began to categorize the objects that surrounded him. When taxonomists categorize part of the world, they create hierarchies of categories that move from the general to the specific.

Note

When working with inheritance, it is useful to view the world through the glasses of a taxonomist.

For example, by using this approach, we can divide transportation vehicles into three broad categories: surface, airborne, and water vehicles, as shown in Figure 16.1; and when moving down the hierarchy, the categories become more specialized.

Figure 16.1. Specialization/generalization ...

Get C# Primer Plus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.