// CSE 00au HW3 Starter header file. // // BookInfo.h - header file for BookInfo class // #ifndef BOOKINFO_H #define BOOKINFO_H #include #include using namespace std; // Defines four possible genres for a book. // Children's books, Sci-fi/Fantasy, Classics and Fiction enum book_genre {CHILD, SF_F, CLASS, FICT, ERROR}; // // This class is used to store all the necessary information about any // single book. It holds the title, author, genre and the number of copies // in stock. // class BookInfo { public: // construct an empty BookInfo BookInfo(); // construct a BookInfo from its title, author, genre // and the number of copies BookInfo(const string title, const string author, const book_genre genre, const int num); // construct another BookInfo identical to book BookInfo(const BookInfo &book); // change the content of this BookInfo object to new // title, author, genre, and number of copies void reset(const string title, const string author, const book_genre genre, const int num); // = title of this book const string getTitle(); // = author of this book const string getAuthor(); // = genre of this book const book_genre getGenre(); // = number of copies of this book in stock const int getNumCopies(); ///////////////////////////////////////////////////////////////// /// /// You may define more public methods if necessary. /// ///////////////////////////////////////////////////////////////// private: // print the title, author and #copies of book b followed by a newline friend ostream & operator << (ostream &s, const BookInfo b); ///////////////////////////////////////////////////////////////// /// /// Define all private data (and methods, if any) here. /// ///////////////////////////////////////////////////////////////// }; #endif