The other class is called the base class or the superclass . The subclass has its own data members and member functions. The subclass inherits all the data members and member functions of the base class. A Car has an Engine . A Car is a Vehicle .
Class inheritance is transitive.
If class B is a subclass of class A and class C is a subclass of class B , then class C is a subclass of class A . Class C inherits data members and member functions from classes A and B .