include <worker.h>
employee::employee(int id,string name,int post)
{
this->m_id = id;
this->m_name = name;
this->m_job = post;
}
void employee::m_show()
{
cout << "职工编号: " << this->m_id
<< "\t职工姓名: " << this->m_name
<< "\t\t岗位: " << this->m_post()
<< "\t职责: 完成经理交给的任务";
}
string employee::m_post()
{
return string("员工");
}
manager::manager(int id,string name,int post)
{
this->m_id = id;
this->m_name = name;
this->m_job = post;
}
void manager::m_show()
{
cout << "职工编号: " << this->m_id
<< "\t职工姓名: " << this->m_name
<< "\t\t岗位: " << this->m_post()
<< "\t职责: 完成老板交给的任务并下发给员工";
}
string manager::m_post()
{
return string("经理");
}
boss::boss(int id,string name,int post)
{
this->m_id = id;
this->m_name = name;
this->m_job = post;
}
void boss::m_show()
{
cout << "职工编号: " << this->m_id
<< "\t职工姓名: " << this->m_name
<< "\t\t岗位: " << this->m_post()
<< "\t职责: 完成公司的所有任务";
}
string boss::m_post()
{
return string("老板");
}