Compare commits

..

2 Commits
scr ... main

@ -1,6 +0,0 @@
public class ConcreteProductA implements Product {
@Override
public void operation() {
System.out.println("ConcreteProductA operation");
}
}

13
scr

@ -1,13 +0,0 @@
public class Factory {
public static Product createProduct(String type) {
if (type == null) {
return null;
}
if (type.equalsIgnoreCase("A")) {
return new ConcreteProductA();
} else if (type.equalsIgnoreCase("B")) {
return new ConcreteProductB();
}
return null;
}
}
Loading…
Cancel
Save