boss.cpp 438 B

1234567891011121314151617181920212223242526
  1. #include "boss.h"
  2. //构造函数
  3. Boss::Boss(int id, std::string name, int dept_id)
  4. {
  5. this->m_ID = id;
  6. this->m_Name = name;
  7. this->m_DeptID = dept_id;
  8. }
  9. //显示个人信息
  10. void Boss::showInfo()
  11. {
  12. std::cout << "职工编号" << this->m_ID
  13. << "\t职工姓名" << this->m_Name
  14. << "\t岗位:" << this->getDeptName()
  15. << "\t岗位职责:管理公司所有事务"
  16. << std::endl;
  17. }
  18. //获取岗位名称
  19. std::string Boss::getDeptName()
  20. {
  21. return std::string("老板");
  22. }