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

Write a C++ program to perform grocery check-out procedure for a simple store wi

ID: 3620200 • Letter: W

Question

Write a C++ program to perform grocery check-out procedure for a simple store with max 100 products. Design & use at least one C++ class in your program.

When the program starts, it should read the product information file - it contains product information (PLU code, product name, product sales type, price per pound or price per unit & current inventory level) - one product in each line. Sales type 1 means sales by weight, and 0 means sales by unit. See attachment for a sample input file.

Then, program should repeatedly invoke customer check-out functionality until the store associate (user) decides to quit. As part of checkout functionality, prompt for PLU code, validate it, then the user to input weight for each product if it is sold by weight, or # of units if sold by unit. Compute the price of the item and keep up the subtotal.

Once all purchased products are rung for a customer, output the total purchase amount. If the total purchase exceeds $100, apply 10% discount to the total.

We need to keep track of inventories automatically as well. So, keep updating the inventory data along with checkout operations. When the store closes every day, product information file should be generated in the same format.

Explanation / Answer

#include #include #include class Item { public: string name; string type; double price; int PLU; public: string getName(); string getType(); double getPrice(); int getPLU(); }; string Item::getName() { return name; } string Item::getType() { return type; } double Item::getPrice() { return price; } int Item:: getPLU() { return PLU; } Item inventories[100]; int count; int mainMenu(void) { int choose; cout
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