Vehicle Management System #1

Merged
reyhne merged 3 commits from develop into master 2026-05-23 12:57:28 +00:00
Showing only changes of commit 7634dc9e8c - Show all commits
+7 -8
View File
@@ -4,16 +4,17 @@ import org.model.ElectricCar;
import org.model.GasCar; import org.model.GasCar;
import org.model.SportsCar; import org.model.SportsCar;
import org.model.Vehicle; import org.model.Vehicle;
import org.service.Serviceable; import org.behavior.Serviceable;
import org.util.VehicleInspector; import org.util.VehicleInspector;
public class Main public class Main {
{
public static void main(String[] args) public static void main(String[] args)
{ {
ElectricCar porsche = new ElectricCar("Porsche", "Taycan", 2023, 12000, 93.4); ElectricCar porsche = new ElectricCar("Porsche", "Taycan", 2023, 12000.0, 4, 93, 65.5);
GasCar benz = new GasCar("Mercedes-Benz", "C200", 2022, 28000, 2.0);
SportsCar audi = new SportsCar("Audi", "R8", 2021, 15000, 570); 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 }; 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(v.getBrand() + " " + v.getModel() + " does not need service.");
} }
System.out.println(); System.out.println();
} }
System.out.println("=== Workshop Completed ==="); System.out.println("=== Workshop Completed ===");
} }
} }