Created
June 10, 2013 05:59
-
-
Save BrayanZ/5746804 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { | |
public void work(); | |
public void eat(); | |
} | |
class Employee implements IEmployee{ | |
public void work() { | |
} | |
public void eat() { | |
// ...... eating in launch break | |
} | |
} | |
class AnotheKindOfEmployee implements IEmployee{ | |
public void work() { | |
} | |
public void eat() { | |
//.... eating in launch break | |
} | |
} | |
class Manager { | |
IEmployee employee; | |
public void setEmployee(IEmployee employee) { | |
this.employee=employee; | |
} | |
public void manage() { | |
worker.work(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment