Teacher.h 1.67 KB
Newer Older
Andrew Binder's avatar
Andrew Binder committed
1
#include "Student.h"
Andrew Binder's avatar
Andrew Binder committed
2 3 4 5 6
#include <vector>
#include <string>

using namespace std;

Andrew Binder's avatar
Andrew Binder committed
7 8
#ifndef TEACHER_H
#define TEACHER_H
Andrew Binder's avatar
Andrew Binder committed
9 10 11

class Teacher {
    public:
12
        Teacher(); 
Andrew Binder's avatar
Andrew Binder committed
13
        Teacher(string userNameIn);   // Default constructor
Andrew Binder's avatar
Andrew Binder committed
14 15
        
        //  Teacher Functions
Andrew Binder's avatar
Andrew Binder committed
16 17 18 19 20 21 22 23
        void displayMenu(); // Runs menu
        void displayProgress();  // Opens menu, teacher get get all (gradebook style) or a student
        void exportProgress();  // outputProgress() in UML
        void saveProgress();    // Exports roster/progress to a file; this is run whenever log out is selected from menu
        void importProgress();  // Imports roster/progress from a file
        void enrollStudent(Student studentIn);  // Enrolls a new student; includes error checking
        void adjustProgress(string studentUserNameIn, int level);   // Changes a students level; includes error checking for student username
        void endProgram();  // saves and ends program gracefully
Andrew Binder's avatar
Andrew Binder committed
24 25 26 27
        
        //  Accessors
        const string getUserName();
        const string getExitCode();
Andrew Binder's avatar
Andrew Binder committed
28
        const bool getMenuActive();
Andrew Binder's avatar
Andrew Binder committed
29 30
        
        //  Mutators
Andrew Binder's avatar
Andrew Binder committed
31 32
        void setExitCode(string exitCodeIn);
        void setUserName(string userNameIn);
Andrew Binder's avatar
Andrew Binder committed
33 34
        
    private:
Andrew Binder's avatar
Andrew Binder committed
35
        bool teacherMenuActive = 1;
Andrew Binder's avatar
Andrew Binder committed
36
        string userName;
37
        string exitCode = "Quit";
Andrew Binder's avatar
Andrew Binder committed
38 39
        vector<Student> roster;
        
Andrew Binder's avatar
Andrew Binder committed
40 41
        // Strings for file I/O
        // If a file location needs to be changed, this is the place to do it!
Andrew Binder's avatar
Andrew Binder committed
42
        string rosterFileName = "classRoster.txt";   // Used for use by program as import/export       
Andrew Binder's avatar
Andrew Binder committed
43
        string progressFileName = "classProgress.txt";   // Used for teacher export
Andrew Binder's avatar
Andrew Binder committed
44 45 46 47
        
};

#endif //TEACHER_H