design a client/server system (TCP) in java that is composed of one server and a set of client programs

115 Views Asked by At

design a client/server system (TCP) in java that is composed of one server and a set of client programs. The server contains:

1- A thread to create an XML file according to some schema and able to insert data inside the XML file (this could be by a menu with a set of options).

2- Set of other threads that accept client connections and reply to them for their inquiries for some data in the XML file created by the thread described in point 1.

A sample client program is able to send a query for the server and displays the result for the user after getting a reply from the server.

For example:

When the server is executed, a menu is displayed containing the following options (this is related to the first thread):

1- Create an XML file.

2- Display the contents of the XML file.

3- Insert data in the XML file.

4- Exit

Enter a choice:

However, if the user selects 1, the server program creates the following schema in the XML file:

Student(ID, Name, Major, Email, Address) and inserts a sample data in it.

The clients, and after their connections with the server, will be able to ask the server to send them data according to their queries that could be: ID, Name, Major, Email, Address. Upon each of which, the server sends the client with all data appear in the XML.

0

There are 0 best solutions below