Teacher.h 2.08 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
        
Jared Sexton's avatar
Jared Sexton committed
31 32 33
        /* Andrew - I added this function to search for a given student in the roster (for use in login stage) */
        bool checkRoster(string student);
        
Andrew Binder's avatar
Andrew Binder committed
34 35 36
        //  Accessors
        const string getUserName();
        const string getExitCode();
Andrew Binder's avatar
Andrew Binder committed
37
        const bool getMenuActive();
Andrew Binder's avatar
Andrew Binder committed
38 39
        
        //  Mutators
Andrew Binder's avatar
Andrew Binder committed
40 41
        void setExitCode(string exitCodeIn);
        void setUserName(string userNameIn);
Andrew Binder's avatar
Andrew Binder committed
42 43
        
    private:
Andrew Binder's avatar
Andrew Binder committed
44
        bool teacherMenuActive = 1;
Andrew Binder's avatar
Andrew Binder committed
45
        string userName;
46
        string exitCode = "Quit";
Andrew Binder's avatar
Andrew Binder committed
47 48
        vector<Student> roster;
        
Andrew Binder's avatar
Andrew Binder committed
49 50
        // 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
51
        string rosterFileName = "classRoster.txt";   // Used for use by program as import/export       
Andrew Binder's avatar
Andrew Binder committed
52
        string progressFileName = "classProgress.txt";   // Used for teacher export
Andrew Binder's avatar
Andrew Binder committed
53 54 55 56
        
};

#endif //TEACHER_H