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