Question: public class Car [ public String make; protected int weight; private String color: this(10); public ElectricCar (int charge) rechargeHour charge: public Car) this(Unknown. O, White

public class Car [ public String make; protected int weight; private String color: this(10); public ElectricCar (int charge) rechargeHour charge: public Car) this("Unknown". O, "White" public static void main(String [1 args Car public Car (String make, int weight, String color) Car c1, c2 BioFuelCar b1, b2; ElectricCar e1, e2; b1-new BioFuelCar0; c1-new BioFuelCar); c2 new ElectricCar: e1- new Car: e2 new ElectricCar0: this.make make; this.weight weight: this.color color public class BioFuelCar extends Car f private double gallons; public BioFuelCar() this(15.0); O c1- new BioFuelCar0: O c2 new ElectricCar): O b1= O e1- new Car0: O e2 new ElectricCar: public BioFuelCar ( double gal) gallons gal new BioFuelCar0: public class ElectricCar extends Car private int rechargeHour; public ElectricCar () this(10); public class Car [ public String make; protected int weight; private String color: this(10); public ElectricCar (int charge) rechargeHour charge: public Car) this("Unknown". O, "White" public static void main(String [1 args Car public Car (String make, int weight, String color) Car c1, c2 BioFuelCar b1, b2; ElectricCar e1, e2; b1-new BioFuelCar0; c1-new BioFuelCar); c2 new ElectricCar: e1- new Car: e2 new ElectricCar0: this.make make; this.weight weight: this.color color public class BioFuelCar extends Car f private double gallons; public BioFuelCar() this(15.0); O c1- new BioFuelCar0: O c2 new ElectricCar): O b1= O e1- new Car0: O e2 new ElectricCar: public BioFuelCar ( double gal) gallons gal new BioFuelCar0: public class ElectricCar extends Car private int rechargeHour; public ElectricCar () this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
