logo

Crowdly

Looking for test answers and solutions? Browse our comprehensive collection of verified answers for at moodle.lsu.edu.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

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?

0%
100%
0%
0%
View this question

Consider the following code snippet:

public class Vessel

{

   . . .

   public void setVesselClass(double numberAxles)

   {

      . . .

   }

}

public class Speedboat extends Vessel

{

   . . . 

   public void setVesselClass(double numberAxles)

   {

      . . . 

   }

}

Which of the following statements is correct?

100%
0%
0%
0%
View this question

Consider the following code snippet:

public class Vehicle

{

   . . .

   public void setVehicleClass(double numberAxles)

   {

      . . .

   }

}

public class Motorcycle extends Vehicle

{

   . . . 

   public void setVehicleClass(double numberAxles)

   {

      . . . 

   }

}

Which of the following statements is correct?

100%
0%
0%
0%
View this question

If a subclass defines the same method name and the same parameter types for a method that appears in its superclass, ____.

0%
100%
0%
0%
View this question

Which reserved word must be used to call a method of a superclass?

0%
0%
0%
100%
View this question

Consider the following code snippet:

public void deposit(double amount)

{

   transactionCount ++;

   super.deposit(amount);

}

Which of the following statements is true?

0%
0%
0%
100%
View this question

Consider the following code snippet:

public class Vessel

{

   . . .

   public void setVesselAtrributes()

   {

      . . .

   }

}

public class Speedboat extends Vessel

{

   . . . 

   public void setVesselAtrributes()

   {

   . . .

   }

}

Which of the following statements is correct?

0%
0%
100%
0%
View this question

Consider the following code snippet:

public class Vehicle

{

   . . .

   public void setVehicleAtrributes()

   {

      . . .

   }

}

public class Auto extends Vehicle

{

   . . . 

   public void setVehicleAtrributes()

   {

   . . .

   }

}

Which of the following statements is correct?

0%
0%
100%
0%
View this question

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)

   {

      . . .

   }

}

public class Auto extends LandVehicle

{

   public Auto(String type)

   {

      . . .

   }

   public String displayAutoType()

   {

      return _____;

   }

}

Complete the code in the Auto class method named displayAutoType to return the type data. 

0%
0%
0%
100%
View this question

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. 

100%
0%
0%
0%
View this question

Want instant access to all verified answers on moodle.lsu.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!