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 World2
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("The value of PI is {0}", Person.PI);
- Console.WriteLine("onlyRead = {0}", Person.onlyRead);
- // int counter = 0;
- Person person1 = new Person("Stoyan", 51);
- // counter++;
- // person1.Name = "Stoyan";
- // person1.Age = 51;
- Person person2 = new Person(18, "Maria");
- // counter++;
- // person2.Name = "Maria";
- // person2.Age = 18;
- Person person3 = new Person();
- // counter++;
- person1.IntroduceYourSelf();
- person2.IntroduceYourSelf();
- person3.IntroduceYourSelf();
- Console.WriteLine("Only read for person1 {0}", Person.onlyRead);
- Console.WriteLine("Only read for person2 {0}", Person.onlyRead);
- Person.Nationality = "German";
- person1.IntroduceYourSelf();
- person2.IntroduceYourSelf();
- person3.IntroduceYourSelf();
- IncreasePopulation();
- Console.WriteLine("The national income is {0}", Person.CalculateNationalIncome());
- Console.WriteLine("The population is {0}", Person.Counter);
- Person student1 = new Student("Kircho", 25, "1234123231"); //
- student1.IntroduceYourSelf();
- Student student2 = new Student();
- Athlete athlete1 = new Athlete("Krisi", 25, "box");
- Console.WriteLine(athlete1);
- Executor exec = new Executor(student1);
- exec.MakeHimSpeak();
- // Console.WriteLine("My name is {0}. I am {1} years old! My balance is {2}",
- // person1.Name, person1.Age, person1.Balance);
- // 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);
- }
- private static void IncreasePopulation()
- {
- Person petko = new Person("Petko", 18);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment