Course Solutions Uncategorized (Solved) : Assignment Part 2 Online Shopping Cart Continued Program Extends Earlier Online Shopping C Q33025225 . . . .

(Solved) : Assignment Part 2 Online Shopping Cart Continued Program Extends Earlier Online Shopping C Q33025225 . . . .

 

Assignment Part 2:

Online shopping cart (continued)

This program extends the earlier “Online shopping cart” program.(Consider first backing up your earlier program).

Create three new files:

ShoppingCart.h – Class declaration

ShoppingCart.cpp – Class definition

main.cpp – Note: main’s functionality differs from the previousexercise

Build the ShoppingCart class with the followingspecifications:

ShoppingCart

– string customerName

– vector cartItems + ShoppingCart()

+ ShoppingCart(string name)

+ string getCustomerName() const

+ void addItem(ItemToPurchase)

+ void removeItem(string)

+ void changeQuantity(string, int)

+ double getTotalCost()

+ void printCart()

addItem

use push_back to add the given ItemToPurchase argument to theend of cartItems

removeItem

loop through the cartItems vector and look forcartItems[i].getName() to match the given string argument

once found, call cartItems.erase(cartItems.begin() + i)

If the item is not found, output

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered):Module Three Understanding Logic And Reasoning Deadline February 15 2019 1159 Est . . . .(Answered):Module Three Understanding Logic And Reasoning Deadline February 15 2019 1159 Est . . . .

<h3>Question Description</h3> <h3>Module Introduction</h3><p><img src="http://cel.fscj.edu/courseimages/enc/1102/img3.jpg" alt=""/></p><p><em>The sole and ultimate end of logic is the eviction of truth…</em></p><p>~ George Campbell, <em>The Philosophy of Rhetoric</em></p><p><br/>In the first module, we learned more about