Advertisement
svetoslavhl

Program.cs

Apr 16th, 2014
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 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 OOP3
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. Introducable human1 = new Human("Stoyan", 51);
  14. // Human ivan = new Human("Ivan", 16);
  15. Human.Nationality = "German";
  16.  
  17. Introducable student1 = new Student("Ivan", 25, 12334);
  18. Introducable athlete1 = new Athlete("Petko", 25, "Futbol");
  19.  
  20. human1.introduceYourSelf();
  21. student1.introduceYourSelf();
  22. athlete1.introduceYourSelf();
  23.  
  24. Manager manager = new Manager(human1);
  25. manager.MakeHimIntroduceHimSelf();
  26. manager.Entity = student1;
  27. manager.MakeHimIntroduceHimSelf();
  28. manager.Entity = athlete1;
  29. manager.MakeHimIntroduceHimSelf();
  30.  
  31. DoSomething();
  32.  
  33. Console.WriteLine("The population of our virtual world is {0}", Human.Population);
  34.  
  35. Console.Read();
  36. }
  37.  
  38. static void DoSomething()
  39. {
  40. Human petko = new Human("Petko", 12);
  41. Human stoyan = new Human("Stoyan", 51);
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement