Created
September 8, 2014 07:12
-
-
Save jtuttas/17173a1b5bcdc91a86e0 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
public class Main { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
Client c1 = new Client("Thomas","mmbbs"); | |
Client c2= new Client("Frank","mbs"); | |
Client c3= new Client("Simone","mmbbs"); | |
Server s = new Server(); | |
s.addObserver(c1); | |
s.addObserver(c2); | |
s.addObserver(c3); | |
s.sendChat(new Message("","Nun sind alle da")); | |
s.deleteObserver(c1); | |
s.sendChat(new Message("","Nun ist einer weg")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment