In an instant runoff election, voters mark their favorite candidate on the ballot as well as two

Question:

In an “instant runoff” election, voters mark their favorite candidate on the ballot as well as two alternate candidates (in case their first or second choice does not win). When the ballots are counted, the candidate with the least votes is eliminated, and the ballots for that candidate are redistributed to the next alternate. The process repeats until all but two candidates are eliminated. The one with the most votes wins. Write a program that implements this system, reading ballots from a file. Use classes Candidate, Ballot, and Election.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: