Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in java Ser 16, 2018 OBJECT-ORIENTED PROGRAMMING-C322 DESCRIPTIONS OF PROBLEM Veting Machine - A college would like to make an automat. The site will receive

image text in transcribed in java
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Ser 16, 2018 OBJECT-ORIENTED PROGRAMMING-C322 DESCRIPTIONS OF PROBLEM Veting Machine - A college would like to make an automat. The site will receive candidate's names and display the name to the vote. Then each voter should enter one choice at a time 1.2 or subject to the number of candidates. They wil calculate all choices made and will list up the result at the end of the voting session. Priorat the system will display the result in a harah SAMPLE OF OUTPUT: September 16, 2018 OBJECT-ORIENTED PROGRAMMING-CS102 PROBLEM SOLVING TIPS = Figuretat September 16, 2018 OBJECT-ORIENTED PROGRAMMING - CS102 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 same (Ctri-Z to end input candidates Candidate i Manal Candidate 2 : Khadijah Candidates : Wata 2. End entering candidate begin voting.. Tine start: 12:00100 (2) Manalto (2) Khadijah Your choice3 Next vote tyny (3) Wara: 0 3) Waa2 (3) Matar (3) Manal: (2) Khadijah: Your choicet Next votetyn : (3) Manal: 0 (2) Khadijah: Your choice! - Invalid choice (1) Kanal: 0 (2) Khadijato Your choice Next votetyity (3) Manal: 0 (21 Khadayahto Your choicet 2 Next votetyn (1) Manal: 0 (2) Khudsys Your choice: 2 Next vote (/) (2) Manal: 0 (2) Khadijah:2 End Voting session Time: 12:30:02 Final Result for Voting - Manal 2- Khadijah - Mata Total vote 5 1) Wafara September 16, 2018 OBJECT-ORIENTED PROGRAMMING - CS102] PROBLEM SOLVING TIPS: Initi candidate's name Continuen show invalid choice Continue ! yotes is not 1.2 or 31 Show the final votes for candidates Accept votes Show the current votes for candidates To continue or I vote is 1.2 or 31 Display graph based on votes Zo Figure 1- Program activity diagram September 16, 2018 OBJECT-ORIENTED PROGRAMMING - CS102 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 : Wata 2. End entering candidate Begin voting. Time start: 12:00:00 (1) Manal: 0 (2) Khadijah: Your choice: 3 Next vote fy): Y (3) Wara: (3) Wara: (1) Manal: 0 (2) Khadijah: 0 Your choice: 3 Next vote (y)! (1) Manal: 0 (2) Khadijah:0 Your choice: 4 - invalid choice (3) Wafa:2 (3) Wafa: 2 (1) Manalto (2) Khadijah:0 Your choice: 3 Next vote (y): Y (3) Wata: 3 (1) Manal: 0 (2) Khadijah: 0 Your choice: 2 Next vote fy): y (3) Wata: 3 (1) Manal: 0 (2) Khadijah:1 Your choice: 2 Next vote {y): (3) Wafa 3 (1) Manal: 0 (2) Khadijah:2 End Voting Session Time: 12:30:02 Final Result for Votang 1 - Manai 2- Khadijah 3- Manat Total voters: 5 Practical 4 S.H. Haris. Sem 171 September 16, 2018 OBJECT-ORIENTED PROGRAMMING - CS102] PROBLEM SOLVING TIPS: Initialize candidate's name Continue show invalid choice Continue yotes is not 1, 2 or 31 Show the final votes for candidates Accept votes Show the current votes for candidates To continuer not vote is 1.2013) Display graph based on votes Num a) Grade Im b) /im c) Figure 1. Program activity diagram Tips Declare a class Candidate in which will allow user to set name of every candidates and hold the status of ballot for a candidate. Deploy suitable constructoris). Include in the class set and get methods. Extend with one additional method showBar() that can display in bar chart for a candidate based on votes collected. Write a program that can execute and manipulate the object variable of candidates as reflected in the screen. Introduce an array of type Candidate in which can process candidate votes. Display a bar graph based on number of votes obtained during the voting session as reflected on the sample output Refer Figure 1 to write the main program / 5m c) /10m d) Total 20 m * Finally, submit your work on Blackboard at the link provided. Practical SH HS 171 Ser 16, 2018 OBJECT-ORIENTED PROGRAMMING-C322 DESCRIPTIONS OF PROBLEM Veting Machine - A college would like to make an automat. The site will receive candidate's names and display the name to the vote. Then each voter should enter one choice at a time 1.2 or subject to the number of candidates. They wil calculate all choices made and will list up the result at the end of the voting session. Priorat the system will display the result in a harah SAMPLE OF OUTPUT: September 16, 2018 OBJECT-ORIENTED PROGRAMMING-CS102 PROBLEM SOLVING TIPS = Figuretat September 16, 2018 OBJECT-ORIENTED PROGRAMMING - CS102 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 same (Ctri-Z to end input candidates Candidate i Manal Candidate 2 : Khadijah Candidates : Wata 2. End entering candidate begin voting.. Tine start: 12:00100 (2) Manalto (2) Khadijah Your choice3 Next vote tyny (3) Wara: 0 3) Waa2 (3) Matar (3) Manal: (2) Khadijah: Your choicet Next votetyn : (3) Manal: 0 (2) Khadijah: Your choice! - Invalid choice (1) Kanal: 0 (2) Khadijato Your choice Next votetyity (3) Manal: 0 (21 Khadayahto Your choicet 2 Next votetyn (1) Manal: 0 (2) Khudsys Your choice: 2 Next vote (/) (2) Manal: 0 (2) Khadijah:2 End Voting session Time: 12:30:02 Final Result for Voting - Manal 2- Khadijah - Mata Total vote 5 1) Wafara September 16, 2018 OBJECT-ORIENTED PROGRAMMING - CS102] PROBLEM SOLVING TIPS: Initi candidate's name Continuen show invalid choice Continue ! yotes is not 1.2 or 31 Show the final votes for candidates Accept votes Show the current votes for candidates To continue or I vote is 1.2 or 31 Display graph based on votes Zo Figure 1- Program activity diagram September 16, 2018 OBJECT-ORIENTED PROGRAMMING - CS102 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 : Wata 2. End entering candidate Begin voting. Time start: 12:00:00 (1) Manal: 0 (2) Khadijah: Your choice: 3 Next vote fy): Y (3) Wara: (3) Wara: (1) Manal: 0 (2) Khadijah: 0 Your choice: 3 Next vote (y)! (1) Manal: 0 (2) Khadijah:0 Your choice: 4 - invalid choice (3) Wafa:2 (3) Wafa: 2 (1) Manalto (2) Khadijah:0 Your choice: 3 Next vote (y): Y (3) Wata: 3 (1) Manal: 0 (2) Khadijah: 0 Your choice: 2 Next vote fy): y (3) Wata: 3 (1) Manal: 0 (2) Khadijah:1 Your choice: 2 Next vote {y): (3) Wafa 3 (1) Manal: 0 (2) Khadijah:2 End Voting Session Time: 12:30:02 Final Result for Votang 1 - Manai 2- Khadijah 3- Manat Total voters: 5 Practical 4 S.H. Haris. Sem 171 September 16, 2018 OBJECT-ORIENTED PROGRAMMING - CS102] PROBLEM SOLVING TIPS: Initialize candidate's name Continue show invalid choice Continue yotes is not 1, 2 or 31 Show the final votes for candidates Accept votes Show the current votes for candidates To continuer not vote is 1.2013) Display graph based on votes Num a) Grade Im b) /im c) Figure 1. Program activity diagram Tips Declare a class Candidate in which will allow user to set name of every candidates and hold the status of ballot for a candidate. Deploy suitable constructoris). Include in the class set and get methods. Extend with one additional method showBar() that can display in bar chart for a candidate based on votes collected. Write a program that can execute and manipulate the object variable of candidates as reflected in the screen. Introduce an array of type Candidate in which can process candidate votes. Display a bar graph based on number of votes obtained during the voting session as reflected on the sample output Refer Figure 1 to write the main program / 5m c) /10m d) Total 20 m * Finally, submit your work on Blackboard at the link provided. Practical SH HS 171

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

As a manager, which attribute would you most likely filter?

Answered: 1 week ago