Your program should help customers to buy product and store owner to show and update their products
Question:
Your program should help customers to buy product and store owner to show and update their products in the store. Use a dynamic 2D array to store products and function for each ability of user. Product information at least is Product ID, Product Name, Product Amount and Product Price. First the program will run as the owner. Then after the owner finishes, you will switch to the client. Allow the store owner to:
1- Enter the number of rows of products, and information per row. This only happens at the beginning.
2- The product owner can:
a- Show the store info
b- Update store info
c- Finish (when the store owner finishes, you switch to the client, do not end the program yet or you’ll lose all info)
2- Next: The user will now control the program as a user/customer. Display a loop that allows the user to do one of the following:
The user is now a customer and should be able to:
a- Show the store products.
b- Select Product.
c- Select Amount to buy.
d- Get the receipt at the end of purchasing.
After the customer selects the amount he wants to buy, ask him if he wants to buy more. and repeat steps from a to c until he say no then print the receipt. Don’t forget to reduce the amount of the product he bought from the store.
Statistics for Business Decision Making and Analysis
ISBN: 978-0321890269
2nd edition
Authors: Robert Stine, Dean Foster