CS 230 Fall 2004

Assignment 1 –Simple GUI and Simple Calculations

100 points

 

Assigned: 09/07/2004

Due: 09/13/2004 at the start of class

 

Pre-Lab (Do Before Lab):  Bring a new disk. Plan out tasks, objects, and events needed for program.

 

Main Assignment:

Imagine that you are writing a very basic program for a small store.  Imagine that they only want to calculate tax and total given a sales amount (and everything is taxable at the same rate).  Write a program that calculates the tax and total from the price and displays them. Provide capabilities to calculate, clear the text boxes to start again, and to exit.

 

Hand in:

 

Miscellaneous:

                The tax rate is 6%. Define the tax rate as a constant (if we have had time to cover them).

 

Note that we haven’t done anything yet with specifying how many decimal places to display – don’t worry about that.

 

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.