学校教师工资管理系统 说明书Word下载.docx

上传人:b****3 文档编号:6821361 上传时间:2023-05-07 格式:DOCX 页数:30 大小:116.61KB
下载 相关 举报
学校教师工资管理系统 说明书Word下载.docx_第1页
第1页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第2页
第2页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第3页
第3页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第4页
第4页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第5页
第5页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第6页
第6页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第7页
第7页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第8页
第8页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第9页
第9页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第10页
第10页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第11页
第11页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第12页
第12页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第13页
第13页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第14页
第14页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第15页
第15页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第16页
第16页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第17页
第17页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第18页
第18页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第19页
第19页 / 共30页
学校教师工资管理系统 说明书Word下载.docx_第20页
第20页 / 共30页
亲,该文档总共30页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

学校教师工资管理系统 说明书Word下载.docx

《学校教师工资管理系统 说明书Word下载.docx》由会员分享,可在线阅读,更多相关《学校教师工资管理系统 说明书Word下载.docx(30页珍藏版)》请在冰点文库上搜索。

学校教师工资管理系统 说明书Word下载.docx

实行电子化的工资管理,可以让人力资源管理人员从繁重琐碎的案头工作解脱出来,去完成更重要的工作。

在本次课程设计当中,我的课题就是设计“学校教师工资管理系统”的仿真软件。

通过设计任务书中的要求以及介绍,大致确定了主要的目的是:

学习和掌握软件开发过程的问题分析、系统设计、程序编码、测试等基本方法和技能。

为了更好的完成此次课程设计,我首先了解了学校教师的管理结构,并查询了大量书籍,制订了合理的方案,然后设计出大体的框架,接下来将各个部分慢慢的扩充起来,使其充盈丰实,然后完成了大致的雏形,并通过不断地测试和调试,完成了最终的成品。

最后,经过自己的一番努力以及指导老师的悉心指导,终于完成了此方针软件的设计,通过这次课程设计,我基本了解并且学习了如何分析研究数据对象的特性、数据的组织方法、如何选取合适的数据逻辑结构和存储结构。

这对以后的学习都有着很大的帮助。

 

正文

1.采用类c语言定义相关的数据类型

#include<

iostream.h>

string.h>

fstream.h>

stdlib.h>

constintEMP=1000;

//学院教工总人数(跟据需要可以放缩)************************

voidnumbertochar(char*,double);

//定义基类教工类employee******************************************************

