Extra Credit Project
DUE: 15 May
You must do projects 1 through 5 to
get credit for work on the extra credit project!
4 May
Extra Credit Project is worth 100 points and due at 11:59 pm, May 15:
Requirements
Create a file named projEC.c that will:
- Write a program to create a customer's bill for a
company. The company sells only five different products:
TV, VCR, Remote Controller, CD Player and Tape Recorder.
The unit prices are $400.00, $220, 35.20, $300.00, and
$150.00, respectively. The program must read the quantity
of each piece of equipment purchased from the keyboard. It
then calculates the cost of each item, the subtotal, and the
total coat after an 8.25% sales tax. The input data consist
of a set of intergers representing the quantieties of each
item sold. These intergers must be input into the program
in a user friendly way; that is, the program must prompt
the user for each quantity as show below. The numbers in
boldface show the user's answers.
How Many TVs Were Sold? 3
How Many VCRs Were Sold? 5
How Many Remote Controllers Were Sold? 1
How Many CDs Were Sold? 2
How Many Tape Recorders Were Sold? 4
The format for the output from the program follows:
QTY DESCRIPTION UNIT PRICE TOTAL PRICE
--- ----------- ---------- -----------
XX TV 400.00 XXXX.XX
XX VCR 220.00 XXXX.XX
XX REMOTE CTRLR 35.00 XXXX.XX
XX CD PLAYER 300.00 XXXX.XX
XX TAPE RECORDER 150.00 XXXX.XX
__________
SUBTOTAL XXXX.XX
TAX XXX.XX
TOTAL XXXXX.XX
- Obviously, you must provide the correct numbers instead of the
X's! Notice how everything is lined up in nice neat columns.
Your report MUST be identical to mine!
- Use either defined constants or memory constants for the unit
prices and the tax rate. Use integer variables to store
the quantities for each item. Use floating-point variables
to store the total price for each item, the bill subtotal,
the tax amount, and the total amount of the bill. Run
your program twice with the following data:
Set 1: 2 1 4 1 2
Set 2: 3 0 2 0 21
- Your program must include a minimum of three functions (which you design)
and use arrays.
Grading
This is worth 100 points.
- The design and analysis portions is worth 30 percent.
- Correct results is worth 30 percent.
- Style is worth 10 percent.
- Standards is worth 20 percent.
- 10 percent covers everthing else.
Program Header Comment Block
Use the following comment block at the beginning of your source
code:
/*****************************************************/
/* Program Header Block */
/* Filename: 6789prj2.c */
/* Name: Ima Student */
/* SSAN: 6789 */
/* Date: 6 April 2004 */
/* Course/section: CMSC-104/0101 */
/* Description: */
/* Analysis: */
/* Input: */
/* Output: */
/* Constraints: */
/* Formulas: */
/* Assumptions: */
/* Design: */
/* (Your psuedocode goes here.) */
/* */
/* Notes: (As needed.) */
/*****************************************************/
Function Header Comment Block (One for each function)
/***********************************************************
* Function name: function_name *
* Description: (Your function psuedocode goes here) *
* Input Parameters: Name and data type of each parameter. *
* Return Value: Data type and description of what *
* the return value is. *
***********************************************************/
UMBC |
CSEE |