search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
46 views
asked Expert 11.4k points 14 22 28

1 Answer

0 votes
Inheritance allows us to extend the functionality of a base class. It is an "Is a" type of relationship rather than a "Uses" type of relationship (a dalmation IS A dog which IS A canine which IS A mammal - dalmations inherist from dog which inherits from canine which inherits from mammal). All child classes retain the properties and methods of their parent classes but may override them. When you want to inherit (use the functionality of) another class. Base Class
Employee. A Manager class could be derived from the Employee base class.
answered Expert 11.4k points 14 22 28

Related questions

0 votes
1 answer 16 views
16 views
asked john Guru 27.1k points 31 50 97
0 votes
1 answer 24 views
0 votes
1 answer 18 views
18 views
asked rock Expert 15k points 15 23 30
0 votes
1 answer 33 views
33 views
What type of inheritance that PHP supports?
asked anonymous
0 votes
0 answers 128 views
...