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 23
Enter name for second party Pool party
Enter votes received 87
Enter name for third party House party
Enter votes received 55
The Surprise party got 13.939393939393941 percent of the vote
The pool party got 52.72727272727272 percent of the vote
The House party got 33.33333333333333 percent of the vote
Task 01: Create the Electionstatistics class.
Task 02: The Electionstatistics program accepts the votes received for three political parties and displays the percent of the total each party received.
 Write a program called Electionstatistics that accepts as user input the

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!