class IteratorMain {
    public static void main(String[] args) {
        System.out.println("Wzorzec Iterator, części pojazdu");
        var standardVehicle = new StandardVehicle();
        for(PartsIterator part = standardVehicle.getParts(); part.hasNext();){
            var vehiclePart = part.next();
            System.out.println("VehiclePart, nazwa części:" + vehiclePart.name());
        }
    }
}
