wingman007

C#_OOP_Abstraction_Encapsulation_Polymorphism_Executor.cs

May 20th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 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 App2b
  8. {
  9.     class Executor
  10.     {
  11.         private Introducable person;
  12.  
  13.         public Introducable Person
  14.         {
  15.             get { return person; }
  16.             set { person = value; }
  17.         }
  18.  
  19.         public Executor(Introducable person)
  20.         {
  21.             this.person = person;
  22.         }
  23.  
  24.         public void MakeHimSpeak()
  25.         {
  26.             Console.WriteLine("====== I am an Excutor!!! Confest!!! ===");
  27.             person.IntroduceYourSelf();
  28.             Console.WriteLine("Hahhaah!!!");
  29.         }
  30.     }
  31. }
Add Comment
Please, Sign In to add comment