public double BagsOfSugarPurchased(int bagsOfSugarNeeded) { Sugar sugar = new Sugar(); checkOutSugar = sugar.GetCost() * bagsOfSugarNeeded; return(checkOutSugar); }
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); }