public CustomerNotificationArgs(StoreItem item) { Item = item; }
public override void Buy(ICustomer customer, StoreItem item) { Console.WriteLine($"{customer.Name} bought from {Name} the {item.Name} for {item.Price}$"); }
public void AddItem(StoreItem item) { items.Add(item); NotifyCustomers(item); }
public void Buy(ICustomer customer, StoreItem item) { Console.WriteLine($"{customer.Name} bought {item.ItemName} for {item.Price}$"); }
public void AddToStore(StoreItem storeItem) { storeItems.Add(storeItem); NotifyCustomers(storeItem); }
public abstract void Buy(ICustomer customer, StoreItem item);