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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Java
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
(3) Wafa:0
Next vote (y/n): y
(1) Manal: 0
(2) Khadijah:0
(3) Wafa:1
Your choice:
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:
Next vote (y/n): y
(1) Manal:0
Your choice:
(2) Khadijah:1
(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
1***
Total voters: 5
Transcribed Image Text: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 (3) Wafa:0 Next vote (y/n): y (1) Manal: 0 (2) Khadijah:0 (3) Wafa:1 Your choice: 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: Next vote (y/n): y (1) Manal:0 Your choice: (2) Khadijah:1 (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 1*** Total voters: 5
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education