Exemplo n.º 1
0
        static void Main(string[] args)
        {
            PawnShop ps = new PawnShop();

            Vehicle v = new Vehicle("Vehicle1", "Description1", 10000.5, "Type1", 2014, "Manufacturer1", Vehicle.Condition.Perfectly);
            Watch w = new Watch("Watch1", "Description2", 5000.4, Watch.Material.Silver, "Manufacturer2", 20);

            ps.AddInventory(v);
            ps.AddInventory(w);

            Employee e = new Employee("Edina", "Kudumovic", 200);
            Expert ex = new Expert("Rijad", "Memic", 200.5, "Expertise");

            ps.AddEmployee(e);
            ps.AddEmployee(ex);

            PrintInventory(ps);

            PrintSearch(ps, "Vehicle1");
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            PawnShop test = new PawnShop("Pawn");
            test.AddTtem(new Cars("A8","somethig about car",20000,"SportCar",2015,"Audi",(car)1));
            test.AddTtem(new Cars("X5","somethig about car",70000,"Car",2013,"BMW",(car)0));
            test.AddTtem(new Cars("911", "somethig about car", 100000, "SportCar", 2015, "Porshe", (car)2));

            while (true)
            {
                Console.WriteLine("1-Enter Item");
                Console.WriteLine("2- Enter Employees");
                Console.WriteLine("3- Sort Items");
                Console.WriteLine("4 All Item");
                int a;
                Int32.TryParse(Console.ReadLine(), out a);

                switch (a)
                {

                    case 1:
                        {
                            Console.WriteLine("For enter item, press 1; For enter watches, press 2; For items press 3");
                            int c;
                            Int32.TryParse(Console.ReadLine(), out c);
                            if (c == 1)
                            {
                                Console.WriteLine("Enter type car");
                                string name = Console.ReadLine();
                                Console.WriteLine("Enter details");
                                string details = Console.ReadLine();
                                Console.WriteLine("year const. ");
                                string autor = Console.ReadLine();
                                Console.WriteLine("Enter condition--- 0 perfectly, 1 preserved,  2 bad");
                                int choice;
                                Int32.TryParse(Console.ReadLine(), out choice);
                                test.AddTtem(new Cars(name, details, 1, "X6", 2015, "BMW", (car)1));

                            }

                            if (c == 2)
                            {
                                Console.WriteLine("Enter watches ");
                                string name = Console.ReadLine();
                                Console.WriteLine("Enter details ");
                                string detalj = Console.ReadLine();
                                Console.WriteLine("Enter price ");
                                string autor = Console.ReadLine();
                                Console.WriteLine("Enter condition--- 0 Perfectly,  1 Preserved, 2 Bad");
                                int choice;
                                Int32.TryParse(Console.ReadLine(), out choice);
                                //test.AddTtem(new Cars(name, details, 1, "Xty", 2015, "Rolex", (watches)1));

                            }
                            if (c == 3)
                            {
                                Console.WriteLine("enter item");
                                string name = Console.ReadLine();
                                Console.WriteLine("enter details");
                                string details = Console.ReadLine();
                                Console.WriteLine("Enter price: ");
                               //int price = Console.ReadLine();

                                test.AddTtem(new InventoryItem(name, details,200000));

                            }

                            break;
                        }

                    case 2:
                        {
                            Console.WriteLine("Enter name employees: ");
                            string name = Console.ReadLine();
                            Console.WriteLine("Enter Last name employees: ");
                            string detalj = Console.ReadLine();
                            Console.WriteLine("plata: ");

                            int choice;
                            Int32.TryParse(Console.ReadLine(), out choice);
                            test.AddEmployee(new Employees(name, detalj, choice));

                            break;
                        }

                    case 3:
                        {
                            //test.AddTtem();
                            break;
                        }

                    case 4:
                        {

                            foreach (Cars e in test.inventoryItems)
                            { Console.WriteLine(e); }
                            break;
                        }

                    default:
                        {
                            Console.WriteLine("invalid input");

                            break;
                        }
                }

            }
        }