Student.h 1.26 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
// ***********************************************************************
// 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>

class Student {
    public:
        //Default constructor for only a username
        Student(string userNameIn) {
            userName = userNameIn;
        }
        
        // Default constructor for a username and level
        Student(string userNameIn, int levelIn) {
            userName = userNameIn;
            level = levelIn;
        }
        
        // Accessors
        int getLevel() {
            return level;
        }
        string getUserName() {
            return userName;
        }
        
        // Mutators
        void setLevel(int levelIn) {
            level = levelIn;
        }
        
        void setUserName(string userNameIn) {
            userName = userNameIn;
        }
        
    private:
        string userName;
        int level = 1;
};