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