C++仓库管理系统Word格式.docx

上传人:b****2 文档编号:14824996 上传时间:2022-10-25 格式:DOCX 页数:15 大小:17.64KB
下载 相关 举报
C++仓库管理系统Word格式.docx_第1页
第1页 / 共15页
C++仓库管理系统Word格式.docx_第2页
第2页 / 共15页
C++仓库管理系统Word格式.docx_第3页
第3页 / 共15页
C++仓库管理系统Word格式.docx_第4页
第4页 / 共15页
C++仓库管理系统Word格式.docx_第5页
第5页 / 共15页
点击查看更多>>
下载资源
资源描述

C++仓库管理系统Word格式.docx

《C++仓库管理系统Word格式.docx》由会员分享,可在线阅读,更多相关《C++仓库管理系统Word格式.docx(15页珍藏版)》请在冰豆网上搜索。

C++仓库管理系统Word格式.docx

//员工编号

charAddress[100];

//家庭地址

protected:

charname[30];

//员工姓名

floatfixedSalary;

//固定工资

floatMonthSalary;

//月薪

public:

employee();

//构造函数,录入员工个人信息

voidShowInfor();

//显示员工个人及工资信息

voidRecordInfor(char*pInfBuffer);

//将个人信息写入缓冲区

//获得工作类别

virtualchar*GetWorkStyle()=0;

//计算员工工资的虚函数,因为只提供一个统一的接口,所以不需要添加任何实际的代码

virtualvoidCountSalary()=0;

};

#endif

//employee.cpp*

#include"

employee.h"

iostream.h"

stdio.h"

//构造函数,录入员工个人信息

employee:

:

employee()

{

cout<

<

endl;

//录入员工姓名

"

请输入员工姓名:

"

;

cin>

>

name;

//录入员工编号

请输入员工编号(1000-9999):

cin>

number;

//检查员工编号,保证编号正确

while(number<

1000||number>

9999)

{

cout<

endl<

员工编号应为四位整数,请重新输入:

cin>

number;

}

//录入家庭地址

请输入家庭地址:

Address;

//默认初始月薪为零

MonthSalary=0.0;

//显示员工个人及工资信息

voidemployee:

ShowInfor()

//显示员工姓名

员工姓名:

name<

//显示员工编号

员工编号:

number<

//显示家庭地址

家庭地址:

Address<

//显示工作类别

工作类别:

GetWorkStyle()<

//显示月薪

if(MonthSalary==0.0)

cout<

月薪:

尚未计算"

else

MonthSalary<

//将个人信息写入缓冲区

RecordInfor(char*pInfBuffer)

intj;

j=sprintf(pInfBuffer,"

%s\r\n"

name);

j+=sprintf(pInfBuffer+j,"

%d\r\n"

number);

Address);

GetWorkStyle());

j+=sprintf(pInfBuffer+j,"

尚未计算\r\n\r\n"

);

else

%f\r\n\r\n"

MonthSalary);

}

//Salesman.h*

#ifndefH_SALESMAN

#defineH_SALESMAN

//售货员类

classSalesman:

publicemployee

floatsaleSum;

//售货员的销售额

floatgetRate;

//售货员的提成比率

Salesman();

//构造函数,录入售货员个人信息

char*GetWorkStyle();

voidCountSalary();

//计算售货员的工资

//Salesman.cpp*

Salesman.h"

//构造函数,录入售货员个人信息

Salesman:

Salesman()

//录入售货员的固定月薪

请输入售货员的固定月薪:

fixedSalary;

//录入售货员的当月销售额

请输入售货员的提成比率"

getRate;

//获得工作类别

char*Salesman:

GetWorkStyle()

return"

售货员"

//计算售货员的工资

voidSalesman:

CountSalary()

//得到售货员的当月销售额

请输入售货员"

的当月销售额"

saleSum;

//工资=固定工资+营业额×

提成比率

MonthSalary=fixedSalary+saleSum*getRate;

//warehouseman.h*

#ifndefH_WAREHOUSEMAN

#defineH_WAREHOUSEMAN

//库管员类

classWarehouseman:

floatbonus;

//库管员的奖金

Warehouseman();

//构造函数,录入库管员个人信息

//计算库管员的工资

//warehouseman.cpp*

Warehouseman.h"

//构造函数,录入库管员个人信息

Warehouseman:

Warehouseman()

{cout<

//录入库管员的固定月薪

请输入库管员的固定月薪:

char*Warehouseman:

库管员"

//计算库管员的工资

voidWarehouseman:

//得到库管员的当月奖金

请输入库管员"

的当月奖金"

bonus;

//工资=固定工资+当月奖金

MonthSalary=fixedSalary+bonus;

//Manager.h*

#ifndefH_MANAGER

#defineH_MANAGER

Employee.h"

//经理类

classManager:

publicEmployee

floatOfficeExpense;

//经理的办公费用

Manager();

//构造函数,录入经理个人信息

//计算经理的工资

//Manager.cpp*

Manager.h"

//构造函数,录入经理个人信息

Manager:

Manager()

//录入经理的固定月薪

请输入经理的固定月薪:

char*Manager:

经理"

//计算经

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 外语学习 > 韩语学习

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1