CS 230 Fall 2006

Assignment 2 –Simple GUI and Simple Calculations

100 points

 

Assigned: 09/13/2006

Due: 09/20/2006 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.

 

Main Assignment:

Imagine that you are writing a very basic program for an ethical ticket broker.  According to PA state law, tickets can only be sold for 25% above their face value or $5.00 above their face value (whichever is greater). Imagine that they want a program to calculate the maximum price they could legally charge under each of the two provisions given ticket face value (since we haven’t covered branching yet, leave it to the humans to figure out which is greater).  Write a program that calculates 25% above and $5.00 above face value prices and displays them. Provide capabilities to calculate, clear the text boxes to start again, and to exit.

 

Hand in:

 

Miscellaneous:

Define the 25% and $5 as constants, so that if the law changes the program is easy to change.

 

If we have covered formatting output to show currency, do that (otherwise don’t worry about that)

 

You must turn on Option Explicit and Option Strict.

 

Note that we haven’t done anything yet with making sure the user enters something reasonable – don’t worry about that.

 

MAKE SURE YOUR PROGRAM WORKS! (i.e. gets the correct answers).

 

Put YOUR NAME, and e-mail address in comments at the beginning of the program.

 

You MUST include comments that explain your program in order to get full credit.

 

Try to use good user interface design.