Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q 4 ) Write a C + + program that implements a shopping cart. User can login as Admin or customer. Admin can add new
Q
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 attributes product ID PID product name and price. All products will be saved in a file "product.txt in following form
product.bxt
tablePIDProductname,PricePBoardmarker,PInk,PHighLighter,PPaperClip,
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 and display all products and total bill and save this in a file "bill.txt
Console Output:
PID Productname
P Boardmarker
P Ink
P HighLighter
P PaperClip
Enter product ID and quantity
Press to calculate bill
P
P
B
Your Bill is:
tablePIDQuantity,Price,TotalPP
Total Bill is:
Make sure that you use concepts till Object oriented programming excluding vectors
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started