// CIS 235 // book Derived Class ( called subclass in Java ) #ifndef BOOK_H #define BOOK_H #include "invent.h" class book : public invent // : inherit data and functions from invent { public: book(void); // default constructor book(const book &); // copy constructor book(long cd, long n, double cst, double pr, char ); ~book(void); bool isHardBack(void) const; // added static string identify(void) ; // overridden const book & print(ostream &) const; // overridden book & kinput(void); // overridden book & setType(char t) // added { hardBack = t; return *this; } private: char hardBack; // 'y' or 'Y' for hardback, anything else softback }; #endif // overload a function - same name, but a different parameter list // override a function - applied to inherited functions // same name, same parameter list