Пример #1
0
        // Constructor

        public Ecosystem(ContinentFactory factory)
        {
            _carnivore = factory.CreateCarnivore();
            _herbivore = factory.CreateHerbivore();
        }
Пример #2
0
 public AnimalWorld(ContinentFactory factory)
 {
     _herbivore = factory.CreateHerbivore();
     _carnivore = factory.CreateCarnivore();
 }