示例#1
0
        public void makeLemonStands()
        {
            int numofstands = UserInteraction.GetUserInputInt("Lets open some lemonade stands, how many would you like to open?");


            for (int i = 0; i < numofstands; i++)
            {
                LemonadeStand newstand = new LemonadeStand();

                Console.WriteLine($"What is the name of location {i + 1} ?");
                newstand.standName = Console.ReadLine();

                newstand.numSold = UserInteraction.GetUserInputInt("How many cups will this location sell?");

                newstand.customerPrice = UserInteraction.GetUserInputDecimal("What will your price to sell the lemonade be?");

                newstand.sellerCost = UserInteraction.GetUserInputDecimal("How much does it cost you to make the lemonade");

                Console.WriteLine($"This stands total revenue will be: { newstand.getTotalRevenue()}");
                Console.WriteLine("The stands total expenses are: " + newstand.getTotalExpense());
                Console.WriteLine("Your total profit of " + newstand.standName + " is " + newstand.getTotalProfit());

                LemonLocations.Add(newstand);
            }
        }