Question: please write a simple java program in bluej PROBLEM SOLVING TIPS: Initialize candidate's name Continue=ni show invalid choice Continue vi votes is not 1.2 or

PROBLEM SOLVING TIPS: Initialize candidate's name Continue=ni show invalid choice Continue vi votes is not 1.2 or 31 Show the final votes for candidates Accept votes Show the current votes for candidates To continue or not I vote is 1.200 31 Display graph based on votes Num a) Grade 71m b) 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 constructor(s). Include in the class set and get methods. Extend with one additional method show Bar() 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. 75m c) /10m d) /3m 1) Total 120 m 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-2 to end input candidates) : Candidate 1 Manal Candidate 2 : Khadijah Candidate 3: Wara *2. End entering candidate (3) Wara: 0 (3) Wara: (3) Wara: 2 133 Wata: 2 Begin voting.. Time start: 12:00:00 (1) Manal: 0 (2) Khadijah:0 Your choice: 3 Next vote ty): Y (1) Manal: 0 (2) Khadijah to Your choice: 3 Next vote fy): Y (1) Manal: 0 (2) Khadi 10 Your choice: 4 - Invalid chat.co (1) Manal: 0 (2) Khadijah to Your choice: 3 Next vote ty)Y (1) Manal: 0 (2) Khadijah:0 Your choice: 2 Next vote ty)! (1) Manal: 0 (2) Khadijahti Your choice: 2 Next vote ly): n (1) Manal: 0 (2) Khadijah: End Voting Session Time: 12:30:02 Final Result for Voting 1 - Manal 2- Khadijah 3- Manal Total voters 5 (3) Wata: 3 (3) Wata: 3 (3) Wafa: 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
