/* * Employee.cc Exercise P-E-M-C, CRTP, Step 2. */ #include "CRN.h" #include "Date.h" #include "Employee.h" #include namespace IDA_Person { using namespace std; using namespace IDA_Date; Employee::Employee(const string& name, const CRN& crn, const Date& e_date, int e_nbr, double salary, int dept) : Person_Cloneable{ name, crn }, e_date_{ e_date }, e_number_{ e_nbr }, salary_{ salary }, dept_{ dept } {} string Employee::str() const { return Person::str() + " (Employee) " + e_date_.str() + ' ' + std::to_string(dept_); } int Employee::get_department() const { return dept_; } void Employee::set_department(int dept) { dept_ = dept; } Date Employee::get_employment_date() const { return e_date_; } int Employee::get_employment_number() const { return e_number_; } double Employee::get_salary() const { return salary_; } void Employee::set_salary(double salary) { salary_ = salary; } } // namespace IDA_Person