Main Page   Class Hierarchy   Compound List   File List   Compound Members  

GStudent Class Reference

#include <gstudent.h>

Inheritance diagram for GStudent:

UStudent Person List of all members.

Public Member Functions

 GStudent ()
 GStudent (string name, string ssn, string major, double gpa, string degree)
void setDegree (string degree)
string getDegree ()
virtual void read (ifstream &fin)
virtual void print (ostream &out=cout)
virtual ~GStudent ()

Protected Attributes

string degree

Detailed Description

GStudent class, publically derived from the UStudent class, for storing information about graduate students. Such students have degrees in addition to majors and GPAs, which they inherit from the UStudent class, and names and social security numbers (ssn), which they inherit from the Person class.

Author:
Mark Maloof
Version:
1.0 1/27/04


Constructor & Destructor Documentation

GStudent::GStudent  ) 
 

Default class constructor.

GStudent::GStudent string  name,
string  ssn,
string  major,
double  gpa,
string  degree
 

Explicit class constructor initializing this graduate-student object using the arguments name, ssn (social security number), major, gpa (grade point average), and degree

Parameters:
name a string storing this graduate student's name
ssn a string storing this graduate student's ssn
major a string storing this graduate student's major
gpa a double storing this graduate student's gpa
degree a string storing this graduate student's degree

GStudent::~GStudent  )  [virtual]
 

Destructor. Does nothing but is recommended for classes with virtual methods.


Member Function Documentation

string GStudent::getDegree  ) 
 

Returns this graduate student's degree

Returns:
a string storing this student's degree

void GStudent::print ostream &  out = cout  )  [virtual]
 

Prints this graduate student's name, ssn, major, gpa, and degree to the ostream out, which defaults to cout.

Parameters:
out an ostream for printing (defaults to cout)

Reimplemented from UStudent.

void GStudent::read ifstream &  fin  )  [virtual]
 

Read's this graduate student's name, ssn, major, gpa, and degree from the ifstream argument.

Parameters:
fin an ifstream for reading

Reimplemented from UStudent.

void GStudent::setDegree string  degree  ) 
 

Sets this graduate student's degree

Parameters:
degree a string storing this graduate student's degree


The documentation for this class was generated from the following files:
Generated on Fri Feb 6 16:29:56 2004 by doxygen1.3