Advertisement
Guest User

Untitled

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