Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Header File
- #include<iostream>
- #include<iomanip>
- #include<string>
- #pragma once
- class Item
- {
- protected:
- std::string title;
- std::string description;
- double price;
- public:
- Item();
- Item(std::string passTitle, std::string passDescription, double passPrice);
- std::string getTitle();
- std::string getDescription();
- double getPrice();
- void setTitle(std::string x);
- void setDescription(std::string x);
- void setPrice(double x);
- virtual void print() = 0;
- };
- class Book : public Item
- {
- protected:
- int pageCount;
- public:
- Book();
- Book(std::string passTitle, std::string passDescription, double passPrice, int passPageCount);
- int getPageCount();
- void setPagecount(int x);
- void print();
- };
- class Movie : public Item
- {
- protected:
- int length;
- public:
- Movie();
- Movie(std::string passTitle, std::string passDescription, double passPrice, int passLength);
- int getLength();
- void setLength(int x);
- void print();
- };
- class CD : public Item
- {
- protected:
- int trackCount;
- public:
- CD();
- CD(std::string passTitle, std::string passDescription, double passPrice, int passTrackCount);
- int getTrackCount();
- void setTrackCount(int x);
- void print();
- };
- class ShoppingCart
- {
- protected:
- int numItemsInCart;
- Item ** itemArray;
- public:
- ShoppingCart(int x);
- ShoppingCart();
- ~ShoppingCart();
- void AddOneItem();
- void addItems();
- void printItems();
- };
- class Customer
- {
- protected:
- int userID;
- ShoppingCart * customerShoppingCart;
- std::string firstName, lastName;
- public:
- Customer();
- Customer(std::string uFirstName, std::string uLastName, int numItems);
- ~Customer();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement