CIS 115 – Final Programming Project – Fall 2015 – Smith
Due Date: 11:55 pm – Tuesday, December 1
Your organization has decided to conduct a fund raising effort to provide aid to local non-profit organizations this year. Each member has been challenged to raise funds by finding donors to sponsor them in one or more of the upcoming fund raising events (Holiday Run, Walk-A-Thon, Toy Drive).
This program should include five events:
– Enter Names
This event should be used to enter the member’s names into the input listbox. Since you don’t know how many students there will be, you should use a sentinel value to indicate all students have been added. The sentinel value should not be displayed in the listbox. Once the names have been entered, the program should determine the largest index value for the array and ReDim the array to this size.
– Make a Donation
When the user wishes to make a donation, they need to select the member’s name that they wish to support from the list, select which event they will be supporting the member in, and enter the amount that they wish to donate. The program should validate that all three of these have been given and that the donation amount textbox does contain a positive, numeric value. Each error should generate a unique message. Only one message should be displayed per execution of the program. The donation amount earned for each student should be housed in an array. This amount should be updated each time that member receives a donation.
– Display Summary Information
At any point in time, a summary of the donation amounts can be requested. The summary header line should include the current date when the report is being run. Summary information for only members who have donation amounts (people with a balance of 0 should not be included in the list). The summary information should also include:
o Number of members who have acquired donations.
o Number of members who have not acquired donations.
o The highest donation amount.
o The lowest (non-zero) donation amount.
o The average donation amount (excluding members with 0 balances).
– Clear Event
The clear event should clear the output listbox, the donation textbox, the selected event, and the selected student name. Note: It should not clear the contents of the name’s listbox.
Closes the program.
To insure that modular programming is being used, you must include the following functions or subs within your program.
Make a Donation Event:
– DataOK ( ) – GetInput (amount, student, studentIndex)
– ProcessDonation (amount, studentIndex) – DisplayOutput(amount, student,studentIndex)
Display Summary Event:
– SetHighAndLow(high, low) – Average(total, donationCount)
DataOK – Makes sure input is valid (see notes page 1 – Make a Donation)
GetInput – Reads values in from the form; determines index of selected student)
ProcessDonation – Updates the array with the new donation amount
DisplayOutput – Shows who the donation was made for, the donation amount, and the selected event.
SetHighAndLow – Reads through the array, finds the first non-zero value, and sets variables high and low to this value.
Average – Calculates the average amount of donations. Students with 0 donations should not be included in the average.
You will need to determine which are subs and which are functions and you must use proper passing of parameters (ByRef or ByVal).
The donation total array is the only class-level variable that may be used. Set it initial to hold 20 values but resize it once the names have been entered. All other variables must be local and passed as arguments to subs or functions.
Your program must contain at least one of each of the following VB elements:
– If Block – Do Loop – For Next Loop
When calculating highest, total, and average values from the array, you must use a loop. You cannot use the built-in functions.
- Steps required for planning and completing Programming Assignment:
- Analyze: Make sure you understand the problem and ask questions if you don’t. Write pseudocode for your own use (not to turn in).
- Design: Desk check your pseudocode before coding it to make sure it works correctly. Remember to code-a-little-and-test-a-lot! Get one sub working then move to the next one.
- Design the interface:
- Create the controls on the form.
- Set the properties for a nice interface.
- Give each control as well as the form meaningful names using proper prefixes.
- Tab order should be set from top to down for fields that need to have focus.
- Make sure the form ‘looks good’; all controls are lined up.
- The text properties should have appropriate values when needed.
- Add an additional label that says “Programmed by:” and your name.
- Following your pseudocode, translate into VB code.
- Use camelCasing and meaningful names for all variables.
- Use consistent, standard (capitalize), and meaningful names for subs and functions.
- Use ByRef and ByVal as appropriate.
- Use For Next loops for traversing arrays and Do While loop where needed.
- Set up and use a class-level array to hold the donations totals for each person.
- Select appropriate data types as needed.
- Before you submit your program, you must remove any empty stubs and unused variables.
- Make the spacing consistent. Blank lines can be used within the code to make it more readable, but don’t leave gaps in the program where you inserted too many blank lines accidentally.
- Test and Debug:
- Find and correct syntax, execution, and logic errors.
- Test your program with a variety of input to be sure it works properly.
- Complete the documentation:
- The program should include a general comment section just after the Public Class statement. Include:
Programmed by: Your full name, CIS 115 and the class time; A general statement indicating the purpose of the program.
- Comments (again) – Each event procedure should begin with a comment just after the header that states the purpose of that event.
- Other comments may be included if you feel they are needed.
- Other requirements
- Once you have completed the program, you need to Zip the project before it can be turned in. Name the file <yourLastName_yourFirstName>_Final_Program
- The Zipped file should be placed in the Final Programming Project in USA Online by 11:55 pm, Tuesday, December 1. No projects will be accepted late without a valid, documented excuse.