static void Main(string[] args) { Bear gogi = new Bear(); gogi.Age = 28; gogi.DaysSinceEaten = 5; gogi.Name = "Gogi"; gogi.Eat(); Bear dimitrichkoBear = new Bear(); dimitrichkoBear.Age = 28; dimitrichkoBear.DaysSinceEaten = 2; dimitrichkoBear.Name = "Dimitrichko"; Bear pouhBear = new Bear(); pouhBear.Age = 25; pouhBear.DaysSinceEaten = 3; pouhBear.Name = "Mecho Puh"; Bear[] bearZoo = new Bear[3] { gogi, dimitrichkoBear, pouhBear }; foreach (Bear bear in bearZoo) { if (bear.DaysSinceEaten >= 3) { bear.Eat(); } } Shirt calvinKlain = new Shirt(); calvinKlain.Size = "XXXXL"; calvinKlain.Quantity = 55; calvinKlain.Price = 3; calvinKlain.Wash(); Console.WriteLine($"Teniska calvin: Size -> {calvinKlain.Size} Quantity -> {calvinKlain.Quantity} Price -> {calvinKlain.Price}"); }
static void Main(string[] args) { Bear gogi = new Bear(); gogi.Age = 28; gogi.DaysSinceEaten = 5; gogi.Name = "Gogi"; Bear dimitrichko = new Bear(); dimitrichko.Age = 28; dimitrichko.DaysSinceEaten = 2; dimitrichko.Name = "Dimitrichko"; Bear pouhBear = new Bear(); pouhBear.Age = 25; pouhBear.DaysSinceEaten = 3; pouhBear.Name = "Mecho Puh"; Bear[] bearZoo = new Bear[] { gogi, dimitrichko, pouhBear }; foreach (Bear bear in bearZoo) { if (bear.DaysSinceEaten >= 3) { bear.Eat(); } } int number = 5; Shirt calvinKlein = new Shirt(); calvinKlein.size = "XXS"; calvinKlein.quantity = 55; calvinKlein.price = 3; Console.WriteLine($"Teniska callvin:{calvinKlein.size}, Quantity:{calvinKlein.quantity}, Price: {calvinKlein.price}"); }