Пример #1
0
        static void Main(string[] args)
        {

            Animal animal = new Animal();
            animal.IsAlive = true;
            animal.Name = "Matti";
            animal.Age = 7;

            Cat cat = new Cat();
            cat.Bell = false;
            cat.Stripes = false;

            animal.AddCat(cat);
            animal.AddCat(cat);
            Console.WriteLine(animal.ToString());

          //  cat.PrintData();
     
        }
Пример #2
0
 public void AddCat(Cat cat)
 {
     Cats.Add(cat);
 }