You are required to implement a shopping cart module for an online shopping mall. From the available items a user will select the item to purchase and add this into his shopping cart. Before the checkout customer can remove any item from the cart at any time. A single item in the cart contains the following details: class Item { private: int itemID; string itemName; double price; double purchasedQuantity; double totalPrice; public: //constructors and getter setters }; For the implementation of the required module you have to meet the following requirements: 1- Customer can add any item to the cart in desired quantity. Remember if customer added the same item in the cart again, your implementation will not add this as a new item it will check if the item already exists than it will just add the new quantity in the previous and update other data. 2- Customer can remove item or change the quantity at any time. There are two possibilities: i. Customer wants to remove the item form the cart ii. Customer wants to change the quantity of item in the cart 3- Customer can also view his cart at any time. You have to provide two features for the user in order to view his cart: i. View cart: it will display all the items that customer selected to purchase. ii. View cart by items: Display one item and facilitate user to navigate through next or previous item in the cart till the user wants to quit the view. 4- Customer can calculate his bill. Bill will be calculated according to the item price and the number of items he wants to purchase. 5- Bill should be displayed in user friendly manner to the customer. You have to provide implementation of following methods for the Cart class.  addToCart(int itemID,string itemName,double price, int purchasedQuantity);  addExistingToCart(int itemID, int quantityToAdd);  removeFromCart(item itemToRemove);  void changeQuantity : (int itemID, int newQuantity);  calculateBill();  printBill();  viewCartByItem();  viewCart(); Instruction: Use double linked list in c++ to implement the above scenario

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

You are required to implement a shopping cart module for an online shopping mall. From the available items a
user will select the item to purchase and add this into his shopping cart. Before the checkout customer can
remove any item from the cart at any time.
A single item in the cart contains the following details:
class Item
{
private:
int itemID;
string itemName;
double price;
double purchasedQuantity;
double totalPrice;
public:
//constructors and getter setters
};
For the implementation of the required module you have to meet the following requirements:
1- Customer can add any item to the cart in desired quantity.
Remember if customer added the same item in the cart again, your implementation will not add this as a new
item it will check if the item already exists than it will just add the new quantity in the previous and update
other data.
2- Customer can remove item or change the quantity at any time.
There are two possibilities:
i. Customer wants to remove the item form the cart
ii. Customer wants to change the quantity of item in the cart

3- Customer can also view his cart at any time. You have to provide two features for the user in order
to view his cart:
i. View cart: it will display all the items that customer selected to purchase.
ii. View cart by items: Display one item and facilitate user to navigate through next or
previous item in the cart till the user wants to quit the view.

4- Customer can calculate his bill. Bill will be calculated according to the item price and the number
of items he wants to purchase.
5- Bill should be displayed in user friendly manner to the customer.
You have to provide implementation of following methods for the Cart class.
 addToCart(int itemID,string itemName,double price, int purchasedQuantity);

 addExistingToCart(int itemID, int quantityToAdd);
 removeFromCart(item itemToRemove);
 void changeQuantity : (int itemID, int newQuantity);
 calculateBill();
 printBill();
 viewCartByItem();
 viewCart();
Instruction: Use double linked list in c++ to implement the above scenario

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY