首页 > > 详细

C辅导:BULK FOOD STORE PROGRAM解析R编程、R程序讲解、讲解R程序

Introduction
c,,,
,c,。
Requirement
1
BULK FOOD STORE PROGRAM
Instructions:
Develop a C program which has to have all the required functions and features listed below.
Other than these, you are free to create/add other functions/features that you feel may be
useful for the application.
You are required to develop this program BY YOURSELF!!! The program that you submit MUST
BE THE FINAL VERSION, and MUST BE YOUR OWN WORK!!
You MUST NOT COPY any CODE from ANYBODY ELSE. If your program is found to be
the same as any other student with just a few variable names changed or a few lines of code
changed, both YOU and the OTHER person(s) will be assigned a MARK of ZERO as well as be
subject to disciplinary action under the ACADEMIC Misconduct Policy !!!
To avoid this from happening to you, you must NEVER give any type of COPY of your code to
anybody else until at least 1 week after the project due date.
LATE SUBMISSIONS GET A MARK OF 0 !
The program and project document must be submitted on
Wednesday March 16, or Thursday March 17, or Friday March 18,
2016 during your corresponding Lab. Sessions.
You are required to submit the following:
A program called PROJECT.C and the screenshot of your program output.
Project Assessment:
The marks will be assigned on the following basis:
1. Program Format - programmer’s block, indentation, and adequate comments
2. User Interface - appearance to users, ease of use, checking for out of range input
3. No compile or run time errors
4. Functionality and Structure
The basic functions/features for the application as required, applying topics such as #defines,
if..else, loops, switch/case, etc.
Project Marking Scheme
Marks will be assigned as follows:
Program Functionality: 2 marks
Programmer’s block and comments: 1 mark
Program Clarity/Organization: 1 mark
Ease of use, format and appearance to the user: 1 mark
Total: 5 Marks
2
Description:
1. Required Functionalities:
When the program initializes, the user should be presented with the following MAIN MENU:
BULK FOOD STORE PROGRAM
Item Description Cost/lb # Pounds Subtotal
A candy 4.55 0.00 $ 0.00
B Flour 1.50 0.00 $ 0.00
C Soup 2.88 0.00 $ 0.00
D Walnuts 5.25 0.00 $ 0.00
E Rice 1.05 0.00 $ 0.00
F Noodles 0.35 0.00 $ 0.00
G Sugar 0.92 0.00 $ 0.00
H Cake 1.45 0.00 $ 0.00
total pounds = 0.00 SUBTOTAL $ 0.00
Avg. Cost/lb = 0.00 HST Amount $ 0.00
TOTAL Amount $ 0.00
Your choice (R to RESET, Q to quit) ==>
3
2. Required Functionalities (continued):
(i) Your program should accept ONLY UPPER/lower Case characters A-H (or a-h) as
well as R and Q (or r and q).
(ii) All other user input for choice should cause an AUDIBLE BEEP, and not be accepted.
If the user enters a letter (Upper or Lower case) from A-H (or a-h), it should then
prompt the user for the number of POUNDS.
(iii) Pounds should be a floating point value. Negative values for POUNDS should cause
an AUDIBLE BEEP and not be accepted.
(iv) The number of POUNDS should be multiplied by the COST/LB value to generate a
subtotal to 2 decimal places for that ITEM. The ITEM SUBTOTALS should be
added together to give the SUBTOTAL at the bottom.
(v) The HST tax amounts should be generated for the bottom SUBTOTAL to give the
TOTAL Amount.
(vi) The number of POUNDS column should be added together to get the TOTAL
POUNDS. You should then take the SUBTOTAL COST at the bottom and divide it
by the TOTAL Pounds to get the Avg Cost/lb.
(vii) Remember that you cannot divide by 0, so this will have to be taken into account before
displaying this value at start up and after choosing Reset.
(viii) When the user chooses to Quit, the program should display a message and ask the user
to:
HIT ANY KEY TO CONTINUE…
before ending the program.
4
 PROGRAM REQUIREMENTS:
Variables: Any variables used in the program must be a LOCAL VARIABLE with the function.
When the program first starts, all POUNDS should be set to 0.00
Defines: The program must include the following defines:
#define A “Candy “
#define A_P 4.55
#define B “Flour “
#define B_P 1.5
#define C “Soup “
#define C_P 2.88
#define D “Walnuts “
#define D_P 5.25
#define E “Rice “
#define E_P 1.05
#define F “Noodles “
#define F_P 0.35
#define G “Sugar “
#define G_P 0.92
#define H “Cake “
#define H_P 1.45
Changing a #define(s) should change Description and/or Cost/lb accordingly.
Programmer’s Block:
The programmer’s block must include the following, in your screenshot as well:
FULL NAME:
STUDENT ID:
LAB SECTION:
LAB DAY AND TIME:
DESCRIPTION:
Please note that this is an individual project and each student should submit
his/her project individually.
The printed hard copy of the project should be submitted to me in the first ten
minutes of your corresponding Lab. Sessions.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!