Question: First, get the code from the zip file working on your machine. If you can, work with someone else ( or with two machines )

First, get the code from the zip file working on your machine. If you can, work with someone else (or with two machines) and see if you can get the
client to run on one box and communicate with the server on another. In your PDF, assume that you have deployed the client and server to two
separate nodes (machines).
Use diagrams to communicate the three kinds of structures involved in your client/server system that tells knock-knock jokes.
Create a diagram for each of the three structure types in the definition of software architecture (see figures 1.2-1.10).
You can use any tool that supports UML, like lucidchart, Visio,
draw.io, etc.
Upload a single PDF document.import
java.io.*;
import
java.net.*;
public class KnockKnockClient {
Run | Debug
public static void main(String[] args) throws IOException {
Socket kkSocket = null;
PrintWriter out = null;
BufferedReader in = null;
kkSocket = new Socket (host:"taranis", port:4444);
out = new PrintWriter(kkSocket.getOutputStream(), autoFlush:true);
in = new BufferedReader(new InputStreamReader(kkSocket.getInputStream()));
} catch (UnknownHostException e){
System.err.println(x:"Don't know about host: taranis.");
System. exit (status:1);
} catch (IOException e){
System.err.println(x:"Couldn't get I/0 for the connection to: taranis.");
System. exit (status:1);
}
BufferedReader stdIn = new BufferedReader(new InputStreamReader(
System.in));
String fromServer;
String fromUser;
while ((fromServer = in. readLine())!= null){
System. out.println("Server: "+ fromServer);
if (fromServer.equals (anObject:"Bye."))
break;
fromUser = stdIn. readLine ();
if (fromUser != null){
System. out.println("Client: "+ fromUser);
out.print ln(fromUser);
}
}
out. close();
in. close();
stdin. close();
kkSocket.close();
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!