Consider the following class hierarchy - class A
derives from B
, which derives from C
, which derives from D
.
What is D
called? I don't want to call D
a base class, because so are B
and C
. Is there a term in OO parlance that uniquely denotes that class which is the start of a hierarchy?
The term upper class refers to a group of individuals who occupy the highest place and status in society. These people are considered the wealthiest, lying above the working and middle class in the social hierarchy.
A class hierarchy or inheritance tree in computer science is a classification of object types, denoting objects as the instantiations of classes (class is like a blueprint, the object is what is built from that blueprint) inter-relating the various classes by relationships such as "inherits", "extends", "is an ...
The class at the top of the exception class hierarchy is the Throwable class, which is a direct subclass of the Object class. Throwable has two direct subclasses - Exception and Error.
Other names for the sub-class of a parent are derived class and child class. The hierarchy (sub-class/superclass relationships) of classes can go many levels. A class can have exactly one parent class, but it might have many child classes.
I usually just describe it as the "root of the class hierarchy".
You could also say that it is a "root class", which at least one book defines, albeit a book about C#, and possibly in a slightly different context, but, you know...
Pretty much anything involving the word "root" would be clear and understood.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With