Advertisement
wingman007

2018_Java_Executor

Oct 27th, 2018
710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. package com.coolcsn;
  2.  
  3. public class Executor {
  4.     private Introducable entity;
  5.  
  6.     public Introducable getStudent() {
  7.         return entity;
  8.     }
  9.  
  10.     public void setStudent(Introducable entity) {
  11.         this.entity = entity;
  12.     }
  13.  
  14.     public Executor(Introducable entity) {
  15.         this.entity = entity;
  16.     }
  17.  
  18.     public void makeItSpeak() {
  19.         System.out.println("---------------Hahaha I will make you speak!!!-------------------");
  20.         entity.introduceYourSelf();
  21.         System.out.println("---------------Hahaha I told you!!!-------------------");
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement