static void Main(string[] args) { Cat cat1 = new Cat( "name1", 11, Cat.Colors.Black); Cat cat2 = new Cat( "name2", 21, Cat.Colors.Green); Cat cat3 = new Cat( "name1", 11, Cat.Colors.Black); string str = cat1.toString(); Console.WriteLine(str); cat2.name = "name3"; Console.WriteLine(Cat.template); Console.WriteLine($"Age: {cat2.GetAge()}"); bool result1 = cat1.Compare(cat3); Console.WriteLine(result1); bool result2 = Cat.Compare(cat1, cat3); Console.WriteLine(result2); bool result3 = cat1 == cat3; Console.WriteLine(result3); }
static void Main(string[] args) { Cat cat = new Cat("Рамис", new DateTime(2007, 6, 20)); // cat.MakeNoise(); Console.WriteLine($"Коту по имени {cat.Name} уже {cat.GetAge()} лет"); Cat cat2 = new Cat("Михалыч", new DateTime(2015, 6, 1)); // cat2.MakeNoise(); Console.WriteLine($"Коту по имени {cat2.Name} уже {cat2.GetAge()} лет"); CatSmartHouse catHouse = new CatSmartHouse(900); catHouse.AddCat(cat); catHouse.AddCat(cat2); Console.SetCursorPosition(0, catHouse.CatsCount + 1); // Console.ReadLine(); CommandCenter CC = new CommandCenter(); }