Answer the following statements true (T) or false (F)
1) Superclass constructors are not inherited by subclasses.
2) A has-a relationship is implemented via inheritance.
3) A Car class has an is-a relationship with the SteeringWheel and Brakes classes.
4) When a subclass redefines a superclass method by using the same signature, the subclass
is said to overload that superclass method.
1) True.
2) False. A has-a relationship is implemented via composition. An is-a relationship is implemented via inheritance.
3) False. This is an example of a has-a relationship. Class Car has an is-a relationship with class Vehicle.
4) False. This is known as overriding, not overloading—an overloaded method has the same name, but a different signature.
You might also like to view...
In a function that receives one parameter value from the main program and passes back a changed value of the parameter, that parameter is considered __________.
a. an input parameter b. an output parameter c. an input/output parameter d. a local variable e. a stub
The ____ is the color produced by combining the first two colors using the blending mode.
A. base color B. blend color C. result color D. reflect color
Your typography choices affect ____.
A. visual design B. accessibility C. download times D. All of the above.
What separates a filename and its extension?
A. Colon B. Comma C. Hyphen D. Period