Advertisement
wingman007

Java2014OOP_Coach

Dec 6th, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6.  
  7. package zoo;
  8.  
  9. /**
  10.  *
  11.  * @author fmi
  12.  */
  13. public class Coach {
  14.     private Noisable entity;
  15.  
  16.     public Noisable getEntity() {
  17.         return entity;
  18.     }
  19.  
  20.     public void setEntity(Noisable entity) {
  21.         this.entity = entity;
  22.     }
  23.  
  24.     public Coach(Noisable entity) {
  25.         this.entity = entity;
  26.     }
  27.    
  28.     public void makeItSpeak()
  29.     {
  30.         entity.makeNoise();
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement