Inheritance in Object Oriented Programming

ASHadventurelover 2,233 views 5 slides Mar 16, 2019
Slide 1
Slide 1 of 5
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5

About This Presentation

Index
Introduction
Derived class
visibility modes
Types of inheritance
Virtual base class
Constructors in derived classes

Inheritance
The mechanism of deriving a new class from an old class is called inheritance.
The old class is referred as base class and new one is called as derived class.
A new...


Slide Content

INHERITANCE OBJECT ORIENTED PROGRAMMING

INDEX Introduction Derived class visibility modes Types of inheritance Virtual base class Constructors in derived classes

Inheritance The mechanism of deriving a new class from an old class is called inheritance. The old class is referred as base class and new one is called as derived class. A new class inherits some or all properties from the base class. Inheritance enables reusability.

Types of inheritance SINGLE INHERITANCE MULTILEVEL INHERITANCE MULTIPLE INHERITANCE HIERARCHICAL INHERITANCE

Single inheritance : a derived class with only one base class is called single inheritance. Multiple inheritance : a derived class with several base classes is multiple inheritance. Multilevel inheritance : the mechanism of deriving a class from another derived class is known as multilevel inheritance. Hiererchical inheritance : one class may be inherited by more than one class is known as hierarchical inheritance. Types of inheritance