Exemplo n.º 1
0
 public abstract void Eat(Herbibore herbibore);
Exemplo n.º 2
0
 public override void Eat(Herbibore herbibore)
 {
     Console.WriteLine($"{this.GetType().Name} eats {herbibore.GetType().Name}");
 }
Exemplo n.º 3
0
 public Ecosystem(ContinentFactory factory)
 {
     _herbibore = factory.CreateHerbivore();
     _carnivore = factory.CreateCarnivore();
 }