public void Load(IEnergyDrink item) { if (CurrentStock.Count >= Capacity) { Console.WriteLine($"The vending machine is full. The {item.Name} cannot be added."); } else { CurrentStock.Add(item); } }
public void Load(IReadyMeal item) { if (CurrentStock.Count >= Capacity) { Console.WriteLine("The vending machine is full. No more products can be added."); } else { CurrentStock.Add(item); } }