How mckidono1405/ballet works
RankedBallot is a command-line ranked-choice election counter. A user selects a menu action; ballot-file loading parses ranked choices into ballot and candidate records held by the counter. Counting proceeds in rounds: the counter asks ballots for active choices, updates candidate tallies, and removes eliminated candidates from ballots. The user can then print round results to a file and the console, or clear the loaded election. The source excerpts show this workflow; no README documentation was provided.
Main entry points: BallotCounter.cpp Ballot counter · RankedBallot.cpp Menu and actions · Ballot.cpp Ranked ballot · Candidate.cpp Candidate tally
Components 8
Command-line interface
- Menu and actions
RankedBallot/RankedBallot/RankedBallot.cpp - Ballot file loader
RankedBallot/RankedBallot/RankedBallot.cpp
Election processing
- Ballot counter
RankedBallot/RankedBallot/BallotCounter.cpp
Election records
- Ranked ballot
RankedBallot/RankedBallot/Ballot.cpp - Candidate tally
RankedBallot/RankedBallot/Candidate.cpp
Other components
- User
- Ballot file
- Results destination
Connections 13
- User → Menu and actions: selects actions
RankedBallot/RankedBallot/RankedBallot.cpp - Menu and actions → Ballot file loader: loads ballots
RankedBallot/RankedBallot/RankedBallot.cpp - Ballot file loader → Ballot file: reads CSV
RankedBallot/RankedBallot/RankedBallot.cpp - Ballot file loader → Ballot counter: adds records
RankedBallot/RankedBallot/RankedBallot.cpp - Ballot file loader → Ranked ballot: creates ballot
RankedBallot/RankedBallot/RankedBallot.cpp - Ballot file loader → Candidate tally: creates candidates
RankedBallot/RankedBallot/RankedBallot.cpp - Menu and actions → Ballot counter: counts rounds
RankedBallot/RankedBallot/RankedBallot.cpp - Ballot counter → Ranked ballot: gets active vote
RankedBallot/RankedBallot/BallotCounter.cpp - Ballot counter → Candidate tally: updates tallies
RankedBallot/RankedBallot/BallotCounter.cpp - Ballot counter → Ranked ballot: eliminates choices
RankedBallot/RankedBallot/BallotCounter.cpp - Menu and actions → Ballot counter: prints results
RankedBallot/RankedBallot/RankedBallot.cpp - Ballot counter → Results destination: writes results
- Menu and actions → Ballot counter: clears election
RankedBallot/RankedBallot/RankedBallot.cpp