@@ -0,0 +1,514 @@
+package edu.miamioh.cse283.htw;%0A%0Aimport java.io.*;%0Aimport java.net.*;%0A%0Apublic class SocketCommunicator %7B%0A%09protected Socket s;%0A%09protected BufferedReader in;%0A%09protected PrintWriter out;%0A%0A%09public SocketCommunicator(Socket s) throws IOException %7B%0A%09%09this.s = s;%0A%09%09in = new BufferedReader(new InputStreamReader(s.getInputStream()));%0A%09%09out = new PrintWriter(s.getOutputStream(), true);%0A%09%7D%0A%0A%09public void send(String msg) %7B%0A%09%09out.println(msg);%0A%09%7D%0A%0A%09public String receive() throws IOException %7B%0A%09%09return in.readLine();%0A%09%7D%0A%7D%0A

add socketcommunicator class to encapsulate socket based communications