Multiple Choice
Insert the missing code in the following code fragment. This fragment is intended to call the Vehicle class's method.
Public class Vehicle
{
) . .
Public void setVehicleClass(double numberAxles)
{
) . .
}
}
Public class Motorcycle extends Vehicle
{
) . .
Public Motorcycle()
{
_______________;
}
}
A) Motorcyle.setVehicleClass(2.0) ;
B) Vehicle.setVehicleClass(2.0) ;
C) this.setVehicleClass(2.0) ;
D) setVehicleClass(2.0) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q13: Which reserved word must be used to
Q18: The _ reserved word in a class
Q57: Which of the following is true regarding
Q60: A class that represents the most general
Q62: If a subclass contains a method with
Q67: Consider the following code snippet: Employee anEmployee
Q72: To test whether an object belongs to
Q94: What must a subclass do to modify
Q96: Consider the following class hierarchy:<br>Public class Vehicle<br>{<br>Private
Q99: Consider the following code snippet:<br>Public class Employee<br>{<br>)