The next stop on our journey to Objectropolis takes us from Abstraction to a place called Inheritance.
Let’s return to Table 4-3 (from the previous chapter) to describe the relationship between the abstraction levels for Enclosed shape, Enclosed shape with at least one angle, and Rectangle, shown again here in Table 5-1.
Table 5-1. Summary of the Members of the Three Classes
Classes | Enclosed shape | Enclosed shape with at least one angle | Rectangle |
Attributes | area perimeter | area perimeter smallest angle | area perimeter smallest angle hypotenuse |
Behaviors | getArea getPerimeter | getArea getPerimeter ... |