School of Engineering and Applied Science
Department of Computer Science
CSci 53 -- Introduction to Software Development
http://www.seas.gwu.edu/~csci53/fall05
Prof. Michael B. Feldman
mfeldman@gwu.edu

Project #4
Due Date: Start of lecture, Tuesday, Oct. 18, 2005

The objective here is to get started with decision structures in algorithms and programs.

Problem Specification:

A certain clothing store likes to sell its products as soon as possible after putting them on display. Therefore, they offer a variable discount off the full price, depending on how long the product has been available in the store:

Time on Display Discount off Full Price
1-5 days full price
6-14 days 10% discount
15-30 days 25% discount
31 days and longer 50% discount

You are hired by the store to develop a calculator program that prompts the user (a salesperson) for the full price of an item (double) and the number of days the item has been on display (int) and then displays the full price, the amount of the discount, and the discounted price. Use a currency formatter to display the prices in dollars and cents.

Define some reasonable ranges for the input values; if the user enters an out-of-range value, display a message and then stop. (A bit later in the course, we'll work on giving the user a chance to re-enter the value.)

What to submit:

You must follow the process given in Systematic Software Development. Submit Your grade will be calculated on a 20-point basis, as follows:

Framework bonus:

If you e-mail your "framework" listing file to Prof. Feldman, and the time stamp on the e-mail is no later than 5 PM, Friday, Oct. 14, you will be awarded 2 extra project points. The "framework" must be a listing (.txt) file, with no compilation errors, that contains the declared variables, and a set of comments inserted for the main algorithm steps.

MBF 10/5/05