Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started