wingman007

OOP_20151b_Inheritance_Executor

Mar 21st, 2015
491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 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 Person1b
  8. {
  9.     class Executor
  10.     {
  11.         private Introducable entity;
  12.  
  13.         public Introducable Entity
  14.         {
  15.             get { return entity; }
  16.             set { entity = value; }
  17.         }
  18.  
  19.         public Executor(Introducable entity)
  20.         {
  21.             this.entity = entity;
  22.         }
  23.  
  24.         public void MakeHimSpeak()
  25.         {
  26.             entity.IntroduceYourSelf();
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment