Beispiel #1
0
        public string orderEnteree()
        {
            string nextSelection;

            //Create a list, for loop to output menu.
            List <string> entreeList = new List <string>
            {
                "Cheeseburger",
                "Chicken Nuggets",
                "Chicken Strips",
                "Chicken Broccoli",
                "Fish Filet",
                "Steak",
                "Black Bean Burger"
            };


            PrintSelection.PrintList(entreeList);
            Console.WriteLine("What Entree would you like?\n");
            nextSelection = Console.ReadLine();

            if (entreeList.Contains(nextSelection))
            {
                //next step to customization
            }

            else
            {
                do
                {
                    PrintSelection.PrintList(entreeList);
                    Console.WriteLine("Please input a valid choice: ");
                    nextSelection = Console.ReadLine();

                    switch (Convert.ToInt32(nextSelection))
                    {
                    case 1:
                        Console.WriteLine("Cheeseburger Successfully Added.");
                        break;

                    default:
                        break;
                    }
                } while (true);
            }



            return("");
        }
Beispiel #2
0
        public int placeOrder()
        {
            List<string> selectionList = new List<string>
            {
                "Entree",
                "Side",
                "Drink"
            };

            Console.WriteLine("What order would you like to place?");

            PrintSelection.PrintList(selectionList);

            //Check currentOrder for valid input and add a loop if invalid
            int currentOrder = Convert.ToInt32(Console.ReadLine());
            orderSequencer(currentOrder);

            return currentOrder;
        }