CS 742 - Computer Communication Networks - Program 1 - Name:_____________ Assigned: Wednesday, October 1, 2003 Due: Monday, October 27, 2003 (100 points) o Put your name and add some necessary comments into these code when necessary. These are a part of grading in this assignment. o Write one page document describing the programs you create and the user's guide. o Use the handin system to submit all code electronically. The submission ID is 1. ~cs742/bin/handin 1 server.c client.c inet.h Server.java Client.java ~cs742/bin/handin 1 Makefile Guide 1. Use C/C++ to Write a TCP client-server program that shows the date, who is who is logged on, and the message of the day of the server machine. The program also allows the client talk to the server. Once the client connect to the server, the server should display the following menu on the client: =================== Menu ==================== date - Print the system date and time who - Show who is logged on motd - Show the message of the day talk - Talk to the server quit - Quit the system ============================================= Enter command > The client should send a command to the server. Upon receipt of the request, the server should start a new process or thread to process the request. The new process or thread can re-direct standard output to the socket and execute the correct code. The code for each request can be done by running "/bin/date", "/usr/bin/who", and "cat /etc/motd". Refer to the template programs. If the server receives the talk command, the client and server can start to exchange the message. A possible talk session could look like: server> Welcome to the talk session. client> I'm testing my messager. server> I saw your message. client> My program works. server> We finally finish the assignment. client> Bye After typing "Bye" or "Ctrl-D" or any other command specified in your design, the client closes the talking session. Note: Use last five digital of SSN as your port number. (50 points) Note: The talk function is optional for undergraduate students and count 10 bonus points for undergraduate students. 2. Write the same program using Java. (50 points) 3. Allow C/C++ client to call Java server and Java client to call C/C++ server. (5 bonus points)