// Constructor
 public AnimalWorld(ContinentFactory factory)
 {
     carnivore = factory.CreateCarnivore();
     herbivore = factory.CreateHerbivore();
 }
Ejemplo n.º 2
0
 // Constructor
 public AnimalWorld(RealWorldAbstractFactory abstractFactory)
 {
     _carnivore = abstractFactory.CreateCarnivore();
     _herbivore = abstractFactory.CreateHerbivore();
 }