static void Main(string[] args) { InventoryItem ii = new InventoryItem("name1", "some item", 33.1); Cars c1 = new Cars("car1", "some description", 345.2, "some type", 1999, "ford", "1"); Watches w1 = new Watches("watch1", "some description", 500, "2", "some maker", 50); PawnShop ps = new PawnShop(); ps.items.Add(ii); ps.items.Add(c1); ps.items.Add(w1); Staff s1 = new Staff("Name1","Surname1", 700); StaffExpert s2 = new StaffExpert("Name2", "Surname2", 700, "Watches"); StaffExpert s3 = new StaffExpert("Name3", "Surname3", 700, "Cars"); ps.employees.Add(s1); ps.employees.Add(s2); ps.employees.Add(s3); //AddCar(ps); //AddWatch(ps); //SearchByName(ps); //SearchByPrice(ps); PrintItems(ps); PrintStaff(ps); }
//public static void PrintInventory(PawnShop p) //{ // foreach (InventoryItem i in p.inventory) // { // Console.WriteLine(i); // } //} static void Main(string[] args) { PawnShop p = new PawnShop(); InventoryItem i = new InventoryItem("Auto","Some Descrition", 2000); Console.WriteLine(i); Cars c = new Cars("Car","Some Descrition ",2000,"Auto",1964,"Golf","Very Bad"); Console.WriteLine(c); }
/// <summary> /// Adds new car to list /// </summary> /// <param name="ps">pawnShop ps</param> static void AddCar(PawnShop ps) { string name = "-"; Console.Write("Enter description: "); string description = Console.ReadLine(); Console.Write("Enter price: "); double price = Convert.ToDouble(Console.ReadLine()); Console.Write("Enter type: "); string type = Console.ReadLine(); Console.Write("Enter year: "); int year = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter maker: "); string maker = Console.ReadLine(); Console.Write("Enter condition - Perfect = 1, Preserved = 2, Bad = 3 "); string condition = Console.ReadLine(); Cars c = new Cars(name, description,price,type,year,maker, condition); ps.items.Add(c); }
static void Main(string[] args) { PawnShop ps = new PawnShop(); Cars c = new Cars("BMW X5", "Fast and furious", 100000, "Jeep", 2014, "BMW", Cars.Condition.excellent); Clocks cl = new Clocks("Rolex","Old and good", 1400, "Sweden", Clocks.Period.Modern, Clocks.Material.gold); ps.AddInventory(c); ps.AddInventory(cl); PrintInventory(ps); Employee one = new Employee("Indiana", "Jones", 1000, Employee.Expert.Pawnbroker); Employee two = new Employee("Lara", "Croft", 20000, Employee.Expert.MilitaryAntiques); ps.AddEmployee(one); //ps.AddEmployee(two); PrintEmployees(ps); }