CIS 115 – Final Programming Project

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.

–          Exit

Closes the program.

 

 

Programming Notes:

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.

 

  1. Steps required for planning and completing Programming Assignment:
  2. Analyze:  Make sure you understand the problem and ask questions if you don’t.  Write pseudocode for your own use (not to turn in).
  3. 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.
  4. Design the interface:
  5. Create the controls on the form.
  6. Set the properties for a nice interface.
  7. Give each control as well as the form meaningful names using proper prefixes.
  8. Tab order should be set from top to down for fields that need to have focus.
  9. Make sure the form ‘looks good’; all controls are lined up.
  10. The text properties should have appropriate values when needed.
  11. Add an additional label that says “Programmed by:” and your name.
  12. Code:
  13. Following your pseudocode, translate into VB code.
  14. Use camelCasing and meaningful names for all variables.
  15. Use consistent, standard (capitalize), and meaningful names for subs and functions.
  16. Use ByRef and ByVal as appropriate.
  17. Use For Next loops for traversing arrays and Do While loop where needed.
  18. Set up and use a class-level array to hold the donations totals for each person.
  19. Select appropriate data types as needed.
  20. Before you submit your program, you must remove any empty stubs and unused variables.
  21. 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.
  22. Test and Debug:
  23. Find and correct syntax, execution, and logic errors.
  24. Test your program with a variety of input to be sure it works properly.
  25. Complete the documentation:

Internal Documentation:

  1. 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.

  1. Comments (again) – Each event procedure should begin with a comment just after the header that states the purpose of that event.
  2. Other comments may be included if you feel they are needed.

 

  1. Other requirements
  2. 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

 

  1. 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.