CS Departments W. Kandinsky, Kleine Welten XII from the set Kleine Welten, 1922

C++ Notes

Each derived class inherits the data members and member functions of its base class. A derived class object actually consists of multiple parts. Each base class represents a subobject made up of the nonstatic data members of the base class. The derived class object is made up of its base class subobjects and a derived part consisting of nonstatic data members of the derived class. Within the derived class, the inherited members of the base class subobject can be accessed directly as if they are members of the derived class. The depth of the inheritance chain does not limit access to these members nor does it add to the cost of that access. Protected inheritance all the public members of the base class become protected members of the derived class. Public inheritance public derivation is referred to as type inheritance. Private inheritance Private derivation is referred to as implementation inheritance.