Superclass (computer science)
Appearance
![]() | It has been suggested that this article be merged into Class (computer science). (Discuss) Proposed since December 2010. |
![]() | It has been suggested that this article be merged into Inheritance (object-oriented programming). (Discuss) Proposed since December 2010. |
In computer science, a superclass, base class, or parent class is a class from which other classes are derived. The classes that are derived from a superclass are known as child classes, derived classes, or subclasses.
A superclass allows for a generic interface to include 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. Subclasses that wish to implement special behavior can do so via virtual methods, without having to duplicate (reimplement) the superclass's behavior.
Languages may support both abstract and concrete superclasses.
See also