static void Main(string[] args) { Invoice invoice = new Invoice() { Customer = "Veeti" }; InvoiceItem butter = new InvoiceItem() { Name = "Butter", Price = 3.45, Quantity = 1 }; InvoiceItem cheese = new InvoiceItem() { Name = "Cheese", Price = 4.99, Quantity = 1 }; InvoiceItem soda = new InvoiceItem() { Name = "Cola", Price = 0.99, Quantity = 6 }; invoice.AddItem(butter); invoice.AddItem(cheese); invoice.AddItem(soda); invoice.PrintInvoice(); }
public void AddItem(InvoiceItem item) { invoice.Add(item); }