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