A Bulk Food Store program
Develop a Bulk Food Store program as specified on the following pages. IT MUST HAVE ALL THE REQUIRED FUNCTIONS AND FEATURES LISTED. Other than these, you are free to create/add other functions/features that you feel may be useful for the application.
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) ==>
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.
Other than the main() function, the program must include and use at least one function for displaying the MAIN MENU. You should have this menu() function, take in the number of pounds for all items and return the ITEM choice.


Leave a Reply
Want to join the discussion?Feel free to contribute!