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.
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) ==>
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.
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.