2. Introduction of inheritance.
Definition derived classes.
Types of inheritance.
Advantages of inheritance.
dis advantages of inheritance.
Conclusion of inheritance.
3. In commonly inheritance is an a called a one
class inherited to another class is an basic
think.
Which mean one basic class one derived class
it will worked a A is an basic class B is an a
derived class so b is inherited form a class A.
“the mechanism of deriving a new class from an
old one is called inheritance”.
“the old class is refer to as the base class and
the new one called the derived class or sub
class”.
4. The colon indicate that the derived class
name is derived from the base class
name.thhe visibility mode is optional and .if
present be either private or public.
Default visibility-mode is private.
Class derived class _name :visiblity-mode
base_class_name
{
……………..//
……………..//
};
5. In c++ inheritance classified a five types:
Single inheritance.
Multiple inheritance.
Multilevel inheritance.
Hybrid inheritance.
Hierarchical inheritance.
Other types:
Visual base class.
Multibath inheritance.
6. A derived class with only one base class is
called single `
A
B derived
class
Basic
class
7. A derived class with several base class is
called as multiple inheritance.
A B
C
Multiple
inheritance
8. The mechanism of deriving a class from
another ‘derived class’ is known as multilevel
inheritance.
A
B
C
MULTILEVEL
LEVEL I
NHERITANC
11. The most use of inheritance is deriving
classes which provides reusablellity the
existing classes .
By reusability the development time of
software is reduced.
The derived classes extend the properties of
base classes to generate more domain
object
12. The increase time /effort it take the program
to jump thought the level of over loaded
dashes.
If given has ten level of abstraction
Two classes base and inheritance class get
highly coupled
This means one cannot be useindefined of
each other .
13. In general its good idea to prefer less
inheritance .use inheritance only in the
specific situation in which its needed .large
inheritance and deep ones in particular and
confusing to understand and there for
difficult to maintain .in
heritance is design time decision and
Its let of runtime of lexiability