Advertisement
Guest User

Untitled

a guest
Sep 12th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ZooTrainer
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. Animal[] zoo = new Animal[] {
  14. new Cat("Meowo", 3),
  15. new Dog("Balo", 5),
  16. new Cat("Sivomeow", 6),
  17. new Dog("Doggo", 2)
  18. };
  19.  
  20. foreach (var animal in zoo)
  21. {
  22. Console.WriteLine(animal);
  23. Console.WriteLine(animal.MakeNoise());
  24. Console.WriteLine(animal.MakeTrick());
  25. Console.WriteLine(animal.GenerateSpecialTrick());
  26. Console.WriteLine(animal.GenerateSeriesOfNoise());
  27.  
  28. }
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement