Hey guys i am back with another C + + article and we will be soon completing this series .And this article is all about the inheritance and it's theory so in this part we will only discuss about inheritance and it's type and there will be no coding in this article .
AND YOU CAN SEE THE OTHER ARTICLE OF THIS SERIES ON THE LINK BELOW:
ALL THE ARTICLE OF THE SERIES
So let's get straight to the topic.....................
GO
INHERITANCE
IT JUST SIMPLY TO MAKE NEW CLASSES FROM THE EXISTING CLASSES AND YOU CAN SAY IT IS THE MECHANISM TO PRODUCE THE NEW CLASSES FROM THE EXISTING CLASSES .
AND IT USUALLY WORK WITH THE OBJECT ORIENTED LANGUAGES.
THE INHERITANCE WAS FIRST INVENTED IN THE 1969.
types of the inheritance : -
1. SINGLE INHERITANCE
WHEN ONLY ONE CLASS( WHICH IS CREATED ) IS INHERIT ONLY THE ONE CLASS ( FROM WHICH THE NEW CLASS IS MADE ) ONLY .
2. MULTIPLE INHERITANCE
WHEN ONE CLASS IS INHERIT FEATURES OF ALL CLASSES( THESE ARE THE CLASSES FROM WHICH THE SINGLE CLASS IS MADE ).
3. MULTILEVEL INHERITANCE
WHEN ONE SUB CLASS IS MADE FROM ANOTHER SUB CLASS .
4. HIERARCHICAL INHERITANCE
WHEN MANY SUB CLASSES IS MADE FROM ANOTHER SUB CLASS .
5. HYBRID INHERITANCE
WHEN TWO OR MORE THEN TWO TYPES OF INHERITANCE IS USED AT A TIME TO CREATE A CLASS .
TO BE CONTINUED......................................................................................................................
THANKS FOR YOUR TIME!!!!
......................................................................................................
0 comments:
Post a Comment