// File Student.h // Student Class Prototype #ifndef STUDENT_H #define STUDENT_H #define NameLength 20 #include //#include using namespace std; struct CourseData { int Hours; char Grade; }; class Student { public: // Constructors // Student(); Use a default constructor Student(string="",int=0,int=0); // Initialize Name of Student void SetName(string); // Update the class with a class record (#Hours,Grade in class 0..4) // void AddClass(int,char); Student operator+=(CourseData); // Change a Grade (#Hours, Previous Grade, New Grade) void ChangeGrade(int,char,char); // Remove a class from student's record (Hours, Grade) // void RemoveClass(int,char); Student operator-=(CourseData); // Get Hours Completed int HoursCompleted() const; // Compare two students based on GPA friend bool operator<<=(Student,Student); friend bool operator>>=(Student,Student); // Compare two students alphabetically friend bool operator<(Student,Student); friend bool operator>(Student,Student); friend bool operator==(Student,Student); // Compare a student('s name) to a string friend bool operator<(Student,string); friend bool operator>(Student,string); friend bool operator==(Student,string); // Print Student Info // void PrintStudentInfo(); friend std::ostream &operator<<(std::ostream &,Student); // Read a student from the keyboard friend std::istream &operator>>(std::istream &,Student&); // Read a student from any istream (no prompts) friend std::ifstream &operator>>(std::ifstream &,Student&); private: string Name; int Hours, Points; // Get Student's GPA float ComputeGPA() const; }; #endif