Teacher.h 2.11 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
        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
Andrew Binder's avatar
Andrew Binder committed
27
        void enrollStudent(string studentIn);  // Enrolls a new student; includes error checking
Andrew Binder's avatar
Andrew Binder committed
28
        void adjustProgress(string studentUserNameIn, int level);   // Changes a students level; includes error checking for student username
Andrew Binder's avatar
Andrew Binder committed
29
        int checkRoster(string student);    // Returns a student's position on vector if username student exists in vector; Returns -1 if student does not exist
Andrew Binder's avatar
Andrew Binder committed
30
        void endProgram();  // saves and ends program gracefully
Andrew Binder's avatar
Andrew Binder committed
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
        
Jared Sexton's avatar
Jared Sexton committed
40 41
        vector<Student> roster;
        
Andrew Binder's avatar
Andrew Binder committed
42
    private:
Andrew Binder's avatar
Andrew Binder committed
43
        bool teacherMenuActive = 1;
Andrew Binder's avatar
Andrew Binder committed
44
        string userName;
45
        string exitCode = "Quit";
Jared Sexton's avatar
Jared Sexton committed
46
        //vector<Student> roster;
Andrew Binder's avatar
Andrew Binder committed
47
        
Andrew Binder's avatar
Andrew Binder committed
48 49
        // 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
50
        string rosterFileName = "classRoster.txt";   // Used for use by program as import/export       
Andrew Binder's avatar
Andrew Binder committed
51
        string progressFileName = "classProgress.txt";   // Used for teacher export
Andrew Binder's avatar
Andrew Binder committed
52 53 54 55
        
};

#endif //TEACHER_H