classemployee{

private:

//姓名教工号职位性别电话号码************************

charname[10],number[10],post[10],sex[10],telephone[15];

intage;

//年龄*************************************************************

doublemonthwages;

//月工资*************************************************

staticlongemployees;

//学院教工人数***************************************

2.各模块的伪码算法

charn[5];

cin>

>

n;

if(strlen(n)==1)

{

switch(n[0])

{

case'

1'

:

inputtechnician(employeeall[i]);

i++;

break;

2'

inputmanager(employeeall[i]);

3'

inputseller(employeeall[i]);

4'

inputsellermanager(employeeall[i]);

5'

system("

cls"

);

//刷新屏幕**********************

compositorall(employeeall);

//教工的工资降序排列

outputtofile(employeeall);

//把资料保存到文件中*

cout<

<

"

是否打印资料(y/n)"

;

chara[5];

cin>

a;

if(a[0]=='

y'

||a[0]=='

Y'

printfile();

//把文件中的资料显示到显示器上

return1;

default:

\t错误!

请重新输入!

\n"

}

}

else

cout<

3.函数的调用关系图

教工类

辅导员类

讲师类

教授类

行政人员类

4.调试分析

a、调试中遇到的问题及对问题的解决方法

问题:

提高数据录入的正确性

解决方法:

1.在录入数据的时候由于性别只有男、女两性别不可能有另外的第三性别出现,所以录入性别时是通过选择的方式录入而不是键入性别这样就能有效的避免第三性别的出现。

2.一个人的姓名都会在英文15个字母、汉字4个内,所以通过加一条语句:

if(strlen(temp)>

15来判断姓名的长度,若不符合则要求重新输入,符合则继续运行下去。

3.在录入年龄的时候,年龄不可能是一个小于0的数,也不可能是太大的数,通过if(temp<

=18||temp>

65)语句来判断该年龄是否在18至65之间。

年龄在大于18是因为我们国家的法定成年年龄是18岁,要满18岁才能参加工作;

而小于65周岁呢,一般年高60岁就是退休年龄不再参加工作了。

b、算法的时间复杂度和空间复杂度

5.测试结果

6.源程序(带注释)

public:

longgetemployees()

{

returnemployees;

}

char*getnumber()

returnnumber;

char*getname()

returnname;

char*getpost()

returnpost;

char*getsex()

returnsex;

char*gettelephone()

returntelephone;

intgetage()

returnage;

doublegetmonthwages()

returnmonthwages;

voidsetnumber(chartemp[])

renumber:

if(strlen(temp)>

15)

输入错误(不能多余15个字母或5个汉字)!

请重新输入。

chartemp1[15];

教工号:

\t"

temp1;

if(strlen(temp1)>

gotorenumber;

else

strcpy(number,temp1);

else

strcpy(number,temp);

voidsetname(chartemp[])

chartemp1[10];

姓名:

strcpy(name,temp1);

strcpy(name,temp);

employees++;

voidsetpost(chartemp[])

10)

输入错误(不能多余十个字母或五个汉字)!

职位\t"

strcpy(post,temp1);

strcpy(post,temp);

voidsetsex()

cout<

性别(1、男;

2、女):

resex:

chartemp1[5];

cin>

if(strlen(temp1)==1)

switch(temp1[0])

{

case'

strcpy(sex,"

男"

break;

女"

default:

cout<

错误(请选择1或2)"

gotoresex;

}

gotoresex;

voidsettelephone(chartemp[])

retelephone:

20)

输入错误(不能多余二十个数字)!

chartemp1[20];

电话号码:

cin>

if(strlen(temp1)>

gotoretelephone;

else

strcpy(telephone,temp1);

else

strcpy(telephone,temp);

voidsetage(inttemp)

if(temp<

65)

输入错误!

inttemp1;

年龄:

if(temp1<

=0||temp1>

120)

age=temp1;

age=temp;

voidsetmonthwages(doubletemp)

monthwages=temp;

};

longemployee:

employees=0;

//讲师类的定义*****************************************************************

classtechnician:

publicemployee{

protected:

staticinttechnicians;

//用来记数讲师的数量********************************

intgettechnicians()

returntechnicians;

technicians++;

employee:

setnumber(temp);

voidmonthly_wages(doubletemp)

setmonthwages(temp*100);

//讲师的工资为课程量*课时工资100每课时**************************

inttechnician:

technicians=0;

//辅导员类的定义***************************************************************

classmanager:

publicemployee{

staticintmanagers;

//辅导员的数量*****************************************

intgetmanagers()

returnmanagers;

voidmonthly_wages()

setmonthwages(5000);

//辅导员的工资为五千固定***************************

managers++;

intmanager:

managers=0;

//教授类的定义*****************************************************************

classseller:

staticdoublesellroom;

staticdoublesellrooms;

staticintsellers;

intgetsellers()

returnsellers;

doublegetsellroom()

returnsellroom;

doublegetsellrooms()

returnsellrooms;

voidsetsellroom(doubletemp)

sellroom=temp;

sellrooms=sellrooms+temp;

}

setmonthwages(sellroom*0.04);

sellers++;

doubleseller:

sellroom=0;

sellrooms=0;

intseller:

sellers=0;

//行政人员类的定义*************************************************************

classsellermanager:

publicseller{

staticintsellermanagers;

//行政人员的数量*********************************

intgetsellermanagers()

returnsellermanagers;

setmonthwages(sellrooms*0.005+5000);

sellermanagers++;

intsellermanager:

sellermanagers=0;

//各数据输入的原函数声明*******************************************************

voidinputtechnician(employee&

voidinputmanager(employee&

voidinputseller(employee&

voidinputsellermanager(employee&

voidcompositorall(employee*);

//对所有教工的工资降序排列***********************

intprintfile();

//把文件中的资料显示到显示器上*********************************

voidoutputtofile(employee*);

//把资料保存到文件中******************************

//主函数***********************************************************************

intmain()

{

employeeemployeeall[EMP];

inti=0;

while(i<

EMP)

system("

//刷新屏幕**********************************************

***本系统能存入"

EMP<

个教工的资料***\n"

***已经输入了"

employeeall[0].getemployees()

教工的资料****\n"

********************************\n"

***1、输入讲师的资料;

***\n"

***2、输入辅导员的资料;

***3、输入教授的资料;

***4、输入行政人员的资料;

***5、退出输入!

请选择:

charn[5];

//刷新屏幕**************************************

//对所有教工的工资降序排列**********

//把资料保存到文件中*****************

//把文件中的资料显示到显示器上*****************

compositorall(employeeall);

//对所有教工的工资降序排列**********************

outputtofile(employeeall);

//把资料保存到文件中*****************************

printfile();

return0;

}

//教工基本信息的输入函数*******************************************************

voidinputtechnician(employee&

empl)

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

当前位置:首页 > PPT模板 > 商务科技

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

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