CS 230 Spring 2005                                                          Assignment 10 – Arrays - Basic                                                     100 points

Assigned: 04/04/2005

Due: 04/11/2005 at the start of class

 

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

 

Main Assignment:

WEXP’s new La Salle Idol show needs a program to tally votes and determine who should be kicked off the program. They have one file (contestants.txt) that holds a list of contestants. They have another file (votes.txt) that holds all of the votes of people who called in their vote. You have been recently asked by WEXP to write a program to figure out how many votes each contestant received. Your program should also report who the loser is (the person with the least votes). You should have an array for contestant names and another (parallel) array for number of votes received. You should tally the votes on form load. Display all contestants and their number of votes in a list box or a RichTextBox (use AppendText method to add to – results can be cut and pasted into an Office document). In a text box, display the loser’s name. There is little interface capability needed – just provide an exit capability.   

 

Hand in:

 

Miscellaneous:

·         MAKE SURE YOUR PROGRAM WORKS!

·         You must turn on Option Explicit and Option Strict.

·         Put YOUR NAME, e-mail address, date and purpose 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.