Beispiel #1
0
 public void AddCupsToInventory(int numberOfCups)
 {
     for (int i = 0; i < numberOfCups; i++)
     {
         Cup cup = new Cup();
         cups.Add(cup);
     }
 }
Beispiel #2
0
        public void BuyCups(Inventory inventory, Wallet wallet)
        {
            Console.WriteLine("How many paper cups would you like to purchase? (0.03 ea)");
            string userInput = Console.ReadLine();

            for (int i = 0; i < Convert.ToInt32(userInput); i++)
            {
                Cup cups = new Cup();
                inventory.cups.Add(cups);
            }
            wallet.RemoveMoneyAmmount(Convert.ToInt32(userInput), inventory.cups.ElementAtOrDefault(0).price);
        }