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

using namespace std;

Andrew Binder's avatar
Andrew Binder committed
6 7
class Student {
    public:
Andrew Binder's avatar
Andrew Binder committed
8 9 10
        Student(string userNameIn) {
            userName = userNameIn;
        }
11 12 13 14 15
        
        Student(string userNameIn, int levelIn) {
            userName = userNameIn;
            level = levelIn;
        }
Andrew Binder's avatar
Andrew Binder committed
16
    
Andrew Binder's avatar
Andrew Binder committed
17 18 19 20 21 22 23
        int getLevel() {
            return level;
        }
        string getUserName() {
            return userName;
        }
        
Andrew Binder's avatar
Andrew Binder committed
24 25 26 27 28 29 30 31
        void setLevel(int levelIn) {
            level = levelIn;
        }
        
        void setUserName(string userNameIn) {
            userName = userNameIn;
        }
        
Andrew Binder's avatar
Andrew Binder committed
32 33 34 35
    private:
        string userName;
        int level = 1;
};
Andrew Binder's avatar
Andrew Binder committed
36 37 38

class Teacher {
    public:
39
        Teacher(); 
Andrew Binder's avatar
Andrew Binder committed
40 41 42 43 44
        Teacher(string userNameIn);   //  Default constructor
        
        //  Teacher Functions
        void displayMenu();
        void displayProgress();  //  Opens menu, teacher get get all (gradebook style) or a student
Andrew Binder's avatar
Andrew Binder committed
45
        void exportProgress();  //  outputProgress() in UML
46 47
        void saveProgress();
        void importProgress();
Andrew Binder's avatar
Andrew Binder committed
48 49
        void enrollStudent(Student studentIn);
        void adjustProgress(string studentUserNameIn, int level);
Andrew Binder's avatar
Andrew Binder committed
50 51 52 53 54 55 56
        void endProgram();
        
        //  Accessors
        const string getUserName();
        const string getExitCode();
        
        //  Mutators
Andrew Binder's avatar
Andrew Binder committed
57 58
        void setExitCode(string exitCodeIn);
        void setUserName(string userNameIn);
Andrew Binder's avatar
Andrew Binder committed
59 60 61
        
    private:
        string userName;
62
        string exitCode = "Quit";
Andrew Binder's avatar
Andrew Binder committed
63 64
        vector<Student> roster;
        
Andrew Binder's avatar
Andrew Binder committed
65
};