Engineering-Mathematics
October 9, 2023Web-Technologies
October 9, 2023OOPS
Question 62 |
Consider the following two statements:
(a) A publicly derived class is a subtype of its base class.
(b) Inheritance provides for code reuse.
(a) A publicly derived class is a subtype of its base class.
(b) Inheritance provides for code reuse.
Both the statements (a) and (b) are correct. | |
Neither of the statements (a) and (b) are correct | |
Statement (a) is correct and (b) is incorrect | |
Statement (a) is incorrect and (b) is correct. |
Question 62 Explanation:
→ A publicly derived class is a subtype of its base class.
→ Inheritance is defined as deriving new classes (sub classes) from existing ones (super class or base class) and forming them into a hierarchy of classes.
→ Inheritance allows programmers to create classes that are built upon existing classes, to specify a new implementation while maintaining the same behaviors (realizing an interface), to reuse code and to independently extend original software via public classes and interfaces.
→ Inheritance is defined as deriving new classes (sub classes) from existing ones (super class or base class) and forming them into a hierarchy of classes.
→ Inheritance allows programmers to create classes that are built upon existing classes, to specify a new implementation while maintaining the same behaviors (realizing an interface), to reuse code and to independently extend original software via public classes and interfaces.
Correct Answer: A
Question 62 Explanation:
→ A publicly derived class is a subtype of its base class.
→ Inheritance is defined as deriving new classes (sub classes) from existing ones (super class or base class) and forming them into a hierarchy of classes.
→ Inheritance allows programmers to create classes that are built upon existing classes, to specify a new implementation while maintaining the same behaviors (realizing an interface), to reuse code and to independently extend original software via public classes and interfaces.
→ Inheritance is defined as deriving new classes (sub classes) from existing ones (super class or base class) and forming them into a hierarchy of classes.
→ Inheritance allows programmers to create classes that are built upon existing classes, to specify a new implementation while maintaining the same behaviors (realizing an interface), to reuse code and to independently extend original software via public classes and interfaces.
Subscribe
Login
0 Comments