Advertisement
wingman007

C#_OOP_2b_Program.cs

Mar 23rd, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace OOP9
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Console.WriteLine(Days.Chetwyrtyk);
  13.             Console.WriteLine(Days.Chetwyrtyk is Days);
  14.             Console.WriteLine((int)Days.Chetwyrtyk);
  15.  
  16.             Console.WriteLine(Human.PLANET);
  17.             // Console.WriteLine("Earth");
  18.  
  19.             Console.WriteLine(Human.humanType);
  20.            
  21.             // Console.WriteLine("Brain Size: {0}", Human.BrainSize.Large);
  22.  
  23.             Human human1 = new Human();
  24.  
  25.             human1.Speak();
  26.  
  27.             Human.Brain brain = new Human.Brain((int)Human.BrainSize.Large);
  28.  
  29.  
  30.             Student student = new Student("Stoyan", 20, 2342);
  31.  
  32.             Manager<Student> manager = new Manager<Student>();
  33.  
  34.             manager.Add(student);
  35.             manager.Add(new Student("Filip", 20, 1234));
  36.             manager.Add(new Student("Daniel", 20, 432));
  37.             manager.Add(new Student("Galin", 20, 54654));
  38.             manager.Add(new Student("Peter", 20, 23432));
  39.             // manager.Add(new Student("Stefan", 20, 31232));
  40.             manager.Remove();
  41.             Console.WriteLine("Manager!!! I have {0}.", manager.GetNumberOfEntities());
  42.  
  43.             Manager<Athlete> trainer = new Manager<Athlete>();
  44.             trainer.Add(new Athlete("Filip", 20, "Futbol"));
  45.             trainer.Add(new Athlete("Stoyan", 50, "Futbol"));
  46.             trainer.Add(new Athlete("Peter", 20, "Futbol"));
  47.             trainer.Remove();
  48.             Console.WriteLine("Trainer!!! I have {0}.", trainer.GetNumberOfEntities());
  49.  
  50.             Console.Read();
  51.         }
  52.     }
  53.  
  54.     enum Days
  55.     { Ponedelnik = 100, Wtronik, Srqda, Chetwyrtyk = 400, Petxk, Sxbota, Nedelq}
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement