Ejemplo n.º 1
0
        public static void OrderLoop(BakeryInventory inventory)
        {
            Console.WriteLine("Would you like to add an item to your order, see the menu or checkout? [shop/menu/checkout]");
            string userChoice = Console.ReadLine();

            switch (userChoice)
            {
            case "shop":
                UserOrderUpdate(inventory);
                UserShoppingCartUpdate(inventory);
                inventory.CalculateCost();
                OrderLoop(inventory);
                break;

            case "menu":
                inventory.MenuList();
                OrderLoop(inventory);
                break;

            case "checkout":
                Console.WriteLine("Thanks for shopping with us today!");
                inventory.CalculateCost();
                break;

            default:
                OrderLoop(inventory);
                break;
            }
        }
Ejemplo n.º 2
0
        static void Main()
        {
            BakeryInventory inventory = new BakeryInventory();

            CreateProducts(inventory);
            inventory.MenuList();

            Console.WriteLine("Welcome to our shop. Take a look at the menu and see if there is anything you'd like.");
            Console.WriteLine("");

            OrderLoop(inventory);
        }