Jump to content

Superclass (computer science)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by FredThwaites (talk | contribs) at 21:23, 13 August 2007 (suggest merge). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, a superclass is a class from which other classes are derived. A superclass is also called a parent class or base class. The classes that are derived from a superclass are known as child classes, derived classes, or subclasses. We can also say that a class A extends class B when A is a subclass of B.

A superclass allows for a generic interface to specialized functionality through the use of virtual functions.

The superclass mechanism is extensively used in object oriented programming due to the reusability that can be achieved: common features are encapsulated in modular objects.

Languages may support both abstract and concrete superclasses.

See also

In UML, class extension (subclassing) is represented as follows: Media:superclass.png