Last active
December 18, 2015 07:29
-
-
Save BrayanZ/5746859 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IEmployee extends Feedable, Workable { | |
} | |
interface IWorkable { | |
public void work(); | |
} | |
interface IFeedable{ | |
public void eat(); | |
} | |
class Employee implements IWorkable, IFeedable{ | |
public void work() { | |
} | |
public void eat() { | |
//.... eating in launch break | |
} | |
} | |
class Robot implements IWorkable{ | |
public void work() { | |
} | |
} | |
class SuperEmployee implements IWorkable, IFeedable{ | |
public void work() { | |
} | |
public void eat() { | |
//.... eating in launch break | |
} | |
} | |
class Manager { | |
Workable employee; | |
public void setEmployee(Workable worker) { | |
employee=worker; | |
} | |
public void manage() { | |
employee.work(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment