Mentor SAP
As with regular inheritance, the implementing class only needs to list the compound interface in order to integrate all components. Nevertheless, the components of the component interfaces keep their original names:

 

component_interface_name~component_name

 

They are, therefore, not prefixed by the name of the compound interface.

All implementations of methods from all higher level interfaces must take place in the first implementing class. Alias names are suitable for short-form syntax when accessing components from different interfaces. If the implementing class contains aliases, it provides a central view of all components.

 

 

Addressing Components in Compound Interfaces – Syntax

 

 

Correct Use of Interfaces

 

Interfaces enable different classes to be handled uniformly, provided those classes have implemented the interfaces. As with inheritance, you can also perform polymorphism using interface reference variables.

 

As is the case with regular inheritance, the definition of an interface means the abstraction of the implementing classes to a specific aspect.

 

Multiple inheritances can be simulated using interfaces. If several interfaces are included, all components are available to each of the interfaces and you must implement all methods.