Factory Pattern Francesco Ierna
Factory Pattern Problem : If with many different type of return
If we want to add contrete classes we must re-open the code -> not closed for modification Solution : Identify the aspects that vary
Encaps object creation(Factory)
Factory  Pattern
Factory  Pattern
Factory Pattern Defined
Code Factory Method Il metodo  createPizza è il factory method  invoca un metodo nella stessa classe che in base alla tipologia di oggetti invoca quello nelle sottoclassi
Ex :  PizzaStore p = new NewYorkStore();

Design Pattern 4. Factory Pattern