#include "stdstuff.h" #include "Book.h" // default constructor sets isbn to 0 and title to "" Book::Book() { isbn=0; title=""; } // constructor sets isbn and title to parms provided Book::Book(int isbn, const String2002 &title) { this->isbn=isbn; Book::title = title; } // sets the ISBN and title of a book void Book::set(int newIsbn, const String2002 &newTitle) { isbn = newIsbn; title = newTitle; } // returns the ISBN of a book int Book::getIsbn() const { return isbn; } // returns the 3rd letter in the book title or '0' if title shorter than that char Book::getTitle3rdChar() const { if (title.length()<3) return '0'; return title[2]; } // returns true if two books have the same ISBN, false otherwise bool Book::compare(const Book &otherBook) const { return (isbn==otherBook.isbn); }