Student.h 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
// ***********************************************************************
// NOTE:    I had to put this together to get the Teacher class working.
//          Feel free to use this file or not, but please note that the
//          Teacher.h/.cpp files depend on these exact functions and
//          function names, so please use these names in the final class.
//          
//          Thanks! -Andrew
// ***********************************************************************

#include <string>

Andrew Binder's avatar
Big fix  
Andrew Binder committed
12 13 14 15 16
using namespace std;

#ifndef STUDENT_H
#define STUDENT_H

17 18
class Student {
    public:
Jared Sexton's avatar
Jared Sexton committed
19 20 21 22
        // Default constructor
        Student() {
            userName = "NoName";
        }
23
        //Default constructor for only a username
Eddy Marinez's avatar
Eddy Marinez committed
24
        Student();
25 26 27 28 29 30 31 32 33 34
        Student(string userNameIn) {
            userName = userNameIn;
        }
        
        // Default constructor for a username and level
        Student(string userNameIn, int levelIn) {
            userName = userNameIn;
            level = levelIn;
        }
        
Jared Sexton's avatar
Jared Sexton committed
35 36 37 38 39 40
        // Copy constructor
        Student(const Student& studentIn) {
            userName = studentIn.userName;
            level = studentIn.level;
        }
        
41 42 43 44 45 46 47 48
        // Accessors
        int getLevel() {
            return level;
        }
        string getUserName() {
            return userName;
        }
        
Eddy Marinez's avatar
Eddy Marinez committed
49 50 51 52
        //Student functions.
        void displayMenu();
        void testingStage();
        
53 54 55 56 57 58 59 60 61 62 63 64 65
        // Mutators
        void setLevel(int levelIn) {
            level = levelIn;
        }
        
        void setUserName(string userNameIn) {
            userName = userNameIn;
        }
        
    private:
        string userName;
        int level = 1;
};
Andrew Binder's avatar
Big fix  
Andrew Binder committed
66 67

#endif //STUDENT_H