Teacher.h 1.92 KB
Newer Older
Andrew Binder's avatar
Andrew Binder committed
1
2
3
4
5
6
// *****************************************************************************
// Author: Andrew Binder
// Header file for Teacher class
// Comments should explain everything
// *****************************************************************************

Andrew Binder's avatar
Andrew Binder committed
7
#include "Student.h"
Andrew Binder's avatar
Andrew Binder committed
8
9
10
11
12
#include <vector>
#include <string>

using namespace std;

Andrew Binder's avatar
Andrew Binder committed
13
14
#ifndef TEACHER_H
#define TEACHER_H
Andrew Binder's avatar
Andrew Binder committed
15
16
17

class Teacher {
    public:
18
        Teacher(); 
Andrew Binder's avatar
Andrew Binder committed
19
        Teacher(string userNameIn);   // Default constructor
Andrew Binder's avatar
Andrew Binder committed
20
21
        
        //  Teacher Functions
Andrew Binder's avatar
Andrew Binder committed
22
23
24
25
26
27
28
29
        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
30
31
32
33
        
        //  Accessors
        const string getUserName();
        const string getExitCode();
Andrew Binder's avatar
Andrew Binder committed
34
        const bool getMenuActive();
Andrew Binder's avatar
Andrew Binder committed
35
36
        
        //  Mutators
Andrew Binder's avatar
Andrew Binder committed
37
38
        void setExitCode(string exitCodeIn);
        void setUserName(string userNameIn);
Andrew Binder's avatar
Andrew Binder committed
39
40
        
    private:
Andrew Binder's avatar
Andrew Binder committed
41
        bool teacherMenuActive = 1;
Andrew Binder's avatar
Andrew Binder committed
42
        string userName;
43
        string exitCode = "Quit";
Andrew Binder's avatar
Andrew Binder committed
44
45
        vector<Student> roster;
        
Andrew Binder's avatar
Andrew Binder committed
46
47
        // 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
48
        string rosterFileName = "classRoster.txt";   // Used for use by program as import/export       
Andrew Binder's avatar
Andrew Binder committed
49
        string progressFileName = "classProgress.txt";   // Used for teacher export
Andrew Binder's avatar
Andrew Binder committed
50
51
52
53
        
};

#endif //TEACHER_H