Creating References Using Inheritance Hierarchies

Caleb Thomas
5 min read
Listen to this study note
Study Guide Overview
This study guide covers inheritance hierarchies, focusing on the relationships between superclasses and subclasses. It explains type diagrams (or hierarchy trees) as visual representations of these relationships. The guide also introduces polymorphism, demonstrating how subclass objects can have multiple types and its implications for method parameters, arrays, and ArrayLists.
#Inheritance Hierarchies
Now that we are done with making our subclass, let's look at inheritance from a user standpoint.
Inheritance can be thought as an upside down tree with the "root" on the top and the "branches" on the bottom. The root is the superclass while the branches are the subclasses of this superclass. A visual representation of this tree is called a type diagram or hierarchy tree.
Here is the hierarchy tree that we will look at for the next two topics:

How are we doing?
Give us your feedback and let us know how we can improve