Created
February 3, 2017 17:43
-
-
Save ifucolo/0ab288ae871ed02b6ba28088f725babd 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 IProgram { | |
public void work(); | |
} | |
class Program implements IProgram{ | |
public void work() { | |
// ....code | |
} | |
} | |
class SuperProgram implements IProgram{ | |
public void work() { | |
//....code | |
} | |
} | |
class Engineer{ | |
IProgram program; | |
public void setProgram(IProgram p) { | |
program = p; | |
} | |
public void manage() { | |
program.work(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment