Пример #1
0
        public static void AddToOrder()
        {
            Console.WriteLine("".PadLeft(4) + "Your total order includes: " + Bread.GetQuantity() + " bread, " + Pastry.GetQuantity() + " pastry");
            Console.WriteLine("".PadLeft(4) + "Would you like to add additional bread or pastry to your order?");
            Console.WriteLine("".PadLeft(16) + "[BREAD] [PASTRY] [BOTH] [QUIT]");
            string addOrNot = Console.ReadLine();

            if (addOrNot.ToLower() == "bread")
            {
                TakeOrder("bread");
            }
            else if (addOrNot.ToLower() == "pastry")
            {
                TakeOrder("pastry");
            }
            else if (addOrNot.ToLower() == "both")
            {
                TakeOrder("both");
            }
            else if (addOrNot.ToLower() == "quit" || addOrNot.ToLower() == "no")
            {
                DisplayComeAgain();
            }
            else
            {
                AddToOrder();
            }
        }