From 3a3ece1625d6d7233a4bb9d7ec8feef88fc88c4c Mon Sep 17 00:00:00 2001 From: pcz3ky6q2 <2126302786@qq.com> Date: Mon, 17 Jun 2024 20:33:08 +0800 Subject: [PATCH] ADD file via upload --- employee.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 employee.cpp diff --git a/employee.cpp b/employee.cpp new file mode 100644 index 0000000..2c8fcf3 --- /dev/null +++ b/employee.cpp @@ -0,0 +1,14 @@ +#include "employee.h" +Employee::Employee(int id, string name, int dId) { + this->m_Id = id; + this->m_Name = name; + this->m_DeptId = dId; +} +void Employee::showInfo() // 打印职工信息 +{ + cout << "职工编号:" << this->m_Id << "\t职工姓名:" << this->m_Name + << "\t岗位:" << this->getDeptName() << "\t岗位职责:完成经理交给的任务" + << endl; +} + +string Employee::getDeptName() { return string("员工"); } \ No newline at end of file