Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please answer ASAP all parts (must include the optional portion) fully and corre

ID: 3567650 • Letter: P

Question

Please answer ASAP all parts (must include the optional portion) fully and correctly to get 1500 Points!

In this assignment you will write a small C program. Your program should compile correctly and produce the specified output.
Please note that the computer program should comply with the commenting and formatting rules as has been done in class. For example, there should be a header for the whole program that gives the author

In this assignment you will write a small C program. Your program should compile correctly and produce the specified output. Please note that the computer program should comply with the commenting and formatting rules as has been done in class. For example, there should be a header for the whole program that gives the author?????s name, class name, date, and description. End braces should be commented, and there are alignment and indenting requirements as discussed. Please ask if you have any questions. Program #1 Given a file with the following content: 2301 BRAEBURN_REG 1 0.99 101.5 4021 DELICIOUS_GDN_REG 1 0.89 94.2 4020 DELICIOUS_GLDN_LG 1 1.09 84.2 4015 DELICIOUS_RED_REG 1 1.19 75.3 4016 DELICIOUS_RED_LG 1 1.29 45.6 4167 DELICIOUS_RED_SM 1 0.89 35.4 Table 1: File Format Where - Column 1 is the UPC- Universal Product Code. Unique for each product - Column 2 is the Product Description: Product Name, - Column 3 is the PST: Product Sales Type: 0 = per unit, 1 = per pound - Column 4 is the PPT: Price Per Pound or Price Per Unit, - Column 5 is the CIL: Current Inventory Level. Write a program to 1) Read the data from the input file, a. Perform input validation for each data type , i.e. If any of the columns has an error, skip the skip the entire row, (25 points) b. Store the information using parallel arrays(10 points) 2) Perform grocery check-out procedure for a simple store (Table 1). a. Enter 1 to start a checkout of a new customer, 0 to exit(close the store) 3) The check-out functionality ( 20 points ) a. Enable the user to purchase several products in each checkout. b. After the user enters UPC code, ask the user to input the weight or number of units for each product (depending on its sales type) and keep updating the inventory data along with checkout operations c. User can enter 0 for UPC code to indicate the end of checkout. d. If the total purchase exceeds $50, apply 5% discount to the total. e. If any input error, ask the user to enter it again (i.e. If the UPC is not found, ask the user to enter it again.) f. A coupon is assigned randomly. 1 out of every 10 customers get an additional 5% discount 4) At the end of check out, print the receipt on the screen, and save it as a text file, using the following format: (15 points) UPC Description PPT Weight/units price 4011 BANANAS 0.49 2.0 lb 0.98 4028 STRAWBERRIES_PINT 0.99 3 u 2.97 SubTotal 3.95 Discount 0.00 Tax 0.32 Total 4.27 Notice that every receipt should be stored in a different text file. 5) Give an option to the user to read and browse existing receipts (i.e. display the list of existing recipients and let the user pick the one to be read and displayed on the screen)(30 points) *Optional: (REQUIRED FOR FULL 1500 POINTS!) a) (5 points) Use structures instead of parallel arrays b) (15 points) Use comma separated input file instead. For example: 2301,BRAEBURN_REG,1,0.99,101.5 4021,DELICIOUS_GDN_REG,1,0.89,94.2 4020,DELICIOUS_GLDN_LG,1,1.09,84.2 4015,DELICIOUS_RED_REG,1,1.19,75.3 4016,DELICIOUS_RED_LG,1,1.29,45.6 4167,DELICIOUS_RED_SM,1,0.89,35.4 Deliverables You will turn in two files, a C source code file, and text file with an example of the program output. The C source code file should: 1) Comply with all of the formatting requirements already discussed. 2) Query the user(input) 3) Display the output 4) Perform the operations described Attached is an image of the products.txt input file, and below is the copy and paste of the text in it: F01 BRAEBURN_REG 1 0.99 101.5 4021 DELICIOUS_GDN_REG 1 0.89 94.2 4020 DELICIOUS_GLDN_LG 1 1.09 84.2 4015 DELICIOUS_RED_REG 1 1.19 75.3 4016 DELICIOUS_RED_LG 1 1.29 45.6 4167 DELICIOUS_RED_SM 1 0.89 35.4 4124 EMPIRE 1 1.14 145.2 4129 FUJI_REG 1 1.05 154.5 4131 FUJI_X-LGE 1 1.25 164.1 4135 GALA_LGE 1 1.35 187.7 4133 GALA_REG 1 1.45 145.2 4139 GRANNY_SMITH_REG 1 1.39 198.2 4017 GRANNY_SMITH_LGE 1 1.49 176.5 3115 PEACHES 1 2.09 145.5 4011 BANANAS 1 0.49 123.2 4383 MINNEOLAS 1 0.79 187.3 3144 TANGERINES 1 1.19 135.5 4028 STRAWBERRIES_PINT 0 0.99 104 4252 STRAWBERRIES_HALF_CASE 0 3.99 53 4249 STRAWBERRIES_FULL_CASE 0 7.49 67 94011 ORGANIC_BANANAS 1 0.99 56.3

Explanation / Answer

We also have the same issue with this homework. I really hope someone can help us out. Thank you very mcuh.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote