DESCRIPTIONS OF PROBLEM: Voting Machine - A college would like to make an automatic voting system. The system will receive 3 candidate's names and displays the name to the voters. Then each voter should enter one choice at a time 1, 2 or 3 subject to the number of candidates respectively. The system will calculate all choices made and will list up the result at the end of the voting session. Prior exit the system will display the result in a bar graph. SAMPLE OF OUTPUT: Enter candidates name (Ctrl-Z to end input candidates): Candidate 1 Manal Candidate 2 Khadijah Candidate 3: Wafa *z. End entering candidate Begin voting.. Time start: 12:00:00 (1) Manal: 0 Your choice: (2) Khadijah:0 (3) Wafa:0 3 Next vote (y/n): y (1) Manal: 0 (2) Khadijah:0 (3) Wafa:1 Your choice: 3 Next vote (y/n) : y (1) Manal: 0 (2) Khadijah:0 4 - invalid choice (3) Wafa:2 Your choice: (1) Manal:0 Your choice: 3 (2) Khadijah:0 (3) Wafa:2 Next vote (y/n): Y (1) Manal: 0 (2) Khadijah:0 (3) Wafa:3 Your choice: 2 Next vote (y/n): Y (1) Manal: 0 Your choice: (2) Khadijah:1 2. (3) Wafa:3 Next vote (y/n): n (1) Manal: 0 (2) Khadijah:2 (3) Wafa:3 End Voting Session Time: 12:30:02 Final Result for Voting 1- Manal I 2- Khadijah 3- Manal Total voters: 5
DESCRIPTIONS OF PROBLEM: Voting Machine - A college would like to make an automatic voting system. The system will receive 3 candidate's names and displays the name to the voters. Then each voter should enter one choice at a time 1, 2 or 3 subject to the number of candidates respectively. The system will calculate all choices made and will list up the result at the end of the voting session. Prior exit the system will display the result in a bar graph. SAMPLE OF OUTPUT: Enter candidates name (Ctrl-Z to end input candidates): Candidate 1 Manal Candidate 2 Khadijah Candidate 3: Wafa *z. End entering candidate Begin voting.. Time start: 12:00:00 (1) Manal: 0 Your choice: (2) Khadijah:0 (3) Wafa:0 3 Next vote (y/n): y (1) Manal: 0 (2) Khadijah:0 (3) Wafa:1 Your choice: 3 Next vote (y/n) : y (1) Manal: 0 (2) Khadijah:0 4 - invalid choice (3) Wafa:2 Your choice: (1) Manal:0 Your choice: 3 (2) Khadijah:0 (3) Wafa:2 Next vote (y/n): Y (1) Manal: 0 (2) Khadijah:0 (3) Wafa:3 Your choice: 2 Next vote (y/n): Y (1) Manal: 0 Your choice: (2) Khadijah:1 2. (3) Wafa:3 Next vote (y/n): n (1) Manal: 0 (2) Khadijah:2 (3) Wafa:3 End Voting Session Time: 12:30:02 Final Result for Voting 1- Manal I 2- Khadijah 3- Manal Total voters: 5
Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter19: Probabilistic Dynamic Programming
Section19.4: Further Examples Of Probabilistic Dynamic Programming Formulations
Problem 7P
Related questions
Question
Java
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Recommended textbooks for you
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning