Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Person1b
- {
- class Program
- {
- static void Main(string[] args)
- {
- // int counter = 0;
- Person person1 = new Person("Stoyan", 50);
- // counter++;
- Person person2 = new Person(20, "Valya");
- // counter++;
- Person person3 = new Person();
- // counter++;
- // person1.Name = "Stoyan";
- // person1.Age = 50;
- // person2.Name = "Valya";
- // person2.Age = 20;
- // Console.WriteLine("My name is {0}!. I am {1} years old!", person1.Name, person1.Age);
- // Console.WriteLine("My name is {0}!. I am {1} years old!", person2.Name, person2.Age);
- // Console.WriteLine("My name is {0}!. I am {1} years old!", person3.Name, person3.Age);
- Person.nationality = "German";
- person1.IntroduceYourSelf();
- person2.IntroduceYourSelf();
- person3.IntroduceYourSelf();
- // Console.WriteLine("The population is {0}", counter);
- Person student1 = new Student("Kircho", 25, 123456);
- student1.IntroduceYourSelf();
- // Console.WriteLine(student1);
- Athlete athlete1 = new Athlete("Krisi", 25, "box");
- athlete1.IntroduceYourSelf();
- // Executor exec1 = new Executor((Student)student1);
- Executor exec1 = new Executor(student1);
- exec1.MakeHimSpeak();
- Console.WriteLine("The population is {0}", Person.counter);
- Console.WriteLine("Hello!");
- Console.Read();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement