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 multithreaded Server and multithreaded clients.
The server has a total of threads, which receive and count the number of votes for the candidates
The number of voting people
The system works as follows:
The system has candidates C C C C C and voters V V
The voters use voting stations. Must use threads. Do not create clients
Two servers are used to serve the voting process Must use threads. Do not create servers
Example:
a Voter Thread i: generates a vote for one of the 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 and milliseconds.
d The voting process stops when the number of total votes received by the server is
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
C Number
C Number
C Number
C Number
C 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
