Solved

Consider the Following Code Snippet

Question 29

Multiple Choice

Consider the following code snippet:
Public class Vehicle
{
) . .
Public void setVehicleClass(double numberAxles)
{
) . .
}
}
Public class Motorcycle extends Vehicle
{
) . .
Public void setModelName(String model)
{
) . .
}
Public void setVehicleClass(double numberAxles)
{
) . .
}
}
Which of the following statements is NOT correct?


A) The Motorcycle class can call the setVehicleClass method of the Vehicle class.
B) The Vehicle class can call the setModelName method.
C) The Motorcycle class overrides the setVehicleClass method.
D) The Motorcycle class can call the setVehicleClass method of the Motorcycle class.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents