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