问题基于没有数据库和SQL服务器的visual studio [英] Question based on visual studio without databases and SQL servers
问题描述
当投票过程结束时,每个候选人收到的投票数应显示在条形图中。此外,具有最高票数的候选人的姓名应显示为获胜者。
我尝试过的事情:
i必须在没有数据库和sql server的情况下执行此程序。实际上讲师要我使用数组。我使用listbox来添加候选人lstcandidate.Items.Add(txtname.Text)
但除此之外我不知道如何进行投票程序。可以有人帮忙。
我建议你和你的讲师谈谈你对作业缺乏了解。
他/她是了解您需要什么的最佳人选。没有我们。
您的数据主要是候选人姓名和学生ID。
您可以:
1)在源代码中硬编码代码。
2)在运行时键入它们。
3)将它们作为简单文本或xml存储在外部文件中。
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.
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.
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.
这篇关于问题基于没有数据库和SQL服务器的visual studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!