-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShoppingCart.h
34 lines (29 loc) · 1000 Bytes
/
ShoppingCart.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
Alexis Reeves, Section 02, [email protected]
Description: Header file for class Shopping Cart. Includes private variables customerName, date, and, items. Declares public
functions get name/date, add item, remove item, change quantity, print descriptions, and get number of items and the total price.
Done without pair programming and in Visual Studio.
Late Days: none
*/
#ifndef ShoppingCart_h
#define ShoppingCart_h
#include <iostream>
#include <vector>
#include "ItemToPurchase.h"
using namespace std;
class ShoppingCart {
public:
ShoppingCart(string customerName = "none", string date = "January 1, 2016");
string GetName() const;
string GetDate() const;
void AddItem(ItemToPurchase item);
void RemoveItem(string item);
void ChangeQuantity(string item, int newQuantity);
void PrintDescriptions() const;
void NumItemsAndPrice(int& numItems, double& totalPrice) const;
private:
string customerName;
string date;
vector<ItemToPurchase> items;
};
#endif