Guest User

Employee.h

a guest
Aug 11th, 2023
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.08 KB | None | 0 0
  1. #pragma once
  2. #include <string>
  3.  
  4. namespace Records
  5. {
  6.     const int DefaultStartingSalary{30'000};
  7.    const int DefaultRaiseAndDemeritAmount{1'000};
  8.     class Employee
  9.     {
  10.     public:
  11.         Employee(const std::string &firstName, const std::string &lastName);
  12.  
  13.         void promote(int raiseAmount = DefaultRaiseAndDemeritAmount);
  14.         void demote(int demeritAmount = DefaultRaiseAndDemeritAmount);
  15.         void hire();
  16.         void fire();
  17.         void display() const;
  18.  
  19.         void setFirstName(const std::string &firstName);
  20.         const std::string &getFirstName() const;
  21.         void setLastName(const std::string &lastName);
  22.         const std::string &getLastName() const;
  23.         void setEmployeeNumber(int employeeNumber);
  24.         int getEmployeeNumber() const;
  25.         void setSalary(int newSalary);
  26.         int getSalary() const;
  27.         bool isHired() const;
  28.  
  29.     private:
  30.         std::string m_firstName;
  31.         std::string m_lastName;
  32.         int m_employeeNumber;
  33.         int m_salary;
  34.         bool m_hired;
  35.     };
  36.  
  37. } // namespace Records
  38.  
  39.  
  40.  
Advertisement
Add Comment
Please, Sign In to add comment