Exemplo n.º 1
0
        protected override Pizza CreatePizza(string type)
        {
            Pizza pizza = null;

            if (type.Equals("cheese"))
            {
                pizza = new ChigadoPizzaCheese();
            }

            return(pizza);
        }
Exemplo n.º 2
0
        protected override Pizza CreatePizza(string type)
        {
            Pizza pizza = null;
            IPizzaIngredientsFactory pizzaIngredientsFactory = new ChicagoPizzaIngredientsFactory();

            if (type.Equals("cheese"))
            {
                pizza = new ChigadoPizzaCheese(pizzaIngredientsFactory);
            }

            return(pizza);
        }