Files
WS-03-advanced-oop-Khadem/src/main/java/org/util/VehicleInspector.java
T
2026-04-25 09:59:19 +03:30

23 lines
464 B
Java

package org.util;
import org.example.*;
import org.model.Vehicle;
/*
* Utility class to inspect vehicles.
* Demonstrates instanceof and polymorphism.
*/
public class VehicleInspector {
public static void inspect(Vehicle v) {
v.basicInfo();
// TODO:
// If ElectricCar → print "Check battery system"
// If SportsCar → print "Check brakes and performance"
// If GasCar → print "Check engine and oil"
}
}