Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. #ifndef AHREF_EMPLOYEE
  2. #define AHREF_EMPLOYEE
  3. #pragma once
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. class Employee{
  8. protected:
  9.     static int enextID;
  10. private:
  11. int ID;
  12. string username;
  13. string password;
  14. bool manager;
  15.  
  16.  
  17. public:
  18.     Employee(string username,string password,bool manager){
  19.         //ID = ++enextID;
  20.         this->username = username;
  21.         this->password = password;
  22.         this->manager = manager;
  23.     }
  24.     Employee(){}
  25.     void Employee::grantManager(){
  26.         this->manager = true;
  27.     }
  28.     void Employee::revokeManager(){
  29.         this->manager = false;
  30.     }
  31.     string Employee::getUsername(){
  32.         return username;
  33.     }
  34.     string Employee::getPassword(){
  35.         return password;
  36.     }
  37.     bool Employee::getAccess(){
  38.         return manager;
  39.     }
  40. };
  41.  int Employee::enextID = 0;
  42. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement