Can anyone please teach me Inheritance:Extending Classes. Exams... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 10

Can anyone please teach me Inheritance:Extending Classes. Exams...

16th Feb 2018, 3:33 AM
Prachi Chauhan
Prachi Chauhan - avatar
7 Answers
+ 11
C++
16th Feb 2018, 3:45 AM
Prachi Chauhan
Prachi Chauhan - avatar
+ 11
types of inheritance? how to recognise which inheritance is applied in a specific programme? Role of classes? (private,public,protected) Role of Accessibility modes( who can or can not access specific functions) "important one "? Role of constructor ? what is ancestor ? role of resolution operator? where is it used ? consept of nesting of object?
16th Feb 2018, 4:23 AM
Prachi Chauhan
Prachi Chauhan - avatar
16th Feb 2018, 5:31 AM
Manual
Manual - avatar
+ 2
Try checking the Sololearn course for it, they explain it pretty well - https://www.sololearn.com/learn/CPlusPlus/1907/
16th Feb 2018, 3:46 AM
Faisal
Faisal - avatar
+ 2
If you still don't understand, here's my understanding of it - When a class is inherited, it takes all of the previous variables, functions, etc. out of its parent class and allows it to add on more functions and stuff to it. For example, take fruits. Fruits all have seeds, and are, for the most part, bigger than most vegetables. These are all characteristics of fruits, which can be applied to a class. Then, there is an apple. Apples are red, round, and grow on trees, and it also has all of the characteristics of a fruit, which it can be inherited from. Hope this helped!
16th Feb 2018, 3:51 AM
Faisal
Faisal - avatar
+ 1
For which language are you wanting to learn it for?
16th Feb 2018, 3:39 AM
Faisal
Faisal - avatar
0
inheritance is getting all the variables and methods from superclass or u can say parent class except private variables and methods. you may call all of them from subclasses. hope it will make u understand well.
16th Feb 2018, 12:50 PM
Dharmendra Tiwari
Dharmendra Tiwari - avatar