class TruckFactory extends AbstractFactory {
    @Override
    Vehicle createVehicle(String type) {
        return switch(type) {
            case "ciężkie" -> new HeavyTruck();
            case "lekkie" -> new LightTruck();
            default -> throw new IllegalArgumentException("nie zaimplementowano");
        };
    } 
}
