Question: Write a program called Electionstatistics that accepts as user input the names of three political parties and the number of votes each received in the
Write a program called Electionstatistics that accepts as user input the names of three political parties and the number of votes each received in the last mayoral election. Display the percentage of the vote each party received.
An example of the program is shown below:
Enter name for first party Surprise party
Enter votes received
Enter name for second party Pool party
Enter votes received
Enter name for third party House party
Enter votes received
The Surprise party got percent of the vote
The pool party got percent of the vote
The House party got percent of the vote
Task : Create the Electionstatistics class.
Task : The Electionstatistics program accepts the votes received for three political parties and displays the percent of the total each party received.
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
