final class VehicleFactory {
    private VehicleFactory(){}
    static Vehicle produce(String type){
        return switch (type) {
            case "sportowe" -> new SportCar("porsche 911");
            case "suv" -> new SuvCar("skoda kodiaq");
            default -> throw new IllegalArgumentException("""
                    nie zaimplementowano typu:'%s'
                    """.formatted(type));
                
        };
    }
}
