In object-oriented programming ( OOP), a superclass defines a class whose attributes and methods are transferred to derived classes, the subclasses, through inheritance. Depending on the number of inheritance levels, that is, the number of classes between a subclass and a superclass, we also speak of the direct or indirect superclasses of a class. There are also multiple superclasses and virtual superclasses.
A multiple super class is a special class that occurs more than once as the superclass of a derived class. A derived class has a multiple superclass if it is either directly or indirectly derived multiple times from the same class. In the second case, multiple superclasses of the derived class have a common superclass. Multiple superclasses create the problem of repeated inheritance.
A virtual super class is a multiple superclass whose characteristics are only passed on once to each derived class, that is, to the subclass. Virtual superclasses avoid the problem of repeated inheritance by suppressing the multiple inheritance of their characteristics by an indirect subclass.