Question: QUID: Write the ServerService class below for a multithreaded voting server running a TCP service on local host with port 1234. The client once connected,

 QUID: Write the ServerService class below for a multithreaded voting server

QUID: Write the ServerService class below for a multithreaded voting server running a TCP service on local host with port 1234. The client once connected, it receives from the server the message "Enter your vote: agree, disagree, or neutral". The client displays the message on screen, enters based on the recelving client's vote, the server increments maintains three voting counters and server sends to the client a message showing the current one of these counters. Eventually, the displays that message on the screen. public class Serverservice extends Thread f BufferedReader reader = nu11; Printwriter output = nu11; Socket client = nu1l; I/ Add Serverservice class constructor publicvoidrun(){try{//writeyourservicecodehere \} catch (Exception e) \{ e.printstackTrace(); \} finally \{ try { client.close(); reader.close(); output.close(); \} catch (Exception e) \{ System.err.println(e); \}

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!