Advertisement
wingman007

2018OOPExecutor

May 2nd, 2018
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 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 WorldITMOMIM
  8. {
  9.   class Executor
  10.   {
  11.     private IIntroducable entity;
  12.  
  13.     public IIntroducable Entity
  14.     {
  15.       get { return entity; }
  16.       set { entity = value; }
  17.     }
  18.  
  19.     public Executor(IIntroducable entity)
  20.     {
  21.       this.entity = entity;
  22.     }
  23.  
  24.     public void MakeItSpeak()
  25.     {
  26.       Console.WriteLine("========== Hahaha I will make you speak! ================");
  27.       entity.IntroduceYourSelf();
  28.       Console.WriteLine("======= I told you ======");
  29.     }
  30.   }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement