Consider the following class hierarchy: public class Vehicle
{
Private String type;
Public Vehicle(String type)
{
This.type = type;
}
Public String displayInfo()
{
Return type;
}
}
Public class LandVehicle extends Vehicle
{
Public LandVehicle(String type)
{
Super(type) ;
}
}
Public class Auto extends LandVehicle
{
Public Auto(String type)
{
_________;
}
}
Complete the code in the Auto class constructor to store the type data.
A) super(type) ;
B) super(super(type) ) ;
C) super.super(type) ;
D) This cannot be done unless the Auto declares an instance variable named type.
Correct Answer:
Verified
Q30: Which of the following indicates that the
Q30: Which of the following statements about superclasses
Q31: Consider the following code snippet: public void
Q31: Which of the following indicates that a
Q32: Consider the following code snippet: public class
Q34: Consider the following code snippet: public class
Q35: Which of the following is true regarding
Q36: Consider the following code snippet: public class
Q37: Consider the following class hierarchy: public class
Q39: Which of the following indicates that a
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents