/* Name: student.h * Purpose: Header for Student Class * Author: Dr. Michael A. Redmond * Date Written: 10/14/01 * Date Revised: 10/15/01 * NOTES: */ #ifndef STUDENT_H #define STUDENT_H #include #include //#include using namespace std; enum year {fr, so, jr, sr}; class Student { public: Student(); Student(string fname, string lname, string id, year yr = fr, string maj = "Undeclared", double cred = 0, double points = 0, double ave = 0, double bal = 0); // inspectors string GetStdID() const; string GetFirst() const; string GetLast() const; year GetCurrYr() const; string GetMajor() const; double GetCredits() const; double GetGradePoints() const; double GetGpa() const; double GetBalanceDue() const; // mutators void SetStdID(string id); void SetFirst(string fname); void SetLast(string lname); void SetCurrYr(year yr = fr); void SetMajor(string maj = "Undeclared"); void AddClassResults(double cred = 3.0, double points = 2.0); void SetCredits(double cred = 0); void SetGradePoints(double points = 0); void SetGpa(double ave = 0); // should probably never be used except internally void SetBalanceDue(double bal = 0); private: string stdID; string first; string last; year currYr; string major; double credits; double gradePoints; double gpa; double balanceDue; }; ostream & operator << (ostream & out, Student & aStudent); // output a textual representation of a Student // reports whether one student has greater gpa than another bool operator > (const Student & lhs, const Student & rhs); // reports whether one Student has same balance as another bool operator == (const Student & lhs, const Student & rhs); // reports whether one Student has lower balance than another bool operator < (const Student & lhs, const Student & rhs); #endif