public void Speaks(Goat Billy, Ox Jerry, Pig Tim, Sheep Sherry) { Console.WriteLine(Billy.Speaks()); Console.WriteLine(Jerry.Speaks()); Console.WriteLine(Tim.Speaks()); Console.WriteLine(Sherry.Speaks()); }
static void Main(string[] args) { Farm newFarm = new Farm(); Console.WriteLine("Welcome to Earl's Farm, here are some of our animals."); Goat Billy = new Goat("Billy, I say BAAAAAHHHAHAHAHAHA"); Ox Jerry = new Ox("Jerry, I say HHHHOOOOOOOOOOOOOOGGHHH"); Pig Tim = new Pig("Tim, I say Oink Oink Oink"); Sheep Sherry = new Sheep("Sherry, I say Baaaaahahaha"); newFarm.Speaks(Billy, Jerry, Tim, Sherry); }