Example #1
0
        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);
        }
Example #2
0
        //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);
        }
Example #3
0
 public void AddItem(InventoryItem i)
 {
     inventory.Add(i);
 }
Example #4
0
 /// <summary>
 /// Adds inventory to the lost
 /// </summary>
 /// <param name="it">inventory item </param>
 public void AddInventory(InventoryItem it)
 {
     inventoryItems.Add(it);
     inventoryItems.Sort();
 }
Example #5
0
 /// <summary>
 /// method that adds inventoyItems on the list
 /// </summary>
 /// <param name="a"></param>
 public void AddTtem(InventoryItem a)
 {
     inventoryItems.Add(a);
 }