Teacher.h 2.37 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
31
        
Andrew Binder's avatar
Andrew Binder committed
32 33 34
        //  Accessors
        const string getUserName();
        const string getExitCode();
Andrew Binder's avatar
Andrew Binder committed
35
        const bool getMenuActive();
Jared Sexton's avatar
Jared Sexton committed
36
        const Student getStudent(int vectorPosition);
Andrew Binder's avatar
Andrew Binder committed
37 38
        
        //  Mutators
Andrew Binder's avatar
Andrew Binder committed
39 40
        void setExitCode(string exitCodeIn);
        void setUserName(string userNameIn);
41
        void setStudent(Student studentIn); // I think it's safe to say that studentIn will be a student in the vector; so the function will find where the student goes in the vector by itself 
Andrew Binder's avatar
Andrew Binder committed
42
        
43
        // vector<Student> roster;
Jared Sexton's avatar
Jared Sexton committed
44
        
Andrew Binder's avatar
Andrew Binder committed
45
    private:
Andrew Binder's avatar
Andrew Binder committed
46
        bool teacherMenuActive = 1;
Andrew Binder's avatar
Andrew Binder committed
47
        string userName;
48
        string exitCode = "Quit";
49
        vector<Student> roster;
Andrew Binder's avatar
Andrew Binder committed
50
        
Andrew Binder's avatar
Andrew Binder committed
51 52
        // 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
53
        string rosterFileName = "classRoster.txt";   // Used for use by program as import/export       
Andrew Binder's avatar
Andrew Binder committed
54
        string progressFileName = "classProgress.txt";   // Used for teacher export
Andrew Binder's avatar
Andrew Binder committed
55 56 57
        
};

Andrew Binder's avatar
Andrew Binder committed
58 59 60
#endif //TEACHER_H

//