#ifndef STUDENT
#define STUDENT
/***************************************************************
 * 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 <stdio.h>
#include <map>
#include <vector>
#include "Tokenizer.h"

enum Grade { NONE, F, D, C, B, A };

class Student {
  friend istream& operator>> (istream& in, Student& s);
  friend ostream& operator<< (ostream& out, Student& s);
 public:
  /****** C o n s t r u c t o r s ******/
  Student();
  Student(string i, string n, string d, string a, string p, string t, string prev, string cur);
  Student(const Student& s);

  /*********** M e t h o d s ***********/
  const map<string,Grade> getTranscript() const; // Return transcript
  const vector<string> getSchedule() const;      // Return schedule

  string getID()      const;                     // Return studentid
  string getName()    const;                     // Return name
  string getDOB()     const;                     // Return dob
  string getAddress() const;                     // Return address
  string getPhone()   const;                     // Return phone
  string getType()    const;                     // Return type
  float  getGPA()     const;                     // Return gpa

  string getGrade(string course);                // Return sid's grade

  bool satisfiedPrereq(string prereq);           // has s/he satisfied prereq

  bool setSchedule(string a);                    // parse schedule
  bool setTranscript(string a);                  // parse transcript
  bool setRegistration(string course);           // register student for course
  bool setGrade(string course, string grade);    // assign grade for course 
  bool setGPA();                                 // calculate GPA

  const Student& operator= (const Student& s);

  bool operator== (const Student& s);
  bool operator!= (const Student& s);

  static Student parse(string text);
  string toString();
 private:
  string    sid;
  string    name;
  string    dob;
  string    address;
  string    phone;
  string    type;
  float     gpa;

  vector<string>    schedule;
  map<string,Grade> transcript;

  string gradetostring(Grade g);
  Grade  stringtograde(string g);
};

#endif
