static void Main(string[] args) { ShopWW.PrintShopInfo(); ShopWW shop = new ShopWW(); shop.Address = "Кунаева 24"; shop.Phone = " 8 777 3483493"; Catalog catalog = new Catalog() { Name = "Смартфоны: " }; Product product = new Product(); product.Name = "Смартфон Samsung Galaxy s9"; product.Manufacture = "Xiaomi"; product.Price = 79800; product.TypeSecurity = TypeSecurity.type1; catalog.Products.Add(product); shop.Catalogs.Add(catalog); shop.PrintCatalog(); }
static void Main(string[] args) { ShopWW shop = new ShopWW(); shop.Address = "Кунаева 24"; shop.Phone = "546456"; Catalog catalog = new Catalog() { Name = "Smartphones" }; Product product = new Product(); product.Name = "xfhfxh"; product.Manifacture = "hjhj"; product.Price = 45646; product.TypeSecurity = TypeSecurity.Type1; catalog.Products.Add(product); shop.Catalogs.Add(catalog); shop.PrintCatalog(); }
//2 CLASS WORK static void Main(string[] args) { int nz; do { Console.Write("Введите номер задания(666 exit): "); nz = Int32.Parse(Console.ReadLine()); if (nz == 1) { task1(); } else if (nz == 2) { task2(); } else if (nz == 3) { task3(); } else if (nz == 4) { task4(); } else if (nz == 5) { task5(); } else if (nz == 6) { task6(); } else if (nz == 7) { task7(); } else if (nz == 8) { task8(); } else if (nz == 9) { ShopWW shop = new ShopWW(); shop.Address = "Биржана 42"; shop.Phone = "8 702 599 59 48"; Catalog catalog = new Catalog() { Name = "Смартфоны" }; Product product = new Product(); product.name = "Смартфон ASUS"; product.ManuFacture = "ASUS"; product.Price = 150000; product.TypeSecurity = TypeSecurity.Type1; catalog.Products.Add(product); shop.Catalogs.Add(catalog); shop.PrintCatalog(); } else if (nz == 666) { Console.WriteLine("Bye"); } else { Console.WriteLine("Такого задания нет!"); } Thread.Sleep(2000); Console.Clear(); } while (nz != 666); }