Question: Q 4 ) Write a C + + program that implements a shopping cart. User can login as Admin or customer. Admin can add new

Q4)
Write a C++ program that implements a shopping cart. User can login as Admin or customer. Admin can add new products, update the name and price of old products. A product Class has 3 attributes product ID (PID), product name and price. All products will be saved in a file "product.txt" in following form
product.bxt
50
\table[[PID,Product_name,Price],[P1,Board_marker,40],[P2,Ink,70],[P3,High_Lighter,60],[P4,Paper-Clip,120]]
Do not allow duplicate Product ID.
For customers, The program should display the catalog to the customers from "product.txt". The program should aceept PII) and required quantity of product until user enters 'B' and display all products and total bill and save this in a file "bill.txt"
Console Output:
PID Product_name
P1 Board_marker
P2 Ink
P3 High_Lighter
P4 Paper-Clip
Enter product ID and quantity
Press B to calculate bill
P21
P12
B
Your Bill is:
\table[[PID,Quantity,Price,Total],[P2,1,70,70],[P1,2,40,80]]
Total Bill is: 150
Make sure that you use concepts till Object oriented programming excluding vectors
 Q4) Write a C++ program that implements a shopping cart. User

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!