Question: votes - 1 . txt votes - 2 . txt votes - 3 . txt votes - 4 . txt votes - 5 . txt
votestxt
votestxt
votestxt
votestxt
votestxt
In JAVA using ArrayScannerbeginner java code. Write a program that reads voting data from a file and then shows the result.
Display the total number of votes received for Mahatma Gandhi, Mother Teresa, and Nelson Mandela. Ignore any other candidate.
Test Case
Enter the name of the file with votes: votestxt enter
Voting Results:
Mahatma Gandhi: votes
Mother Teresa: votes
Nelson Mandela: votes
Test Case
Enter the name of the file with votes: votestxt enter
Voting Results:
Mahatma Gandhi: votes
Mother Teresa: votes
Nelson Mandela: votes
Test Case
Enter the name of the file with votes: votestxt enter
Voting Results:
Mahatma Gandhi: votes
Mother Teresa: votes
Nelson Mandela: votes
Test Case
Enter the name of the file with votes: votestxt enter
Leonardo da Vinci is not a valid candidate.
Rosa Parks is not a valid candidate.
Rosa Parks is not a valid candidate.
Rosa Parks is not a valid candidate.
Rosa Parks is not a valid candidate.
Voting Results:
Mahatma Gandhi: votes
Mother Teresa: votes
Nelson Mandela: votes
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
