CS 230 Fall 2009

Assignment 3 –Simple IFs and Calculations

100 points

 

Assigned: 09/21/2009

Due: 09/28/2009 at the start of class

 

Pre-Lab (Do Before Lab):  Bring materials – a way to save a copy for you and a copy to turn in. Plan out tasks, objects, and events needed for program. Plan main button(s) with pseudocode or flowchart.

 

Main Assignment:

Imagine that you are writing a program for an amusement park. The amusement park charges admission based on the following criteria. Start with a base charge of $5. Add $2 for every year of age, up to a maximum of $20 additional ($25 total). Add $10 if the person is taller than 48 inches tall (so a maximum overall of $35). Tax is 8%. Write a program that calculates the price of admission for a customer. The task involves getting needed info from the user, performing calculations and displaying the output. In addition to the total admission cost, also display intermediate results including the subtotals and amount of tax.  Provide capabilities to calculate clear the text boxes to start again, and to exit.

Please set the name of the project to something other than the default name (WindowsApplication1, …). It is helpful if you use a name that identifies you as well as the assignment (e.g. yourlastname assignment 3).

 

Background Knowledge:

 

Task Details:

 

Miscellaneous:

 

Hand in: