class hierarchy


class hierarchy

(programming)A set of classes and their interrelationships.

One class may be a specialisation (a "subclass" or "derived class") of another which is one of its "superclasses" or"base classes".

When a method is invoked on an object it is first lookedfor in the object's class, then the superclass of that class,and so on up the hierarchy until it is found. Thus a classneed only define those methods which are specific to it, andinherits methods from all its superclasses.

See also: multiple inheritance.