public override APizza CreatePizza(PizzaType type) { APizza pizza = null; switch (type) { case PizzaType.Cheese: pizza = new CaliforniaStyleCheesePizza(); break; case PizzaType.Pepperoni: pizza = new CaliforniaStylePepperoniPizza(); break; case PizzaType.Clam: pizza = new CaliforniaStyleClamPizza(); break; case PizzaType.Veggie: pizza = new CaliforniaStyleVeggiePizza(); break; default: pizza = new CaliforniaStyleCheesePizza(); break; } return(pizza); }
protected override Pizza CreatePizza(string type) { Pizza pizza = null; switch (type) { case "cheese": pizza = new CaliforniaStyleCheesePizza(); break; case "pepperoni": pizza = new CaliforniaStylePepperoniPizza(); break; case "clam": pizza = new CaliforniaStyleClamPizza(); break; case "veggie": pizza = new CaliforniaStyleVeggiePizza(); break; default: break; } return(pizza); }
public override Pizza CreatePizza(string type) { Pizza pizza = null; if (type == "cheese") { pizza = new CaliforniaStyleCheesePizza(pizzaIngredientFactory); } if (type == "pepperoni") { pizza = new CaliforniaStylePepperoniPizza(pizzaIngredientFactory); } if (type == "clam") { pizza = new CaliforniaStyleClamPizza(pizzaIngredientFactory); } return(pizza); }
protected override Pizza CreatePizza(string type) { Pizza pizza = null; switch (type) { case "Cheese": pizza = new CaliforniaStyleCheesePizza(); break; case "Pepperoni": pizza = new CaliforniaStylePepperoniPizza(); break; case "Clam": pizza = new CaliforniaStyleClamPizza(); break; case "Veggie": pizza = new CaliforniaStyleVeggiePizza(); break; } return pizza; }
public override Pizza CreatePizza(PizzaType pizzaType) { Pizza pizza = null; if (pizzaType == PizzaType.Cheese) { pizza = new CaliforniaStyleCheesePizza(); } else if (pizzaType == PizzaType.Veggie) { pizza = new CaliforniaStyleVeggiePizza(); } else if (pizzaType == PizzaType.Pepperoni) { pizza = new CaliforniaStylePepperoniPizza(); } else if (pizzaType == PizzaType.Clam) { pizza = new CaliforniaStyleClamPizza(); } return(pizza); }