Question: JAVA - Sockets (Netbeans) 1. NameLookupClient.java Using the Client.java example code as a guide and the concepts we discussed in class, create a client program

JAVA - Sockets (Netbeans)

1. NameLookupClient.java Using the Client.java example code as a guide and the concepts we discussed in class, create a client program named NameLookupClient. This program will look very similar to the original Client program but will prompt the user for a student number (see below). The client will send this student number to the NameLookupServer and then display what the server sends back.

The Client has a GUI and the client stays in a loop prompting the user for input and sending messages until the user shuts down the client.

2. NameLookupServer.java Using the Server.java example code as a guide and the concepts we discussed in class, create a server program named NameLookupServer. This program will listen on a socket for a client to connect and then send a message. The message will consist of a Student ID number (see below). The server will look up this number and then return the Student name to the client.

The server will display its conversation with the client (messages received and sent) on the command line or in a GUI. If the student ID number is not found, the server will return a student name of "Not Found".

3. Hint: One way of designing the server would be to use parallel arrays.

Student data. The student data that the server should house is the following:

7000123 John Doe

7000453 Mary Smith

7000677 G. Washington

7000799 B. Franklin

7000388 B. Ford

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!