Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A ski shop offers ski/snowboard lessons, rents equipment, and sells accessories. The purpose of your program will be to calculate a persons total order when

A ski shop offers ski/snowboard lessons, rents equipment, and sells accessories. The purpose of your program will be to calculate a persons total order when they check out. The user will enter his or her name, birthdate, the days they will need a lift pass, and the activity they are choosing. They can choose if they need ski or snowboard lessons, if they need any rental equipment, and if they would like to purchase any accessories. If the user selects either school or private lessons, an input box should pop up when the calculate total button is clicked allowing the user to put in the number of days they would like to take lessons. Your program will validate user input (explained in detail later).

Pricing Information:

A 10% sales tax should be added to give the total order cost.

Children 12 and under and adults 65 and older get a 30% discount on their order. The discount should be taken off prior to calculating the tax.

Lesson daily rate:

o School: $100 a day

o Private: $175 a day

Rental equipment daily rate:

o Boots: $10 a day

o Skis or Board: $30 a day

o Helmet: $5 a day

o Poles: $5 a day

Accessories pricing:

o Gloves: $30.00

o Googles: $25.00

o Socks: $15.00

If the user selects snowboard as his or her activity, the poles checkbox in rental equipment should become invisible and the skis check box in rental equipment should change to say board.

If the user changes his or her mind and selects skis, the poles checkbox should become visible again and the skis checkbox should say skis instead of board.

Validation: If any of the following input is incorrect, your program should not continue. It should display an error message telling the user which part is incorrect and put the focus in whichever control is incorrect (unless it is the input box which is incorrect since you cant give it focus)

Your program is to verify that a first and last name (containing a space) was entered.

You may use a masked text box for birthdate, but will still need to validate that the user entered their full birthdate or didnt leave it blank.

The user must select ski or snowboard for their activity.

Your program should also validate that the user entered a numeric, non negative value in the input box if the user selects school or private lessons

The program should display the pricing for each item selected, the sales tax amount, and the total amount for the purchase.

This program should be composed of the following events:

- Place Order Button Click Calculates and displays output as shown in the following sample form.

- Snowboard radio button CheckedChanged explained on first page

- Ski radio button CheckChanged- explained on first page

- Clear Button Click Clear all checkboxes, radio buttons, textboxes, and output listbox.

- Exit Button Click Closes the program.

Programming Notes:

There will be multiple decision blocks within this code. The program must include at least one IF block and one CASE block. After using each style once, you may select either one for all additional decisions blocks.

Make TAXRATE a constant.

If the user clicks the button more than once, it should clear whatever is in the listbox before displaying the new purchase details

Output:

o The first piece output should always be the persons name and their age followed by a blank line

o Then it should give pricing for if they have lesson, any rentals, or bought any accessories.

o There should be another blank space followed by a line stating a 30% discount was applied if they were 12 or younger, or 65 or older

o Then it should give them their subtotal, tax, and total cost

o All prices should have two decimal places

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

1. Analyze: Make sure you understand the problem and ask questions if you dont.

a. Create a flowchart showing your program steps for the Place Order event only (see page 8).

b. The flowchart can be hand written (scanned in) or created electronically (Word or Visio) and submitted.

2. Design:

a. Generate the pseudocode for the Place Order event (see page 9 also see notes in Resources)

b. You should type the pseudocode in Word document.

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

d. Name the file _Chap4_PP.docx.

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

4. Code:

a. Following your pseudocode, 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.

i. At least one IF and one CASE must be used.

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 dont leave gaps in the program where you inserted too many blank lines accidentally.

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

6. 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:

- Word file containing Pseudocode

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions