Click here to Skip to main content
15,921,113 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
APU is going to organize an election of a new president for student representative council. Write a program (a voting machine) to handle the election. The program should add each candidate to the system as he or she is nominated. After the nomination process is completed, students should be able to approach the computer one at a time and select on the candidate of their choice. Each student is only allowed to vote for 1 candidate with their ID number. If the ID number is found, an appropriate message should be displayed to inform the student that they are not allowed to vote the second time.


When the voting process is finish, the number of votes received by each candidate should be displayed in a bar chart. Also, the name of the candidate with the highest number of votes should be displayed as the winner.

What I have tried:

i have to do this program without database and sql server. actually the lecturer wants me to it using arrays. i used listbox to add the candidates lstcandidate.Items.Add(txtname.Text)
but apart from this im clueless of how to conduct the voting procedure. can someone help.
Posted
Updated 24-Jul-16 17:25pm
v2

I suggest you speak to your lecturer about your lack of understanding of the assignment.

He/She is the best person to understand what is required of you. No us.
 
Share this answer
 
Your data is mainly Candidate names and student Id.
You can:
1) Hard code them in source code.
2) Key in them at runtime.
3) Store them in an external file as simple text or xml.
 
Share this answer
 
Comments
[no name] 24-Jul-16 22:17pm    
what about the voting procedure then
Patrice T 24-Jul-16 22:28pm    
You decide !
You can store votes and voter id in an array or a file.
[no name] 24-Jul-16 22:47pm    
that is my issue bro, i dont know how to store it in array form. im not counting the total votes but the vote received by each candidate. Can you let me know the coding for it if you dont mind.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900