Question: You are required to build a client server system, utilizing the concept of threads. The proposed system is a voting system described as follows. The

You are required to build a client server system, utilizing the concept of threads.
The proposed system is a voting system described as follows.
The voting system has a multi-threaded Server and multi-threaded clients.
The server has a total of 2 threads, which receive and count the number of votes for the candidates
The number of voting people =1000.
The system works as follows:
1- The system has 5 candidates (C1, C2, C3, C4, C5) and 1000 voters (V1, V2,...{1000).
2- The voters use 10 voting stations. (Must use threads. Do not create 10 clients)
3- Two servers are used to serve the voting process (Must use threads. Do not create 2 servers)
4- Example:
a. Voter Thread (i): generates a vote for one of the 5 candidates.
b. The voter selects the candidate randomly.
c. After each vote, the voting station (thread) waits (delay) for X milliseconds. X is a random number between 5 and 10 milliseconds.
d. The voting process stops when the number of total votes received by the server is 1000.
e. The server must inform the voting station threads to stop generating votes and close.
f. The server shall print the number of votes received by each candidate.
g. Your output should be formatted as follows
//Total time of voting
//Number of votes received by candidates
Candidate Name Number of Vote
========================
C1 Number
C2 Number
C3 Number
C4 Number
C5 Number ?
?solve this quation in java (as a client server)

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!