In this assignment, you will build a Shopping Cart for an online shopping application. The…
In this assignment, you will build a Shopping Cart for an online shopping application. The shopping cart contains a list of orders, in your application you need to set the max size for the orders list when you create an object from the shopping cart. The Shopping Cart contains a list of orders and the total number of added orders.
The order is another object contains:
1. Another object called item contains:
a. Id
b. Name
c. Price
2. Quantity: The number of the items
In this assignment, you need to do the following:
1. Create the classes for Shopping Cart Order and Item.
2. Create both default and parameterized constructor for all classes
3. Create user defined copy constructor and copy assignment operator for each class.
4. In point three, you need to make sure you are using deep copy.
5. You need to overload the ++ and – operator for order class to increase or decrease the quantity. You need to make sure the quantity should always be greater than 0.
6. Create functions in the shopping cart to insert and remove order from the chart.