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...
By default, Active Directory sets the cost of each site link to _____
a. 1 b. 10 c. 100 d. 1000
A laptop with a soldered DC jack will only charge the battery when the output cord from the AC adapter is held at a certain angle. Which of the following should the technician inspect FIRST?
A. Inverter B. Motherboard C. Main battery D. BIOS settings