Consider the following two statements:(a)A publicly derived class is a sub type of its base class.(b)Inheritance provides for code reuse.Choose the best optionClear ResponseBoth the statements (a) and (b) are correct.Neither of the statements (a) and (b) are correctStatement (a) is correct and (b) is incorrectStatement (a) is incorrect and (b) is correct.
Question
Consider the following two statements:(a)A publicly derived class is a sub type of its base class.(b)Inheritance provides for code reuse.Choose the best optionClear ResponseBoth the statements (a) and (b) are correct.Neither of the statements (a) and (b) are correctStatement (a) is correct and (b) is incorrectStatement (a) is incorrect and (b) is correct.
Solution
Both the statements (a) and (b) are correct.
Similar Questions
Which of the following statements is wrong about inheritance?Choose the best optionClear ResponseProtected members of a class can be inheritedThe inheriting class is called a subclassPrivate members of a class can be inherited and accessedInheritance is one of the features of OOP
Which of the following best describes inheritance?Choose the best optionClear ResponseAbility of a class to derive members of another class as a part of its own definitionMeans of bundling instance variables and methods in order to restrict access to certain class membersFocuses on variables and passing of variables to functionsAllows for implementation of elegant software that is well designed and easily modifiedSave & Ne
Inheritance promotes code re-use. True or False?Group of answer choicesTrueFalse
rrect answerWhich of the following is used for implementing inheritance through class?Optionsinheritedextendsusingimplements
Which of the following is not a type of inheritance?Choose the best optionClear ResponseDouble-levelMulti-levelSingle-levelNone of these
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.