Question: write a Java RMI based program that simulates an election process. Your remote interface must have the methods: register voter, verify voter, vote, tally results,

write a Java RMI based program that simulates an election process. Your remote interface must have the methods: register voter, verify voter, vote, tally results, and announce winner. 1. The register voter methods should take as parameters a name, and assign a voter ID from a list of valid voter IDs (Each of you decides the criteria of a valid voter ID, it needs to be a format that your system generates and accepts, be innovative here). 2. The verify voter method takes a voter ID as input and verifies if the voter with the voter ID is registered and under what name? However it should not allow the voter to vote if they have voted before. 3. The vote method should allow a voter to cast a single vote for a single candidate. 4. The tally results, should return the votes each of the candidates received to be displayed by the client. 5. Announce winner should just return the election winner's name. You are to write a client/server RMI application that takes handles this system, so you'll need both the client and the server in addition to the remote custom interface. Your program should start by loading a file with candidate names (Supply as input), it should handle up to 10 candidates. Then your program should generate valid voter IDs (define your own criteria for what a valid voter ID is). They system should allow for up to 1000 voters. Then once the system starts, a menu should be displayed to ask the user to either input one of the 5 choices listed above or 0 to quit. 1. Register to Vote 2. Verify Voter 3. Vote 4. Tally Results 5. Announce Winner 0. Quit Please Enter your Choice: The menu continues to be displayed as long as the voter has not selected the Quit option. So, each of the Operations can be done as many times as the user of the program choses.

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!