Advertisement
wingman007

Java2014OOP_Executor

Dec 6th, 2014
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 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 myworld;
  8.  
  9. /**
  10.  *
  11.  * @author fmi
  12.  */
  13. public class Executor {
  14.     private Introducable person;
  15.  
  16.     public Introducable getIntroducable() {
  17.         return person;
  18.     }
  19.  
  20.     public void setIntroducable(Introducable person) {
  21.         this.person = person;
  22.     }
  23.  
  24.     public Executor(Introducable person) {
  25.         this.person = person;
  26.     }  
  27.    
  28.     public void makeHimSpeak() {
  29.         person.introduceYorSelf();
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement