The class inheritance is a relationship among these two classes. The super class might contain any amount of the sub classes. The sub classes inherit elements and functions of the super class. This means that all the elements and functions of the super class are also part of sub classes. The sub class might have some extra elements and functions of its own.