public void eat(cow a) { if (isAlive) { Console.WriteLine(name + " the lion is eating " + a.name + " the cow"); a.die(); } else { Console.WriteLine(name + " the lion is not alive"); } }
static void Main(string[] args) { mouse a = new mouse(); cat mit = new cat(); cow acow = new cow(); lion alion = new lion(); mit.name = "mitzy"; //Console.WriteLine(a.name); mit.drinkmilk("Piss"); mit.drinkmilk(acow.givemilk()); alion.eat(acow); alion.makenoise(); mit.drinkmilk(acow.givemilk()); Console.ReadKey(); }