#ifndef TEXTBOOK
#define TEXTBOOK
/***************************************************************
 * CLASS:  Student
 * AUTHOR: Johnny Weber
 * SID:    098609881
 * DATE:   Tue May 14 09:17:32 EDT 2002
 * DESCRIPTION:
 *         The student object represents a student as per the
 *         assignment spec.
 ***************************************************************/
#include <iostream>
#include <string>
#include <string.h>
#include <stdio.h>
#include "Tokenizer.h"

class Textbook {
  friend istream& operator>> (istream& in, Textbook& t);
  friend ostream& operator<< (ostream& out, Textbook& t);
 public:
  /****** C o n s t r u c t o r s ******/
  Textbook();
  Textbook(string t, string i, string p, string a, int y, int e);
  Textbook(const Textbook& t);
  /*********** M e t h o d s ***********/
  string getTitle()       const;
  string getISBN()        const;
  string getPublisher()   const;
  string getAuthor(int i) const;
  int    getYear()        const;
  int    getEdition()     const;
  int    getNumAuthors()  const;

  bool   setAuthors(string a);
  bool   setAuthors(string a[], int n);

  bool operator == (const Textbook& t);
  bool operator != (const Textbook& t);

  const Textbook& operator=(const Textbook& t);

  static Textbook parse(string text);
  string toString();
 private:
  string title;
  string isbn;
  string publisher;
  string authors[6];
  int    numauthors;
  int    year;
  int    edition;
};

#endif
