// 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); } }
// Adds the given Cupcake to the Inventory property public void AddToInventory(Cupcake cupcake) { Inventory.Add(cupcake); }