wingman007

OOP_2015_Animals_Coach

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