What is the opposite of the base class in OOP?

In object-oriented programming, a “base class” is the class from which other classes were derived (http://en.wikipedia.org/wiki/Base_class).

However, what is the opposite of a base class? In word order, what is a class that does NOT have child classes?

EDIT: I am looking for the name of a class that has not been subclassed, YET, in the tree inheritance of several parent classes, starting with the base class.

+8
oop
source share
5 answers

The base class is a relative member. This only applies when considering one of its derived classes. Here are some terms that I consider opposites (and mostly orthogonal to each other):

  • base class and derived class; similarly superclass vs subclass
  • abstract class vs concrete class
  • root class and leaf class
  • Sealed (also, final) class versus inherited (non-printable) class
  • nested class and top level class

Abstract and (usually) root classes are for base classes. Sealed classes cannot be base classes because they are not inherited. The root class is a class without a base class (in C # and Java this class is Object ). The sheet class does not have a subclass; therefore, it is not a base class; but it is not necessarily sealed. Sealed classes, on the other hand, are always leaf classes.

So,

I am looking for the name of a class that has not been subclassed, YET

It seems that you are looking for a leaf class , but I do not consider it the opposite of the base class .

+13
source share

Usually I hear a sheet class. Java applies it with final .

+4
source share

It will be called a leaf class.

http://en.wikipedia.org/wiki/Leaf_class

+3
source share

In C #, they are called private classes. You can use the sealed to indicate that the class is not inherited. VB uses the NotInheritable keyword. Wikipedia calls them non-subclassable .

+1
source share

I should not inherit a sealed class from anything. For me, the opposite of a base class will be a derived class, but being a derived class does not preclude its inheritance.

But it seems that Carl T.'s answer is probably what you were looking for.

+1
source share

All Articles