Derived Class and Base class
While defining a derived class, the derived class should identify the class from which it is derived. The following points should be observed for defining the derived class.
i. The keyword class has to be used
ii. The name of the derived class is to be given after thekeyword class
iii. A single colon
iv. The type of derivation (the visibility mode ), namely private, public or protected. If no visibility mode is specified ,then by default the visibility mode is considered as private.
v. The names of all base classes(parent classes) separated by comma.
class derived_class_name :visibility_mode base_class_name
// members of derivedclass
The following are some of the examples for different forms of inheritance