/* * Employee.h Exercise P-E-M-C, CRTP, Step 3. */ #ifndef EMPLOYEE_H #define EMPLOYEE_H #include "CRN.h" #include "Date.h" #include "Person.h" #include namespace IDA_Person { class Employee : public Person_Cloneable // CRTP { public: Employee(const std::string& name, const IDA_Person::CRN& crn, const IDA_Date::Date& e_date, int e_number, double salary, int dept = 0); ~Employee() = default; std::string str() const override; int get_department() const; IDA_Date::Date get_employment_date() const; int get_employment_number() const; double get_salary() const; protected: friend Person_Cloneable; Employee(const Employee&) = default; private: Employee& operator=(const Employee&) = delete; friend class Manager; void set_department(int dept); void set_salary(double salary); IDA_Date::Date e_date_; const int e_number_; double salary_; int dept_; }; } // namespace IDA_Person #endif