When we learned about inheritance, we realized that abstract types can be used to describe real-world concepts. We can say quite confidently that we already know how to classify concepts with parent–child relationships. With this knowledge, we can build a type hierarchy around those concepts. For example, the personal asset type hierarchy from Chapter 2, Modules, Packages, and Data Type Concepts, looks like the following:
All data types shown in the preceding diagram are abstract types. Going from the bottom up, we know that both House and Apartment are subtypes of Property, and we know that both Property and Investment are a subtype of Asset. These are all reasonable interpretations based on how we speak about these concepts in our daily life.
We also talked about concrete types that are the physical realization of...