INHERITANCE


                     PREVIOUS                                                                                                          NEXT
  • Single Inheritance: It is the inheritance hierarchy wherein one derived class inherits from one base class.
  • Multiple Inheritance:It is the inheritance hierarchy wherein one derived class inherits from multiple base class(es)
  • Multilevel Inheritance: It is the inheritance hierarchy wherein subclass acts as a base class for other classes.
  • Hybrid Inheritance:The inheritance hierarchy that reflects any legal combination of other four types of inheritance.
  • Hierarchical Inheritance: It is the inheritance hierarchy wherein multiple subclasses inherits from one base class.
inh

figure:- Inheritance
  • Visibility Mode:It is the keyword that controls the visibility and availability of inherited base class members in the derived class.It can be either private or protected or public.
  • Private Inheritance:It is the inheritance facilitated by private visibility mode.In private inheritance ,the protected and public members of base class become private members of the derived class.
  • Public Inheritance:It is the inheritance facilitated by public visibility mode.In public inheritance ,the protected members of base class become protected members of the derived class and public members of the base class become public members of derived class.
  • Protected Inheritance:It is the inheritance facilitated by protected visibility mode.In protected inheritance ,the protected and public members of base class become protected members of the derived class.








Powered by Blog - Widget
Face Upward - Widget