Esempio n. 1
0
 // Initializes and adds a desired amount of specific cupcake types to the inventory List
 public void BakeBatch(string batter, string icing, double pricePerCupcake, int count)
 {
     for (int i = 0; i < count; i++)
     {
         var freshCupcake = new Cupcake(batter, icing, pricePerCupcake);
         AddToInventory(freshCupcake);
     }
 }
Esempio n. 2
0
 // Adds the given Cupcake to the Inventory property
 public void AddToInventory(Cupcake cupcake)
 {
     Inventory.Add(cupcake);
 }