This project is a C++ simulation of a parliamentary election system where multiple political factions compete across electoral divisions using candidate-based voting dynamics. The simulation models campaign events, voter influence, and final election outcomes across multiple rounds.
Factions are inspired by fictional One Piece crews (used as thematic placeholders for political parties).
- Multi-party election simulation
- Division-based voting system
- Candidate and leader influence modeling
- Randomized campaign events affecting popularity and stances
- Score-based election outcome calculation
- Detection of majority win or hung parliament
main.cpp→ program entry point and argument handlingheader.h→ class declarationsCampaign.cpp→ simulation logic and campaign flowmemberFunctions.cpp→ class implementations
The system design is illustrated below:
- Object-Oriented Programming (inheritance, encapsulation)
- Multi-class system design
- Randomized simulation (normal & uniform distributions)
- Nested iteration over hierarchical data (parties → candidates → stances → divisions)
- Weighted scoring model for election results
The implementation prioritizes correctness and simulation behavior over performance optimization. Some sections use nested loops and iterative computation which could be refactored for efficiency in larger-scale systems.
- Designing multi-class C++ systems
- Structuring simulation-based applications
- Managing complex data relationships
- Applying probability and randomness in modeling real-world systems
- Building and organizing multi-file C++ projects
