Question: Draw a flowchart and write a program in java that allows the user to enter the last names of five candidates in an election and
Draw a flowchart and write a program in java that allows the user to enter the last names of five candidates in an election and the number of votes received by each candidate. The program then outputs each candidate's name, the number of votes received by the candidate. The program also outputs the winner of the election. Use three arrays: one array to store the candidates name, one array to store the number of votes.
Must use the following 4 methods for this program:
A method for inputing the names and votes (create the scanner object in this method) received by each candidate.
A method that returns the total votes,
A method that returns the percentage of total votes received by each candidate.
A void method that displays the result (names, votes, percentage of total votes, total votes, winner)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
