static void Main(string[] args) { Product product = new Product("org1", "prod1", 200, 700); Furniture furn = new Furniture("org2", "prod2", "furniture1", 600, 2000); closet closet1 = new closet(); warehouse warehouse1 = new warehouse(10); closet1.info.price = 300; closet1.info.mas = 3000; warehouse1.Add(product); warehouse1.Add(furn); warehouse1.Add(closet1); warehouse1.Add(new Furniture("org2", "prod4", "furniture2", 1000, 1500)); warehouse1.Add(new Product("org1", "prod5", 400, 200)); warehouse1.show(); controller.sort(warehouse1); warehouse1.show(); warehouse1.Del(closet1); warehouse1.show(); }
static void Main(string[] args) { Product product = new Product("org1", "prod1", 200, 700); Furniture furn = new Furniture("org2", "prod2", "furniture1", 600, 2000); closet closet1 = new closet(); warehouse warehouse1 = new warehouse(10); closet1.info.price = 300; closet1.info.mas = 3000; IAnotherInterface[] arr = new IAnotherInterface[3]; arr[0] = product; arr[1] = furn; arr[2] = closet1; try { warehouse WrongLab = new warehouse(100); //WrongLab.Del(closet1); //arr[4].ToString(); warehouse1.Add(product); warehouse1.Add(furn); warehouse1.Add(closet1); warehouse1.Add(new Furniture("org2", "prod4", "furniture2", 1000, 1500)); warehouse1.Add(new Product("org1", "prod5", 400, 200)); warehouse1.show(); controller.sort(warehouse1); warehouse1.show(); warehouse1.Del(closet1); warehouse1.show(); Console.WriteLine("asdasdasdsadasdasd"); warehouse1.sortByMas(700); //WrongLab.Del(scanner); } catch (LabIsFull ex) { Console.WriteLine("WarehouseIsFull Exception"); Console.WriteLine(ex.Message); } catch (ElementDoesNotExist ex) { Console.WriteLine("ElementDoesNotExist Exception"); Console.WriteLine(ex.Message); } catch (LabIsEmpty ex) { Console.WriteLine("WarehouseIsEmpty Exception"); Console.WriteLine(ex.Message); } catch (WrongSize ex) { Console.WriteLine("WrongSize Exception"); Console.WriteLine(ex.Message); } catch (Exception ex) { Console.WriteLine("Another Exception"); Console.WriteLine(ex.Message); } }