Advertisement
wingman007

C#_OOP_1a_Program.cs

Apr 17th, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.60 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 App1a
  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.             // Console.WriteLine(person1.onlyRead);
  18.            
  19.             // counter++;
  20.             Human person2 = new Human(20, "Ivan", "Petko", "Nikola");
  21.             // counter++;
  22.             Human person3 = new Human();
  23.             // counter++;
  24.  
  25.             Human.Nationality = "German";
  26.  
  27. //            Console.WriteLine("My anme is {0}. I am {1} years old!", person1.Name, person1.Age);
  28. //            Console.WriteLine("My anme is {0}. I am {1} years old!", person2.Name, person2.Age);
  29.             // string verbous = "verbous";
  30.             person1.IntroduceYourself("dumm");
  31.             person2.IntroduceYourself();
  32.             Console.WriteLine("My friend is {0}", person2.GetFriend(0));
  33.             person3.IntroduceYourself();
  34.  
  35.             IncreasePopulation();
  36.             IncreasePopulation();
  37.  
  38.             Console.WriteLine("The population is {0}", Human.counter);
  39.  
  40.             Console.WriteLine("National Income {0}", Human.CalculateNationalIncome());
  41.  
  42.             Console.WriteLine("Hello World!");
  43.             Console.Read();
  44.         }
  45.  
  46.         public static void IncreasePopulation()
  47.         {
  48.             Human person1 = new Human("Peshko", 15);
  49.             //counter++;
  50.         }
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement