Beispiel #1
0
        //prompts user to purchase ingredients
        public void BuyIngredients(Store store)
        {
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("\nBuy ingredients! You need to buy atleast ONE OF EACH ingredient in order make ONE PITCHER of lemonade. \nRemember: 1 pitcher makes 10 cups of lemonade\nTip: Pefect your recipe, and you can earn tips from customers!");
            Console.ResetColor();
            string question = ("\nNumber of pitchers to make: ");

            store.BuyPitcher(question);
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.WriteLine($"Budget remaining: ${store.CalculateBudgetGivenPitchers().ToString("0.00")}");
            Console.ResetColor();
            question = ("Number of lemon to buy: ");
            Console.WriteLine($"Budget remaining: ${store.CalculateBudget(store.BuyLemon,question,1).ToString("0.00")}");
            Console.ResetColor();
            question = ("Number of sugar cubes to buy: ");
            Console.WriteLine($"Budget remaining: ${store.CalculateBudget(store.BuySugar, question, 2).ToString("0.00")}");
            question = ("Number of ice packs to buy: ");
            Console.WriteLine($"Budget remaining: ${store.CalculateBudget(store.BuyIce, question, 3).ToString("0.00")}");
            Console.ResetColor();
        }