public AnimalWorld(ContinentFactory factory)
 {
     _herbivore = factory.CreateHerbivore();
     _carnivore = factory.CreateCarnivore();
 }
 // Constructor
 public AnimalWorld(ContinentFactory factory)
 {
     _carnivore = factory.CreateCarnivore();
       _herbivore = factory.CreateHerbivore();
 }
示例#3
0
 public AnimalWorld(ContinentFactory continent)
 {
     herbivore = continent.CreateHerbivore();
     carnivore = continent.CreateCarnivore();
 }