Defining the derived class
The declaration of a singly derived class is as that similar of an ordinary class. Derived class consists of the following elements.
1. The Keyword class
2. The name of the derived class
3. A single colon
4. The type of derivation (private, public or protected)
5. The name of the base or parent class
6. The remainder of the class definition
The common syntax of the derived class declaration is as given below.
Class derived_class_name : private/public/protected base-class-name
{
private:
// Date members
//Methods
public:
//Data members
//Methods
protected:
//Data Members1
//Methods
}