What is meant by proper inheritance?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would like to add to what Justin and Baxter said.
The term proper inheritance is not really well-defined. Properly using inheritance is quite a subjective issue…
Consider the following example:
BirdOstrichShould
Ostrichinherits fromBird? From a zoological point of view it makes sense, but from a Computer Science point of view… not so much. IfBirdhas aflymethod, then how am I supposed to handle this inOstrich::fly😡 ?There is somewhat of a war in the CS community. Indeed you’ll regularly see books where
Circleinherits fromEllipse(or the other way around) when it doesn’t really makes sense from a CS point of view.So my own little definition: