Exemplo n.º 1
0
        protected override Menu CreateMenu(string type)
        {
            Menu menu = null;
            IIngredientFactory ingredientFactory = new SecondRestaurantIngredientFactory();

            if (type == "Neapolitana")
            {
                menu = new MenuNr2(ingredientFactory);
            }

            return(menu);
        }
Exemplo n.º 2
0
        protected override Menu CreateMenu(string type)
        {
            Menu menu = null;
            IIngredientFactory ingredientFactory = new FirstRestaurantIngredientFactory();

            if (type == "Drink")
            {
                menu = new MenuNr2(ingredientFactory);
            }
            else if (type == "Fanta")
            {
                menu = new MenuNr1(ingredientFactory);
            }

            return(menu);
        }