Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java GUI program Assignment Tasks You are asked to develop a Server program running on one computer, and a Client program running on another

Using Java GUI program

Assignment Tasks

You are asked to develop a Server program running on one computer, and a Client program running on another computer. (When you test your server and client programs on one computer, you may use Loopback IP Address 127.0.0.1, with which any packets sent out from this machine will immediately loop back to itself.) The Server will accept input from keyboard for system initialization, selection of menu items, human command and instructions, etc. It will also display information on the monitor, periodically send commands to the Client, and receive feedback from the Client. After receiving a command from the Server, the Client will send feedback to the Server, and displays some information of your interest.

Assignment tasks are described below:

(1) When the Server is started, it initializes the settings of the servers IP addresses, port Server Keyboard Monitor Client TCP/IP Port No.: 3247 Monitor Keyboard 3 number, and the clients IP address, etc., through command window arguments, e.g., header file, arguments to main(), keyboard input, or input from a configuration file which is a pure text file.

(2) Every 3 seconds, the Server sends the Client a command to ask for data, e.g., through a single letter R or r (request). (Timing control is required here. Using our examples in the lecture materials if you like.)

(3) After receiving the command from the Server, the Client sends back to the Server an ACK consisting of the clients time (hh:mm:ss:???) and a random integer number between 0 and 100 with a uniform distribution. The Client may also display some useful information on its monitor. (Use a random generator to generate such random numbers. For example, rand()%101 and use srand(time(NULL)) to get a seed for rand(), where time() function is defined in header file time.h).

(4) The Server gets the feedback from the Client, and display the result.

(5) The Server reads keyboard input of various command and instructions. An obvious command is to terminate the Server program, e.g., using a single letter E or e (exit). When the Sever is to be terminated, the Server should also notify the Client of the Servers termination so that the Client also terminates properly.

image text in transcribed

Monitor Monitor TCP/IP Server Client Port No.: 3247 Keyboard Keyboard

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

Question Who can establish a Keogh retirement plan?

Answered: 1 week ago