#ifndef MEDIA_H #define MEDIA_H #include #include #include #include using namespace std; class item{ private: string itemName; //Name of item string mediaType; //Type of item string author; //Creator of the item string owner; //Owner of item---display owner's e-mail unsigned dollars; //Price of item unsigned cents; string availability; //Availability of item bool itemSet; //Has the type of item been set ? bool mediaSet; //What type of media are we dealing with ? bool authorSet; //Who is the author of the item ? bool ownerSet; //Who owns the item ? bool priceSet; //Has the price been set ? bool available; //Is item available ? bool resetPrev; //Was the item information reset previously? public: item(); //Constructor string getOwner(); //Returns the string value of owner string getItem(); //Returns the name of the item string getMedia(); //Returns the media type of the item string getAuthor(); //Returns the author of the item float getPrice(); //Returns the price of the item string getAvailability(); //Returns the availability status of item bool addItem(ofstream&, ifstream&); //Add item bool setAvailable(string); bool setItem(string); bool setMedia(string); bool setAuthor(string); bool setOwner(string); unsigned int getDollar(); //Get dollar data member unsigned getCent(); //Get cents data member bool setDollar(unsigned int); //Set dollar data member bool setCent(unsigned int); //Set cents data member void setPrivateMedia(); //Set private bool data member "mediaSet" void setPrivateItem(); //Set private bool data member "itemSet" void setPrivateAuthor(); //Set private bool data member "authorSet" void setPrivateOwner(); //Set private bool data member "ownerSet" void setPrivatePrice(); //Set private bool data member "priceSet" void setPrivateAvailable(); //Set private bool data member "available" void setReset(bool); bool itemPresent() const; //Report whether or not the item is present in the list bool mediaPresent() const; //Report whether or not the type of media has been set bool authorPresent() const; //Report whether or not the author of the item has been set bool ownerPresent() const; //Report whether or not the owner is still present bool pricePresent() const; //Report whether or not a price has been set bool isAvailable() const; //Report whether or not item is available bool returnReset() const; //Was this array cell re void resetInfo(); //Reset the values back to their intial state ~item(); //Destructor }; #endif