2024-10-07 11:14:07 +02:00

16 lines
331 B
Java

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;
}
}