Multiple Choice
Consider the following code snippet:
Public class Vessel
{
Private String manufacturer;
) . .
Public void setVesselClass(double engineRPM)
{
) . .
}
}
If a Speedboat class is created as a subclass of the Vessel class, which of the following statements is correct?
A) A Speedboat object inherits and can directly use both the instance variable manufacturer and the method setVesselClass.
B) A Speedboat object inherits and can directly use the instance variable manufacturer but not the method setVesselClass.
C) A Speedboat object inherits but cannot directly use either the instance variable manufacturer or the method setVesselClass.
D) A Speedboat object inherits and can directly use the method setVesselClass but cannot directly use the instance variable manufacturer.
Correct Answer:

Verified
Correct Answer:
Verified
Q23: You are creating a Motorcycle class that
Q56: Consider the following code snippet: Employee anEmployee
Q69: Consider the following code snippet:<br>Public class Vessel<br>{<br>)
Q71: A class that cannot be instantiated is
Q72: Consider the following code snippet:<br>Public interface Sizable<br>{<br>Int
Q74: Consider the following code snippet:<br>Public class Coin<br>{<br>Private
Q75: Insert the missing code in the following
Q76: Which of the following could be used
Q77: Which of the following statements about an
Q78: Consider the following code snippet:<br>Public interface Sizable<br>{<br>Int