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 World1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("My PI = {0}", Person.PI);
- Console.WriteLine("Only for read = {0}", Person.onlyRead);
- // int counter = 0;
- Person person1 = new Person("Stoyan");
- // person1.Name = "Stoyan";
- // person1.Age = 51;
- // counter++;
- Person person2 = new Person(20, "Mario", "Bobi", "Kristian", "Stoyan", "Anton");
- // person2.Name = "Mario";
- // person2.Age = 20;
- // counter++;
- Person person3 = new Person();
- // counter++;
- IncreasPopulation();
- person1.IntroduceYourSelf();
- person2.IntroduceYourSelf();
- person3.IntroduceYourSelf();
- Person.Nationality = "German";
- person1.IntroduceYourSelf();
- person2.IntroduceYourSelf();
- person3.IntroduceYourSelf();
- // Console.WriteLine("The population of my kingdom is {0}", counter);
- Console.WriteLine("The population of my kingdom is {0}", Person.Counter);
- Console.WriteLine("National Income = {0}", Person.GetNationalIncome());
- Person student1 = new Student("Kircho", 25, "4314324234");
- student1.IntroduceYourSelf();
- Student student2 = new Student();
- Athlete athlete1 = new Athlete("Krisi", 25, "box");
- athlete1.IntroduceYourSelf();
- Executor exec = new Executor(student1);
- exec.MakeHimSpeak();
- Console.WriteLine(student1); // .ToString()
- /*
- 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 IncreasPopulation()
- {
- Person person1 = new Person("Petko", 15);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment