毕业设计小型企业工资管理系统Word格式文档下载.docx

上传人:b****1 文档编号:5883458 上传时间:2023-05-05 格式:DOCX 页数:20 大小:19.71KB
下载 相关 举报
毕业设计小型企业工资管理系统Word格式文档下载.docx_第1页
第1页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第2页
第2页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第3页
第3页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第4页
第4页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第5页
第5页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第6页
第6页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第7页
第7页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第8页
第8页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第9页
第9页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第10页
第10页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第11页
第11页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第12页
第12页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第13页
第13页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第14页
第14页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第15页
第15页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第16页
第16页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第17页
第17页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第18页
第18页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第19页
第19页 / 共20页
毕业设计小型企业工资管理系统Word格式文档下载.docx_第20页
第20页 / 共20页
亲,该文档总共20页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

毕业设计小型企业工资管理系统Word格式文档下载.docx

《毕业设计小型企业工资管理系统Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《毕业设计小型企业工资管理系统Word格式文档下载.docx(20页珍藏版)》请在冰点文库上搜索。

毕业设计小型企业工资管理系统Word格式文档下载.docx

课程设计(论文)评阅意见

项目

等   级

优秀

良好

中等

及格

不及格

课程设计态度评价

出勤情况评价

任务难度评价

工作量饱满评价

设计中创新性评价

论文书写规范化评价

综合应用能力评价

综合评定等级

优秀( )良好( )中等( )及格( )不及格( )

评阅人 谢昕职称副教授

2007年7月11日

目 录

一、需求分析

1.从要求上来看是要对各个员工的各种情况(名字、年龄、性别、职位、工资状况)进行输入。

然后可以输出.

2.可以对于员工数据进行修改,可以查询.

3.对于员工的各种情况系统还可以进行统计排名.

二、概要设计

首先,创建了一个employee类.然后派生出四个类:

manager、technician、salesman、salesmanager.在派生类中定义了三个构造函数,分别是:

数据输入函数(Input),表格输出函数(Print),排序函数(Pay).

其次,在总体结构上,建立以各根菜单,用于选择各种功能.

1.Input(数据输入):

输入员工的各种数据.

2.Total(数据统计):

将员工的总数据进行对比排序,然后输出.

3.Output(数据显示):

显示输入的各种数据.

4.Save(数据保存):

对输入的数据进行保存备份.

5.Eixt(退出程序):

执行退出程序命令.

三、详细设计

定义了各个岗位的人员的类,并把每个类的人员的属性设为类中的保护成员,其中技术工的工作时间和每小时的所得为私有成员,而销售员的销售额、经理的工资和销售经理的所辖部门的销售额和其底薪设为公有成员,再依次录入。

根据所有类的工资算法在其所属类中定义一个函数voidpay()来根据各个职位的具体情况来计算工资,并且算出的工资经过冒泡法排序.

voidprinttotal()

{

cout<

<

"

├─────┴──┬──┴─────┤"

endl;

│Total │  "

setw(10)<

total<

│"

└────────┴────────┘"

}

通过do-while循环以及制表格和setw的使用将输入的数据和统计并排序的数据以表格的形式打印出来,销售额合计一栏宽度要大些。

voidsaleprint()

cout<

│"

no1<

name1<

sale1<

├─────┼─────┼─────┤"

no2<

name2<

sale2<

no3<

name3<

sale3<

no4<

name4<

sale4<

voidprint()

├─────┼─────┼─────┼─────┼─────┤"

no<

name<

sex<

\

<

age<

salary<

通过函数save()来将输入的数据和统计并排序的数据进行保存.例如:

voidsave()

fstreamoutfile;

outfile.open("

f:

flsdfj.txt"

ios:

:

app);

if(!

outfile)

fcan'

topen.\n"

;

abort();

outfile<

Salesmanger"

ID"

NAME"

SEX"

AGE"

SALARY"

}

5.Eixt(退出):

利用exit来完成退出系统功能。

四、设计和调试分析

程序清单:

#include<

iostream.h>

stdlib.h>

fstream.h>

iomanip.h>

string.h>

classemployee

{

public:

employee()

salary=0;

voidpay(){}

voidprint(){}

voidinput()

ID:

cin>

>

no;

NAME:

name;

SEX(m/w):

sex;

AGE:

age;

protected:

intno;

charname[8];

floatsalary;

charsex;

intage;

};

classmanager:

virtualpublicemployee

floatmonthlypay,sale;

manager(){monthlypay=8000;

}

voidinput(){cout<

Manger"

employee:

input();

voidsave()

voidpay(){salary=monthlypay;

sex\

<

classtechnician:

private:

floathourlyrate;

intworkhours;

technician(){hourlyrate=100;

voidpay()

Workhour:

workhours;

salary=hourlyrate*workhours;

TECHNICIAN"

classsalesman:

floatcommrate;

floatsales;

salesman(){commrate=0.04;

SALEMAN"

Salesvolume:

sales;

salary=sales*commrate;

setw(10)\

classsalesmanager:

virtualpublicmanager,virtualpublicsalesman

floattotal;

intno1,no2,no3,no4;

charname1[8],name2[8],name3[8],name4[8];

floatsale1,sale2,sale3,sale4;

voidsalemanager()

monthlypay=5000;

commrate=0.005;

voidsavesale()

Thesalaryofsalemanofsalesmangerandthemselves"

Thesalesvolumeofeverydepartment:

salary=monthlypay+commrate*total;

floattotalsale(){total=sale1+sale2+sale3+sale4;

returntotal;

voidsort(salesmanagerp)

inttmp,i,j;

for(j=0;

j<

2;

j++)

for(i=0;

i<

i++)

if(total<

p.salary)

{

tmp=salary;

total=p.salary;

p.salary=tmp;

tmp=no;

no=p.no;

p.no=tmp;

}

voidsaler()

StaffID:

no1;

StaffNAME:

name1;

Salesvolume:

sale1;

no2;

name2;

sale2;

no3;

name3;

sale3;

no4;

name4;

sale4;

voidsaleprint()

voidmain()

managerm[4];

techniciant[4];

salesmans[4];

salesmanagersm[4];

t[1].save();

intflag=1,operate;

do{

####Thesystemofsalarymanger####\n"

┌─────────────┐\n"

│Choseyouractions│\n"

│Input:

1,Enter│\n"

│Total:

2,Enter│\n"

│Output:

3,Enter│\n"

│Save:

4,Enter│\n"

│Exit:

5,Enter│\n"

└─────────────┘\n"

Pleasechoseoneaction:

"

cin>

operate;

switch(operate)

case1:

Waitingforaminute!

{

for(inti=0;

4;

{m[i].input();

for(intj=0;

{t[j].input();

for(intk=0;

k<

k++)

{s[k].input();

for(intl=0;

l<

l++)

{sm[l].input();

};

{m[i].pay();

{t[j].pay();

{s[k].pay();

{sm[l].pay();

sm[l].saler();

};

break;

case2:

cout<

for(intl=0;

sm[l].totalsale();

for(intj=0;

sm[j].sort(sm[j+1]);

Thesalemanofthefirstsalesmanger"

┌─────┬─────┬─────┐"

│ ID │ NAME │SALARY│"

sm[0].saleprint();

sm[0].printtotal();

Theorderiscomplete"

Listnamesofeverysalesmanger"

┌─────┬─────┬─────┬─────┬─────┐"

│ ID │ NAME │ SEX  │ AGE  │SALARY │"

sm[k].print();

└─────┴─────┴─────┴─────┴─────┘"

case3:

{

Theblankofthe:

│ ID │ NAME │ SEX  │ AGE  │SALARY │"

for(inti=0;

{m[i].print();

┌─────┬─────┬─────┬────

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

当前位置:首页 > IT计算机 > 电脑基础知识

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2