using System.Collections.Generic;
public static void Main()
var cart = new List<Item>();
var shop = new ConsignmentShop();
public string FirstName { get; set; }
public string LastName { get; set; }
public decimal Commission { get; set; }
public decimal PaymentDue { get; set; }
public override string ToString() { return $"{FirstName} {LastName}"; }
public string Name { get; set; }
public string Description { get; set; }
public decimal Price { get; set; }
public bool IsSold { get; set; }
public bool IsPaymentDone { get; set; }
public Vendor Vendor { get; set; }
public int Stock { get; set; }
public override string ToString() { return $"{Name} {Price}"; }
public string Name { get; set; }
public string City { get; set; }
public string ZipCode { get; set; }
public string Country { get; set; }
public string Address1 { get; set; }
public string Address2 { get; set; }
public List<Vendor> Vendors { get; private set; }
public List<Item> Items { get; private set; }
Vendors = new List<Vendor>();
Items = new List<Item>();
public void AddVendor(Vendor vendor)
public void AddItem(Item item)
public class ConsignmentShop
public Store Store { get; set; }
public void ShowMenu(List<Item> cart)
Console.WriteLine("Let's start here.");
Store = new Store { Name = "Cool Store" };
Store.AddVendor(new Vendor { FirstName = "Vladimir", LastName = "Gerasimenok", Commission = 0.2m, PaymentDue = 0 });
Store.AddVendor(new Vendor { FirstName = "Raja", LastName = "Mani", Commission = 0.3m, PaymentDue = 0 });
Store.AddItem(new Item { Name = "C# in a Nutshell", Description = "A book from O'Reiley", Price = 50.0m, IsSold = false, IsPaymentDone = false, Vendor = Store.Vendors[0], Stock = 10 });
Store.AddItem(new Item { Name = "Apple AirPods", Description = "Headphones from Apple", Price = 250.0m, IsSold = false, IsPaymentDone = false, Vendor = Store.Vendors[1], Stock = 5 });
Store.AddItem(new Item { Name = "Samsung Galyx S20+", Description = "Samsung phone", Price = 1200.0m, IsSold = false, IsPaymentDone = false, Vendor = Store.Vendors[0], Stock = 3 });
Store.AddItem(new Item { Name = "iMac 2011", Description = "A computer from Apple", Price = 575.0m, IsSold = false, IsPaymentDone = false, Vendor = Store.Vendors[1], Stock = 2 });
Store.AddItem(new Item { Name = "AOC AG352UCG", Description = "AOC Ultrawide monitor", Price = 790.0m, IsSold = false, IsPaymentDone = false, Vendor = Store.Vendors[0], Stock = 5 });