Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ShoppingList.h
- #include <string>
- using namespace std;
- class ShoppingList {
- private:
- struct item {
- item* next;
- string name;
- string category;
- float price;
- string subcategory;
- int priority;
- };
- int size; // Number of items in Shopping List (Size of shopping list)
- item* head = nullptr; // head of shoppingList
- public:
- ShoppingList(); // Constructor
- ~ShoppingList(); // Deconstructor
- ShoppingList(const ShoppingList& copy);
- ShoppingList& operator=(const ShoppingList& copy); // Copy Assignment Operator
- void insert(string name, float price, string category, string subcategory, int priority);
- void remove(string name);
- int getSize();
- ShoppingList getPriority(int priority);
- ShoppingList getCategory(string category);
- void printList();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement