示例#1
0
 //constructor
 public AnimalWorld(ContinentFactory factory)
 {
     _abstractHerbivore = factory.CreateHerbivore();
     _abstractCarnivore = factory.CreateCarnivore();
 }
示例#2
0
        // Constructor

        public AnimalWorld(ContinentFactory factory)
        {
            _carnivore = factory.CreateCarnivore();
            _herbivore = factory.CreateHerbivore();
        }
示例#3
0
 public AnimalWorld(ContinentFactory continentFactory)
 {
     this._carnivore = continentFactory.CreateCarnivore();
     this._herbivore = continentFactory.CreateHerbivore();
 }
示例#4
0
        // Constructor
        public AnimalWorld(ContinentFactory factory)
        {
          _carnivore = factory.CreateCarnivore();
          _herbivore = factory.CreateHerbivore();
        }
示例#5
0
 // Constructor.
 public AnimalWorld(ContinentFactory factory)
 {
     this.carnivore = factory.CreateCarnivore();
     this.herbivore = factory.CreateHerbivore();
 }
示例#6
0
 public AnimalWorld(ContinentFactory continent)
 {
     _herbivore = continent.CreateHerbivore();
     _carnivore = continent.CreateCarnivore();
 }
        private Carnivore _carnivore; // создаем переменную типа ХИЩНИК

        // Constructor

        public AnimalWorld(ContinentFactory factory)
        {
            _carnivore = factory.CreateCarnivore(); // идем на завод и создаем хищника
            _herbivore = factory.CreateHerbivore(); // идем на завод и создаем травоядное
        }
 // Constructor
 public AnimalWorld(ContinentFactory factory)
 {
     m_carnivore = factory.CreateCarnivore();
       m_herbivore = factory.CreateHerbivore();
 }
示例#9
0
 public Animals(ContinentFactory continentFactory)
 {
     _herbivore = continentFactory.CreateHerbivore();
     _carnivore = continentFactory.CreateCarnivore();
 }