CS 230 Fall 2006                                                Assignment 9 – Files                                                                                        100 points

Assigned: 11/01/2006

Due: 11/10/2006 at the start of class (Note, we will have a new assignment for lab on 11/9)

 

Pre-Lab (Do Before Lab):  Bring a new disk. Plan out tasks, objects, and events needed for program. Plan out major pseudocode

 

Main Assignment:

E-Vote Inc is working on a new program to cash in on the electronic voting era. Your program is a simplification dealing with voting for one office. The program should get from a file (voters.txt) a list of voter Ids and voter names and display them in a list box. It should also get from another file (candidates.txt) a list of candidates and put them in a list box or combo box. When the user selects a voter from the voter list box, their information should be displayed in read-only text boxes or in labels. When a user then selects the candidate from the combo box (or list box) AND selects a “Vote” button, write the vote (voterId, name and candidate selected) to a comma-delimited text file for later tabulation (add it to those already in the file), and remove the voter from the list box of eligible voters. (DO NOT have the vote recorded immediately upon selection in case of inadvertent click). Provide the vote capability and an exit capability.

 

Hand in:

 

Miscellaneous:

·         MAKE SURE YOUR PROGRAM WORKS!

·         Put YOUR NAME, e-mail address, date, and purpose of the program in comments at the beginning of the program.

·         You MUST include comments that explain your program in order to get full credit.

·         Remember to use meaningful variable names, and indent to show the structure of the program (VB usually does this correctly).

·         Put your name on the form as a Label or as part of the form title.

·         Try to use good user interface design. Make clear what user needs to do and what the answers mean.