@@ -0,0 +1,1198 @@
+%0Aimport java.net.*;%0Aimport java.io.*;%0A%0Apublic class Client%7B%0A%09public static void main(String args%5B%5D)%7B%0A%09%09Socket socket = null;%0A%09%09int portNumber = 1777;%0A%09%09Packet p = new Packet(%22Hello%22);%0A%09%09String HOST = %22www.server.com%22;%0A%0A%09%09try %7B%0A%09%09%09socket = new Socket(HOST, portNumber);%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09ObjectInputStream ois = null;%0A%09%09try %7B%0A%09%09%09ois = new ObjectInputStream(socket.getInputStream());%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09ObjectOutputStream oos = null;%0A%09%09try %7B%0A%09%09%09oos = new ObjectOutputStream(socket.getOutputStream());%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%0A%09%09try %7B%0A%09%09%09oos.writeObject(p);%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09String response = null;%0A%09%09try %7B%0A%09%09%09response = (String) ois.readObject();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D catch (ClassNotFoundException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09System.out.println(response);%0A%0A%09%09try %7B%0A%09%09%09ois.close();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09try %7B%0A%09%09%09oos.close();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09try %7B%0A%09%09%09socket.close();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Create Client.java