Beispiel #1
0
 // Constructor
 public AnimalWorld(ContinentFactory factory)
 {
     _carnivore = factory.CreateCarnivore();
       _herbivore = factory.CreateHerbivore();
 }
Beispiel #2
0
 public override void Eat(Carnivore h)
 {
     // Eat Bison
     Console.WriteLine(this.GetType().Name +
       " eats " + h.GetType().Name);
 }
Beispiel #3
0
 // Constructor
 public AnimalWorld(ContinentFactory factory)
 {
     _carnivore = factory.CreateCarnivore();
     _herbivore = factory.CreateHerbivore();
 }
Beispiel #4
0
 public abstract void Eat(Carnivore a);