Please type or write your answers to the questions and email them with CSCD330-Lab 3 in the subject line.
Note: The application is a KnockKnock joke generator where the client connects to the server and you ask it a KnockKnock joke.
The joke protocol goes like this:
Server: "Knock knock!"
Client: "Who's there?"
Client: "Dexter who?"
Server: "Dexter halls with boughs of holly."
1. Download the KnockKnockServer.java file from our class Website
Knock Knock Server
File name: http://penguin.ewu.edu/cscd330/Labs/KnockKnockServer.java. Save this File as KnockKnockServer.java
2. Copy and paste the client code from the following link. Client code is here: Client Code for Lab. Save it in a file called KnockKnockClient.java
Compile the .java files.
3. Open up two windows on your local machine and communicate between client and server using the KnockKnock protocol. In other words, tell jokes.
4. Optional, you can change the jokes if you like.
5. If you are in the Lab, you can trade IP addresses with a neighbor and recompile your Client programs. Now one of you start up the server and one start his/her client. Tell jokes between machines. Then, reverse the process and do it again to get the feel of connecting to a Server on a different machine. If you are doing the lab at home, just skip this step.
After getting the chance to try out both the client and server KnockKnock programs, answer the questions below.