Esempio n. 1
0
        public double BagsOfSugarPurchased(int bagsOfSugarNeeded)
        {
            Sugar sugar = new Sugar();

            checkOutSugar = sugar.GetCost() * bagsOfSugarNeeded;
            return(checkOutSugar);
        }
Esempio n. 2
0
 public void AddSugar(int bagsOfSugarNeeded)
 {
     for (int i = 0; i < bagsOfSugarNeeded; i++)
     {
         Sugar sugar = new Sugar();
         this.sugar.Add(sugar);
     }
     Console.WriteLine("You just added {0} cups of sugar!\n\n", bagsOfSugarNeeded.Count);
 }