C++ class to simulate an election