protected override Pizza Make() { Portuguesa pizza = new Portuguesa(); pizza.GetHam(); pizza.GetPea(); pizza.GetOnion(); pizza.GetEgg(); return((Pizza)pizza); }
protected override Pizza CreatePizza(string sabor) { Pizza pizza; IPizzaIngredientFactory ingredientFactory = new PremiumPizzaIngredientFactory(); switch (sabor) { case "Portuguesa": pizza = new Portuguesa(ingredientFactory); pizza.Nome = "Pizza Premium Portuguesa"; break; case "Calabreza": pizza = new Calabreza(ingredientFactory); pizza.Nome = "Pizza Premium Calabreza"; break; } return(pizza); }