//This method prints out a completed order
        public void PrintOrder(DinnerDeal meal)
        {
            var cheese = meal.Cheese ? "with shredded parmesan" : "without shredded parmesan";

            Console.Write("You ordered a " + meal.Meat + " " + meal.Entree + " " + cheese + " with a " + meal.Bread + " bread roll " + " 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);
            }
        }