Vehicle Management System
This commit is contained in:
@@ -4,16 +4,17 @@ import org.model.ElectricCar;
|
||||
import org.model.GasCar;
|
||||
import org.model.SportsCar;
|
||||
import org.model.Vehicle;
|
||||
import org.service.Serviceable;
|
||||
import org.behavior.Serviceable;
|
||||
import org.util.VehicleInspector;
|
||||
|
||||
public class Main
|
||||
{
|
||||
public class Main {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
ElectricCar porsche = new ElectricCar("Porsche", "Taycan", 2023, 12000, 93.4);
|
||||
GasCar benz = new GasCar("Mercedes-Benz", "C200", 2022, 28000, 2.0);
|
||||
SportsCar audi = new SportsCar("Audi", "R8", 2021, 15000, 570);
|
||||
ElectricCar porsche = new ElectricCar("Porsche", "Taycan", 2023, 12000.0, 4, 93, 65.5);
|
||||
|
||||
GasCar benz = new GasCar("Mercedes-Benz", "C200", 2022, 28000.0, 5, 42.0, "Petrol");
|
||||
|
||||
SportsCar audi = new SportsCar("Audi", "R8", 2021, 15000.0, 2, 55.0, "Petrol", 3.1);
|
||||
|
||||
Vehicle[] vehicles = { porsche, benz, audi };
|
||||
|
||||
@@ -44,10 +45,8 @@ public class Main
|
||||
{
|
||||
System.out.println(v.getBrand() + " " + v.getModel() + " does not need service.");
|
||||
}
|
||||
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
System.out.println("=== Workshop Completed ===");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user