Skip to content

Instantly share code, notes, and snippets.

@jtuttas
Created September 8, 2014 07:12
Show Gist options
  • Save jtuttas/17173a1b5bcdc91a86e0 to your computer and use it in GitHub Desktop.
Save jtuttas/17173a1b5bcdc91a86e0 to your computer and use it in GitHub Desktop.
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