#include <ustudent.h>
Inheritance diagram for UStudent:
Public Member Functions | |
UStudent () | |
UStudent (string name, string ssn, string major, double gpa) | |
void | setMajor (string major) |
void | setGPA (double gpa) |
string | getMajor () |
double | getGPA () |
virtual void | read (ifstream &fin) |
virtual void | print (ostream &out=cout) |
virtual | ~UStudent () |
Protected Attributes | |
string | major |
double | gpa |
|
Default class constructor. |
|
Explicit class constructor initializing this undergraduate-student object using the arguments name, ssn (social security number), major, and gpa (grade-point average)
|
|
Destructor. Does nothing but is recommended for classes with virtual methods. |
|
Returns this student's gpa (grade-point average).
|
|
Returns this student's major.
|
|
Prints this student's name, ssn, major, and gpa to the ostream out, which defaults to cout.
Reimplemented from Person. Reimplemented in GStudent. |
|
Reads this student's name, ssn, major, and gpa from the ifstream argument
Reimplemented from Person. Reimplemented in GStudent. |
|
Sets this student's GPA (grade-point average)
|
|
Sets this student's major
|