CS 230 Fall 2006

Assignment 3 –Simple IFs

100 points

 

Assigned: 09/20/2006

Due: 09/27/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:

Boardwalk T-Shirts Inc is having a clearance sale on 2006 Wildwood beach souvenirs.  Imagine that you are writing a simplified program for sales clerks to use while checking out customers. There are only two items for sale, T-shirts for $8.00 each, and sweatshirts for $18 each. If a customer buys 5 or more of either, they get a 10% discount for all items of that type. This will require obtaining the number of T-shirts and number of sweatshirts bought. The task also involves performing calculations and displaying the output. Output should include: price for each type of merchandise (which is standard), “extended price” (number of an item times its price), discounted subtotals (same as extended price if no discount given),  total discounted purchase amount (for both kinds of items combined), tax (at 7%), and grand total including tax. Provide capabilities to calculate, clear the text boxes to start again, and to exit.

 

Hand in:

 

Miscellaneous:

                Define item prices as named constants.

 

Note that we have now covered specifying how many decimal places to display – display a number appropriate for the results, with currency symbols where appropriate.

 

You must turn on Option Explicit and Option Strict.

 

We’re going to assume that the clerk enters valid and reasonable values for now, so that we’re not taking on too many new tasks at once.

 

MAKE SURE YOUR PROGRAM WORKS! (i.e. gets the correct answers). Now that our program is branching, we need to try more examples to make sure they work.

 

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.

 

Remember to use meaningful variable names, and indent to show the structure of the program (VB usually does this correctly).

 

Try to use good user interface design.