Question: C + + 3 1 . 1 5 LAB * : Program: Online shopping cart ( Part 2 ) LAB ACTIVITY 3 1 . 1
C
LAB: Program: Online shopping cart Part
LAB
ACTIVITY
: LAB: Program: Online shopping cart Part
This program extends the earlier "Online shopping cart Part program. Consider first saving your earlier program
Step : Extend the ItemToPurchase class per the following specifications:
Parameterized constructor to assign item name, item description, item price, and item quantity default values of pt
Public member functions
SetDescription mutator & GetDescription accessor pts
PrintItemcost Outputs the item name followed by the quantity, price, and subtotal
PrintItemDescription Outputs the item name and description
Private data members
string itemDescription Initialized in default constructor to "none"
Ex of PrintItemCost output:
Bottled water @ $$
Ex of printItemDescription output:
Bottled Water: Deer Park, oz
Step : Build three new files:
Shoppingcart. Class declaration
ShoppingCart. cppClass definition
main. cppmain function Note: mainO's functionality differs from the previous program.
Build the ShoppingCart class with the following specifications.
Default constructor
Parameterized constructor which takes the customer name and date as parameters pt
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
