Only for SkyEssay

profileAdnn.u
chapter4programmingprojectfall15.docx

The School of Computing will be sponsoring a road race this year and has asked you to create a program that will calculate the entry fees for each participant. The race will offer three different courses; a Half marathon, a 10 Kilometer run, and a 5 Kilometer run.

Entry Fees:

Entry fees are based on the age of the runner and the event they participate in. The fee schedule is as follows:

Age Breakdowns

Half Marathon

10K

5K

Children (ages 17 and under)

$50

$20

$10

Adults (ages 18 to 65)

$75

$30

$20

Master (66 and over)

$60

$25

$15

T-Shirt Fees:

T-shirts are free with entry fee unless the participant orders an X-Large. Participants who order X-Large t-shirts will be charged a $2.00 additional fee.

Options:

Two optional events will be offered:

· PreRace Dinner - The cost of dinner is $15.

· PostRace Lunch – The cost of lunch is $10.

Each registration processed should be assigned a registration number that is composed of the first initial of the first name (upper case), the first initial of the last name (upper case), an indicator as to which race (HM, 10K, 5K) and a registration number. The registration number should begin with 500 and increase by 1 for each registration processed.

Programming Notes:

This program should be composed of three events:

· Process Registration Click

· Determine correct entry fee

· Calculate Total Optional item cost

· Determine if additional fee should be charged for t-shirt

· Calculate Total Amount Due

· Display output (formatted as shown in sample output – next page)

· Clear Button Click

· Clear all checkboxes, radio buttons, and textboxes.

· Sets the focus on the name textbox.

· Exit Button Click

· Closes the program.

Data Validate should be used to insure that:

- One radio button was selected from both groups.

- Name textbox should not be blank

- Age textbox should contain a positive, numeric value.

Output should be formatted as shown below:

Sample output - no optional expenses. Sample output – including all optional expenses.

A. Steps required for planning and completing Programming Assignment One:

1. Analyze/ Design: Make sure you understand the problem and ask questions if you don’t.

a. Create pseudocode OR flowchart showing your program steps (see page 8).

b. This can be done using appropriate software or flowchart can be handwritten and scanned in.

c. Desk check your logic flow before coding it to make sure it works correctly.

d. Name the file <yourLastNameYourFirstName>_Chap4_PP.docx.

2. Design the interface:

a. Create the controls on the form.

b. Set the properties for a nice interface.

c. Give each control as well as the form meaningful names using proper prefixes.

d. Tab order should be set from top to down for fields that need to have focus.

e. Make sure the form ‘looks good’; all controls are lined up.

f. The text properties should have appropriate values when needed.

g. Add an additional label that says “Programmed by:” and your name.

3. Code:

a. Following your project design, translate into VB code.

b. Use camel casing and meaningful names for all variables.

c. Select appropriate data types as needed.

d. You may use choose to use IF or CASE blocks where appropriate.

e. Output should be formatted appropriately.

f. Before you submit your program, you must remove any empty stubs and unused variables.

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

h. Code must only use concept taught in this class (Chapter 1 – 4).

4. Test and Debug:

a. Find and correct syntax, execution, and logic errors.

b. Test your program with a variety of input to be sure it works properly.

5. Complete the documentation:

Internal Documentation:

a. The program should include a general comment section just after the Public Class statement. Include:

i. Programmed by: Your full name

ii. CIS 115 and the class time.

iii. A general statement indicating the purpose of the program.

b. Comments (again) – Each event procedure should begin with a comment just after the header that states the purpose of that event.

c. Other comments may be included if you feel they are needed.

External Documentation:

One file containing:

· Pseudocode or Flowchart

B. Other requirements

1. Once you have completed the program, you need copy your external documentation file(s) into the Project folder containing your VB code.

2. You will need to Zip the project before it can be turned in. Name the file <yourLastNameYourFirstName>_Chap4_Program.

3. You will find an associated grading rubric in the gradebook in USA Online. You may want to review it to make sure you have completed all of the elements that will be graded prior to submitting your files.

4. You will submit:

a. Design document

b. Zip file containing your VB project

5. The Zipped file should be placed in the Chapter 4 Programming Project in USA Online by 11:55 pm, Tuesday, 10/13.