1. Home
  2. Smartpedia
  3. UML Inheritance

What is UML Inheritance?

Smartpedia: Inheritance is a central concept of object orientation or UML, in which attributes and/or methods of one class are inherited by another class.

UML Inheritance – a Central Concept of Object Orientation

Inheritance is a central concept of the Unified Modeling Language (UML) and is used in the design of classes and the modeling of class diagrams. A class consists of a collection of attributes and methods that determine the state and behavior of its instances. Using inheritance, attributes and/or methods of one class are passed on to another class. The inheriting class is called the base class – alternatively also as super class or parent class – and the inheriting class as derived class – or as child class or sub class.

The relationship between the base class and the derived class is permanent. A derived class can extend the list of attributes and methods and redefine methods if the modifiers of the base class allow it. This means that a new class can be an extension or a restriction of the original class. If a derived class inherits from more than one base class, it is called a multiple inheritance.

The Generalisation Hierarchy

A base class can also be seen as a generalisation of its derived classes, since its attributes and methods define the commonalities of all derived classes. In this context, the term generalisation hierarchy is also used. A similar term in this context is the inheritance hierarchy, which is often used in the context of the collection of requirements and in system structuring. However, deep inheritance hierarchies must be avoided, as they strongly link corresponding classes and the code they contain.

In UML, an inheritance relationship is represented by an arrow with a triangular tip pointing from the derived class to the base class. Inherited attributes and methods are not repeated in the representation of the derived class.

UML Inheritance
Notes:

Here you can find a comprehensive description of inheritance, including examples and special features.

If you like the article or would like to discuss it, please feel free to share it in your network. And if you have any comments, please do not hesitate to send us a message.

What does t2informatik do?

Was does t2informatik do? One click and you'll know it.

Here you will find additional information from our Smartpedia section:

Smartpedia: What is a Composition?

What is a Composition?

Smartpedia: What is an Aggregation?

What is an Aggregation?