Skip to content

Instantly share code, notes, and snippets.

@BrayanZ
Last active December 18, 2015 07:29
Show Gist options
  • Save BrayanZ/5746859 to your computer and use it in GitHub Desktop.
Save BrayanZ/5746859 to your computer and use it in GitHub Desktop.
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