1. What is another name for an “is-a”relationship? a) composition b) abstraction
ID: 3828011 • Letter: 1
Question
1. What is another name for an “is-a”relationship?
a) composition
b) abstraction
c) generalization/specialization
d) kind-of/example
2.Inheritance is
a) a mechanism that uses generalization/specialization relationships.
b) a mechanism for relating classes and objects.
c) a relationship that establishes levels in a class hierarchy.
d) a mechanism to share identifications and descriptions.
3. If two methods in a class hierarchy have the same name,
a) the classes that contain them cannot be included in the same program.
b) one method must have fewer parameters than the other to ensure uniqueness.
c) the method name must be appended to the class name on invokation.
d) an object name must precede the method name when either method is invoked.
Explanation / Answer
1. What is another name for an “is-a”relationship?
Ans) c) generalization/specialization
______________
2.Inheritance is
Ans) c) a relationship that establishes levels in a class hierarchy.
Reason:It is the relationship between base class and subclass with in the hierarchy of classes.
_____________
3. If two methods in a class hierarchy have the same name,
Ans) d) an object name must precede the method name when either method is invoked.
____________thank You
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.