write a Java RMI based program that simulates an election

In this assignment you are to 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, andannounce 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 theclient 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 to10 candidates. Then your program should generate valid voter IDs (define your own criteria for what a validvoter 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 the5 choices listed above or 0 to quit.1. Register to Vote2. Verify Voter3. Vote4. Tally Results5. Announce Winner0. QuitPlease Enter your Choice:The menu continues to be displayed as long as the voter has not selected the Quit option. So, each of theOperations can be done as many times as the user of the program choses.