Project #3
Window Quotes
(Due 10 October 07
)
The Clear View Construction (CVC) company
specializes in selling and installing vinyl replacement windows.
They need a program written to generate a quick quote when a customer asks
for an estimate; you are to write the program. The program needs
to handle requests for any number of windows in almost any size combinations.
CVC is limited to windows between 250 square inches and 3000 square inches
because their window supplier does not manufacture very small or very large
windows. To simplify the estimate, CVC groups all windows into three
categories: standard: windows between 1000 and 2000
square inches in size, small: windows smaller than 1000 square
inches, and large: windows larger than 2000 square inches.
Prices are based on the standard category; cost and installation of
any standard window is $200. There are three options available
to customers for any window:
| Argon Filled - To improve the insulation value | $45 for Standard |
|
|
$60 for Standard |
|
|
$2.25 per square foot |
The price for small windows is 70% of the standard window for cost, installation, argon and tinting. The price for large windows is 155% of the standard window for cost, installation, argon and tinting. The cost for muntins is always calculated at $2.25 per square foot (including fractions of a square foot).
Your program should first ask for the dimensions of the window (width and height). If the window area is outside the allowed range, the program should display an error message and ask the customer for valid dimensions. If the second attempt by the customer is outside the allowed range, the program should terminate with a message. After getting valid dimensions, the program should ask the customer separately about each of the options (argon, tinting and muntins). Finally, the program should ask the customer how many windows of that description are desired. Based on the options, dimensions, and number, the program should then display a price for the window(s) and display the associated tax (6% of the price).
A typical customer may require various numbers of windows of different sizes. Thus, after displaying the price quote for window(s) of one size, the program should ask the customer if s/he would like to order additional windows. If the customer answers in the afirmative, the program should ask all the questions again and quote a price for the next window size. This cycle should continue until the customer indicates that there are no more windows to be ordered. The program should then display the total price, including tax and end.
Here is an example in which the customer orders 5 windows that are 34 inches wide and 53 inches high with argon fill and muntins and 2 windows that are 24 inches wide and 40 inches high with argon and tinting.
5 Vinyl windows, each 34 by 53 with
argon muntins
comes to 1365.78
Tax comes to 81.95
For a Total of 1447.73
2 Vinyl windows, each 24 by 40 with
argon bronze tinting
comes to 427.00
Tax comes to 25.62
For a Total of 452.62
Total price for all ordered windows: 1900.35
The prompting to get the specifications form the customer is not shown. The exact wording you use in displaying the quote is up to you; however, the quote must show the number, dimensions, and options for each order and show the price and tax. Showing price + tax for an order is not a requirement.
Approximately three days before the project is due, I will give you a list of window orders from one customer. Execute your program on the inputs that I provide and generate the price quotes.
Hand in a well-documented printout of your
program and a printout of the captured output from the order that I give
you, showing the quotes for each type of window ordered. Also, copy
the program's .cpp file to the handin folder on the P: drive for COSC 110
section 003. Be sure to name the .cpp file after yourself
so that it can be distinguished from other student file names. For
example, I would name my file
wolfep3.cpp