package lab3_abstract_factory.ex2; public class CarCreator { private CarFactory carFactory; public CarCreator(CarFactory carFactory) { this.carFactory = carFactory; } public Car orderCar(String color) { Car car = carFactory.createCar(); car.paintColor(color); return car; } }