Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

student.h

Go to the documentation of this file.
00001 // student.h
00002 //
00003 
00004 #if !defined(student_h)
00005 #define student_h
00006 #include "major.h"
00007 #include <iostream>
00008 #include <string>
00009 #include <vector>
00010 
00011 using namespace std;
00012 /*
00013  * This class maintains all the information for a student.
00014  */
00015 
00016 #include "person.h"
00017 #include "field.h"
00018 
00019 typedef vector<int> vectorint;
00020 
00021 class cGrade : public field
00022 {
00023 public:
00024     cGrade(){}
00025     ~cGrade(){}
00026     string grade;
00027     int classIndex;
00028     
00029     string ToParse(int fld)
00030     {
00031         return "";
00032     }
00033 
00034     string ToString()
00035     {
00036         char s[8];
00037         itoa(classIndex, s, 10);
00038         
00039         return (string(s) + " " + grade);
00040     }
00041 
00042     string NumToString()
00043     {
00044 //      courseMgr::GetSingleton().getEntry(classIndex).ToString();
00045     }
00046 
00047     string ToFileFmt()
00048     {
00049         return "";
00050     }
00051 };
00052 
00053 class student : public person
00054 {
00055 public:
00056     student();
00057     virtual ~student();
00058     student(const student& s);
00059     const student& operator=(const student& rhs);
00061     virtual void removec(int cIndex);
00062     virtual void removea(int index)=0;
00063     virtual void removes(int index);
00064 
00065 
00066 public:
00067     inline int getAdvisor()
00068     {
00069         return m_advisor;
00070     }
00071 
00072     inline major getMajor()
00073     {
00074         return m_major;
00075     }
00076 
00077     inline vector<cGrade> getCourses()
00078     {
00079         return m_courses;
00080     }
00081 
00082     inline setAdvisor(const int& a)
00083     {
00084         m_advisor = a;
00085     }
00086 
00087     inline setMajor(const major& m)
00088     {
00089         m_major = m;
00090     }
00091 
00092     inline setCourses(const vector<cGrade>& c)
00093     {
00094         m_courses = c;
00095     }
00096 
00097     string ToParse();
00098     string ToString();
00099     string ToFileFmt();
00100 
00101 protected:
00102     void copy(const student& s);
00103 
00104     /*
00105      * The advisor for this student.
00106      */
00107     int             m_advisor;
00108     /*
00109      * This student's major.
00110      */
00111     major           m_major;
00112     /*
00113      * This student's course vector.
00114      */
00115     vector<cGrade>  m_courses;
00116 
00117 private:
00118 
00119 
00120 };
00121 
00122 #endif /* student_h */

Generated on Mon Oct 22 20:18:45 2001 for University People Management System by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001