//This method prints out a completed order
        public void PrintOrder(LunchDeal meal)
        {
            var cheese = meal.Cheese ? "with cheese" : "without cheese";
            var carb   = meal.Entree == "burrito" ? "tortilla" : "bread";

            Console.Write("You ordered a " + meal.Meat + " " + meal.Entree + " " + cheese + " with " + meal.Bread + " " + carb + " and\n" + meal.Side + " on the side with " + meal.Drink + " to drink (press enter to exit)");
            Console.ReadKey();
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            var meal = GetMeal();

            if (meal == "lunch")
            {
                var order     = new LunchDeal();
                var mealOrder = order.GetOrder();
                order.PrintOrder(mealOrder);
            }

            if (meal == "dinner")
            {
                var order     = new DinnerDeal();
                var mealOrder = order.GetOrder();
                order.PrintOrder(mealOrder);
            }
        }