问题基于没有数据库和SQL服务器的visual studio [英] Question based on visual studio without databases and SQL servers

查看:117
本文介绍了问题基于没有数据库和SQL服务器的visual studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

APU将为学生代表理事会组织一次新总统选举。编写程序(投票机)来处理选举。该计划应在提名时将每个候选人添加到系统中。提名过程完成后,学生应该能够一次接近一台计算机并选择他们选择的候选人。每位学生只允许为1名候选人投票,并附上身份证号码。如果找到身份证号码,则应显示相应的消息,通知学生他们不允许第二次投票。





当投票过程结束时,每个候选人收到的投票数应显示在条形图中。此外,具有最高票数的候选人的姓名应显示为获胜者。



我尝试过的事情:



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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