Question
C++ preferably using Codeblocks Instead of a dynamic array to store the list of user ID's for each computer station, use a linked list. The
C++ preferably using Codeblocks
Instead of a dynamic array to store the list of user ID's for each computer station, use a linked list. The node for the lists should contain the station number and user ID of the person logged in on that station. If nobody is logged on to a computer station, then no entry should exist in the linked list for that computer station.
Here is the original assignment
To combat election fraud, your city is instituting a new voting procedure. The ballot has a letter associated with every selection a voter may make. A sample ballot is shown:-
(Voter places a tick next to his or her preferred candidate, proposition and measure to indicate his/her vote)
1. VOTE FOR MAYOR
A. Pincher, Penny
B. Dover, Skip
C. Perman, Sue
2. PROPOSITION 17
D. YES
E. NO
3. MEASURE 1
F. YES
G. NO
4. MEASURE 2
H. YES
I NO
After submitting the ballot, every voter receives a receipt that has a unique ID number and a record of the voting selections. For example, a voter who submits a vote for Sue, Perman, Yes on Proposition 17, No on Measure 1 and Yes on Measure 2 might receive a receipt with:-
ID 4925 : CDGH
The next day, the city posts all votes on its web page sorted by ID Number. This allows a voter to confirm their submission and allows anyone to count the vote totals for themselves. A sample list of for the sample ballot is shown below:-
ID | VOTES |
4925 | CDGH |
4926 | AEGH |
4927 | CDGI |
4928 | BEGI |
4929 | ADFH |
Write a program that reads the posted voting list from a file named list.txt (file included as part of Week 4 Assessments) and outputs the percent of votes cast for each ballot item.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started