Advertisement
wingman007

C#_OOP_3a_Program.cs

Apr 15th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.52 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 App3a
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine(Human.PI);
  14.             Console.WriteLine(Human.onlyRead);
  15.             // int counter = 0;
  16.             Human person1 = new Human("Stoyan", 50);
  17.             // counter++;
  18.             Human person2 = new Human(20, "Ivan", "Pesho", "Nikola");
  19.            
  20.             // counter++;
  21.             Human person3 = new Human();
  22.             Human person4 = new Human();
  23.             // counter++;
  24.  
  25.             // Console.WriteLine("My name is {0}. I am {1} years old! My Balance is {2}.", person1.Name, person1.Age, person1.Balance);
  26.             // Console.WriteLine("My name is {0}. I am {1} years old!", person2.Name, person2.Age);
  27.  
  28.             Human.Nationality = "German";
  29.  
  30.             person1.IntroduceYourSelf("verbous");
  31.             person2.IntroduceYourSelf();
  32.             Console.WriteLine(person2.GetFriend(0));
  33.             person3.IntroduceYourSelf();
  34.  
  35.             IncreasePopulation();
  36.  
  37.             Console.WriteLine("The population is {0}", Human.counter);
  38.  
  39.             Console.WriteLine("National income is {0}", Human.CalculateNationalIncome());
  40.  
  41.             Console.WriteLine("Helo World!");
  42.             Console.Read();
  43.         }
  44.  
  45.         public static void IncreasePopulation()
  46.         {
  47.             Human person1 = new Human("Pesho", 15);
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement