////////////////////////////////////////////////////////////////////// // Project 2 for CS 1704 Spring 2004 // // Programmer: Michael Tuozzo // OS: Windows XP Professional // System: Mobile Pentium 4, 1.2/2.2 GHz, 512 MB Memory // Compiler: Visual C++ 6.0, Service Pack 4 // Last modified: February 18, 2004 // // Class Name - multimedia // Description - This class is a container class for a multimedia item // and that item's available information // // Attributes: // string name // string type // string author // string owner // string currstat // string price // Behaviors: // multimedia() - default constructor // multimedia(const multimedia&) - copy constructor // // - accessors // const string getname(void) // const string gettype(void) // const string getauthor(void) // const string getowner(void) // const string getstatus(void) // const string getprice(void) // // - mutators // void setname(char*) // void settype(char*) // void setauthor(char*) // void setowner(char*) // void setprice(char*) // void setstatus(string) // void clear() // // void print(ofstream&, bool) // // ~multimedia() - destructor /////////////////////////////////////////////////////////////////////////////// #ifndef MULTIMEDIA_H #define MULTIMEDIA_H #include #include #include using namespace std; class multimedia{ private: string name; string type; string author; string owner; string currstat; string price; public: multimedia(); //default constructor multimedia(const multimedia &tocopy); //copy constructor //accessors const string getname(void){return name;} const string gettype(void){return type;} const string getauthor(void){return author;} const string getowner(void){return owner;} const string getstatus(void){return currstat;} const string getprice(void){return price;} //mutators void setname(char* nametoset){name.assign(nametoset);} void settype(char* typetoset){type.assign(typetoset);} void setauthor(char* authortoset){author.assign(authortoset);} void setowner(char* ownertoset){owner.assign(ownertoset);} void setprice(char* pricetoset){price = pricetoset;} void setstatus(string newstatus){currstat = newstatus;} void clear(); //formatted output void print(ofstream& output, bool printowner = true); ~multimedia(); //destructor }; #endif