added lab2 ex2

This commit is contained in:
2024-10-07 10:37:10 +02:00
parent 50e6ed18df
commit 1ab845574a
18 changed files with 142 additions and 24 deletions

View File

@@ -2,7 +2,7 @@ package lab2_factory_method.ex1;
public class PickupCreator extends CarCreator {
@Override
public Car orderCar(String color) {
return new Pickup(color);
public Car createCar() {
return new Pickup();
}
}