Derived classes

Defining a Derived class:
A derived class can be defined by specifying its relationship with the base class in addition to its own details.

Syntax:
The general form for defining the derived class is the

class derived-class name : visibility mode Base-class name
{
……………………    //
……………………   //     Members of derived class
……………………  //
}

The colon indicates that the derived class name is derived from the base class.The visiblity mode is optional and present ,may be either private or public.The default visibility mode is private.The members of the class is accessed by its own objects using dot operator.

 

 

Inheritance types by s.kamatchi priyanka