Student.h 1.33 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 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 46 47 48 49 50
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;
};
Andrew Binder's avatar
Big fix  
Andrew Binder committed
51 52

#endif //STUDENT_H