Пример #1
0
        public static IndependentDog Newdog(string name, int age, bool stray, DogTypes dogtype)
        {
            IndependentDog dog;

            if (!stray)
            {
                dog = new IndependentDog(name, age, dogtype);
            }
            else
            {
                dog = new IndependentDog();
            }



            return(dog);
        }
Пример #2
0
 public void Adopt(IndependentDog dog)
 {
     Dogs.Add(dog);
 }