daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest Apr 26th, 2018 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef BOOK_H
  2. #define BOOK_H
  3. #include <iostream>
  4. #include <iomanip>
  5. #include <cstdlib>
  6. #include <string>
  7. #include <cctype>
  8. using namespace std;
  9.  
  10. class Book {
  11.   public:
  12.     //constructors
  13.     Book();
  14.     Book(string newTitle, int newYear, string newAuthor);
  15.     Book(string allData);
  16.  
  17.     //setters
  18.     void setTitle(string newTitle);
  19.     void setYear(int newYear);
  20.     void setAuthor(string newAuthor);
  21.  
  22.     //getters
  23.     string getTitle();
  24.     int getYear();
  25.     string getAuthor();
  26.  
  27.     //helpers
  28.     bool matchTitle(string targetTitle);
  29.     bool matchAuthor(string targetAuthor);
  30.     bool matchYear(string targetYear);
  31.     bool match(string target);
  32.     void outputBook();
  33.   private:
  34.     string title;
  35.     int year;
  36.     string author;
  37. };
  38. #endif
RAW Paste Data
Top