Inheritance full chapter

Inheritance (C++)

This lesson discusses about inheritance, the capability of one class to inherit
properties from another class as a child inherits some properties from his/her parents.
The most important advantage of inheritance is code reusability. Once a base class
is written and debugged, it can be used in various situations without having to redefine
it or rewrite it. Reusing existing code saves time, money and efforts of writing the
code again. Without redefining the old class, you can add new properties to desired
class and redefine an inherited class member function.



Objectives of  Inheritance

After going through this lesson, you would be able to
l explain the concept of inheritance
l describe the five forms of inheritance
l define three types of inheritance
l explain all three visibility modes
l describe the concept of abstract class & virtual class



 Need for Inheritance

Inheritance is one of the important concepts of object-oriented language. There are
several reasons why this concept was introduced in object oriented language. Some
major reasons are:
(i) The capability to express the inheritance relationship which ensures the
closeness with the real world model.
(ii) Idea of reusability, i.e., the new class can use some of the features of old
class.
(iii) Transitive nature of inheritance, i.e., it can be passed on further


Click here to download : inheritance full chapter




No comments

Powered by Blogger.