logo

Crowdly

Consider the following class hierarchy: public class Vehicle {    private St...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

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%
More questions like this

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

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