Unit 4 Quiz Flashcards
Inheritance implements a _______ relationship?
Is-a
When classes are related where one class defines common features for other classs, this type of class forms a(n) ________?
Inheritance hierarchy
A _______ class refers to any of the classes below a particular class in an inheritance hierarchy?
Descendent
Inheritance allows you to re-use code that was written for another context.
True
When deciding on the relationship between two classes it is extremely hard to determine if you should use inheritance or composition.
T or F
False
Aggregation and composition both implement a ______ relationship?
has-a
What modifier do you use to prevent a class from having any subclasses?
final
When a subclass has a method with the same name, the same sequence of parameter types, and the same return type as a method in a superclass, this is called:
Method Overriding
Global stuff takes precedence over local stuff.
T or F
False
You can access an overridden method by prefixing the common method name with _____ and then a dot.
super