c++课程设计-教师工资管理系统-源代码_第1页
c++课程设计-教师工资管理系统-源代码_第2页
c++课程设计-教师工资管理系统-源代码_第3页
c++课程设计-教师工资管理系统-源代码_第4页
c++课程设计-教师工资管理系统-源代码_第5页
已阅读5页,还剩27页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、教师工资管理系统源代码本文件包括四个文件,下载后请自行分开,每个文件由/分开,/后面即是要保存的文件名。本系统,包包括添加加,修改改,删除除,查询询,显示示。教师师信息保保存到文文件。有有帮助系系统,更更改字体体和背景景颜色功功能。还有,本程程序只需需编译连连接maain.Cpp 不要要把另外外三个文文件添加加到工程程,否则则会出现现连接出出错!(但是是四个文文件都要要放在同同一目录录下,因因为都要要用的。会会自动加加在Exxterrnall deepenndennciees里面面)/mmainn.cppp#inclludeeChhen.cppp#inclludeeLiiao.cppp#inc

2、lludeeusingg naamesspacce sstd;Functtionn t1000;int ccounnt;Liao abcc1;Chen abcc2;void collormme();void hellp();void mennu() /菜菜单charr c60=ttttt 欢欢 迎 使 用用 !;charr b1000=t WWelccomee too usse tthe teaacheers saalarry mmanaagemmentt syysteem !;systtem(coolorr fdd);couttnnnnneendll;coutttttt 教教师工资资管理系系

3、统nnnnenndl;coutttttt 制作人人:陈 伟 廖亚斌斌enddlenddl;coutttttt学号:08440822001110 088408820001099nnenndl;couttttttt 20010年年12月月nnnnttttenddl;for(intt i=0;ii=220;ii+)couutcii;_slleepp(400); /延延时couttnn;for(i=00;i=588;i+)couutbii;_slleepp(300); /延延时_sleeep(10000);systtem(clls);whille(11)ffflussh(sstdiin);/清清除输入

4、入流缓冲冲区syysteem(clss);cooutnnnnnenndl;cooutttttt教师师工资管管理系统统nnnn;coouttttt11.添加加教师信信息 22.修改改教师信信息enndlenndl;coouttttt33.删除除教师信信息 44.查询询教师信信息enndlenndl;coouttttt55.显示示教师信信息 66.系统统帮助信信息enndlenndl;coouttttt99.更改改皮肤颜颜色 00.退出出信息系系统nnnnenndl;coouttttt请请选择:;chhar a110;geets(a);swwitcch(aa0)ccasee 11:aabc11.a

5、ddd();brreakk;ccasee 22:aabc11.allterr();breeak;ccasee 33:aabc22.deel();brreakk;ccasee 44:aabc22.innquiiry();bbreaak;ccasee 55:aabc22.diispllay();bbreaak;ccasee 66:hhelpp();breeak;ccasee 99:ccoloormee();breeak;ccasee 00:couutnntttt谢谢使使用!nnntttt;exiit(00);bbreaak;ddefaaultt:couutnnntttt输输入错误误,请重重新选择择

6、!nnntttt;_slleepp(8000);breeak;void collormme()systtem(clls);charr a10;couttnnnnntttt11.黑白白tt2.黑绿;couttnntttt3.黑蓝ttt4.黑黑红;couttnntttt5.黑紫ttt6.黑黑黄;couttnntttt7.白粉(默默认)nnntttt;getss(a);swittch(a00)casse 1:ssysttem(coolorr 077);bbreaak;casse 2:ssysttem(coolorr 0aa);bbreaak;casse 3:ssysttem(coolorr 0bb)

7、;bbreaak;casse 4:ssysttem(coolorr 0cc);bbreaak;casse 5:ssysttem(coolorr 0dd);bbreaak;casse 6:ssysttem(coolorr 0ee);bbreaak;casse 7:ssysttem(coolorr fdd);bbreaak;deffaullt:bbreaak;void hellp()systtem(clls);couttnnnntttt 欢欢迎使用用教师工工资管理理系统;couttnntttt本系系统由陈陈伟,廖廖亚斌合合作编写写;couttnntt本系统统可以存存储教师师的教师师号,姓姓名,性性

8、别,职职称,基基本工资资,奖金金,保险险,其他他杂费,实实际工资资。其中中实际工工资=基基本工资资+奖金金-保险险-其他他杂费。;couttnntt本系统统可以添添加,修修改,删删除,显显示教师师工资信信息;还还有皮肤肤颜色修修改功能能。教师师工资都都保存在在磁盘的的Inffor.datt文件中中。;systtem(paausee);int mmainn()menuu();returrn 00;/FFuncctioon.ccpp#ifnddef Teaacheer #defiine Teaacheer#inclludee#inclludee#inclludee#inclludeeusingg

9、naamesspacce sstd;classs Fuuncttionnpubliic:striing numm; /教师号号striing namme; /姓名striing sexx; /性别striing tittle; /职称doubble basse_ppay; /基本工工资doubble rewwardd; /奖金doubble inssuree; /保险doubble othher; /其他杂杂费doubble reaalitty; /实际工工资/实实际工资资=基本本工资+奖金-保险-其他int c_numm(sttrinng ii); /按教教师号查查询int c_namme(

10、sstriing i,iint b); /按姓姓名查询询voidd c_outt(innt ii); /显示示单条教教师信息息voidd c_chaar(); /显示示汉字教教师信息息提示voidd ouut_ffilee(); /输出出到文件件voidd geet_ffilee(); /从文文件输入入;exterrn FFuncctioon tt1000;exterrn iint couunt;void Funnctiion:c_chaar()/输输出表格格头couttn - ;coutt| 教教师号 | 姓姓名 | 性别别 | 职称 |基本本工资 | 奖奖金 | 保险险 | 其他 | 实实

11、际工资资 |;coutt - ;int FFuncctioon:c_nnamee(sttrinng ii,innt bb)striing temmp;int tmpp=-11;int c=bb;geet_ffilee();tempp=i;for(intt a=0;aacoountt;a+)if(temmp=taa.nnamee)tmmp=aa;iff(c!=0)cc_ouut(aa);retuurn tmpp;int FFuncctioon:c_nnum(strringg i)/syysteem(clss);striing temmp;int tmpp=-11;get_fille();if(c

12、counnt=0)/ccouttntttt还还没有教教师信息息!enndl;elseetemmp=ii;forr(innt ii=0;iccounnt;ii+)iff(teemp=ti.numm)ttmp=i;bbreaak;retuurn tmpp;/教师号号 姓姓名 性别 职称称 基基本工资资 奖金金 保保险 其其他 实实际工资资void Funnctiion:c_outt(innt ii)/输输出教师师信息coutt| ssetww(111)tii.nnum|settw(77)tii.nnamee |ssetww(5)tti.seex |settw(66)tii.ttitlle|sset

13、ww(9)tti.baase_payy|seetw(6)ti.rewwardd|seetw(6)ti.inssuree|seetw(6)ti.othher|settw(99)tii.rreallityy |;coutt - ;void Funnctiion:geet_ffilee()/文件件读出/syysteem(clss);ifsttreaam iin;in.oopenn(IInfoor.ddat,ioos:in);if(!in)cerrrti.nummtti.naameti.sexxtti.tiitleetti.baase_payytti.reewarrdtii.iinsuureti.ot

14、hherti.reaalitty;in.cclosse();counnt=ii;if(tt0.nuum=00)couunt=0;/coouttttt信信息读取取完毕!一共ccounnt条eendll;void Funnctiion:ouut_ffilee()/文文件保存存/syysteem(clss);ofsttreaam oout;out.opeen(Inffor.datt,iios:ouut);for(intt i=0;ii=ccounnt;ii+)if(i!=0)ouutenddl;outttti.nuum tti.naame tii.ssex tii.ttitlle tti.baase

15、_payy ti.rewwardd ti.inssuree ti.othher tii.rreallityy;out.cloose();/coouttttt信信息保存存完毕!一共ii条enndl;#endiif/LLiaoo.cppp#inclludeeFuuncttionn.cpppusingg naamesspacce sstd;/#iffndeef _Liaao /#deefinne _Liaaoclasss Liiao:pubblicc Fuuncttionnpubliic:voidd addd();voidd allterr();/#enndiffvoid Liaao:addd()s

16、ysttem(clls);striing temmp;int tmpp,i;coutteendllteemp;tmp=c_nnum(temmp);if(ttmp!=-11)couutnnntttt已已存在该该教师信信息!请请重新输输入!nnnntttt;_slleepp(10000);retturnn;i=coountt;ti.nuum=ttempp;coutteendllti.namme;coutteendllti.sexx;coutteendllti.tittle;coutteendllti.basse_ppay;coutteendllti.rewwardd;coutteendllti.i

17、nssuree;coutteendllti.othher;ti.reealiity=tii.bbasee_paay+tti.reewarrd-tti.innsurre-tti.ottherr;out_fille();void Liaao:altter() /修修改striing temmp;systtem(clls);int tmpp=c_numm(ttestt);if(ccounnt=0)couutnnntttt还还没有教教师信息息!请先先输入!;_slleepp(10000);retturnn;elseecouutttempp;tmpp=c_numm(teemp);if(tmpp=-1)c

18、ooutnnntttt没有找找到该教教师信息息!nnnntttt;/_slleepp(10000);elssec_chaar();c_outt(tmmp);cooutnnntttt1.修修改编号号 2.修改姓姓名;cooutnnntttt3.修修改性别别 4.修改职职称;cooutnnntttt5.修修改工资资 6.修改奖奖金;cooutnnntttt7.修修改保险险 8.修改杂杂费;cooutnnntttt0.取取消修改改;chhar a110;ffflussh(sstdiin);geets(a);swwitcch(aa0)ccasee 11:whiile(1)be:couutttempp;

19、forr(innt ii=0;iccounnt;ii+)if(temmp=tii.nnum)couutnnntttt已已有相同同教师号号信息存存在!n;gotto bbe;tttmp.nuum=ttempp;breeak;breeak;ccasee 22:couuttttmmp.namme;breeak;ccasee 33:couuttttmmp.sexx;breeak;ccasee 44:couuttttmmp.tittle;breeak;ccasee 55:couuttttmmp.basse_ppay;breeak;ccasee 66:couuttttmmp.rewwardd;breeak

20、;ccasee 77:couuttttmmp.inssuree;breeak;ccasee 88:couuttttmmp.othher;breeak;ccasee 00:breeak; ttmpp.rreallityy=ttmpp.bbasee_paay+tttmmp.rewwardd-ttmpp.iinsuure-tttmp.ottherr;coountt-;ouut_ffilee();_sleeep(10000);/CChenn.cppp#inclludeeFuuncttionn.cpppusingg naamesspacce sstd;exterrn FFuncctioon tt1000

21、;exterrn iint couunt;/#iffndeef _Cheen /#deefinne _Cheenclasss Chhen:pubblicc Fuuncttionnpubliic:voidd deel();voidd diispllay();voidd innquiiry();voidd sttatiistiics();/#enndiffvoid Cheen:dell()striing temmp;systtem(clls);int tmpp=c_numm(ttestt);if(ccounnt=0)coout nntttt还没没有教师师信息!请先输输入!;_ssleeep(110

22、000);reeturrn;elseecouutttempp;tmpp=c_numm(teemp);if(tmpp=-1)ccouttnntttt没有有找到该该教师信信息!;_sleeep(10000);elssec_chaar();c_outt(tmmp);cooutnnntttt确定删删除此教教师信息息?(确确定按 Y);chhar a110;ffflussh(sstdiin);geets(a);swwitcch(aa0)ccasee YY:ccasee yy:forr(innt ii=tmmp;iicoountt;i+)tii=tti+1;couunt-=2;outt_fiile();c

23、ouutnnntttt删删除成功功!;breeak; ddefaaultt : couutnnntttt没没有删除除!;breeak;_sleeep(10000);void Cheen:dissplaay()systtem(clls);get_fille();if(ccounnt=0)couutnntttt还没有有教师信信息!请请先输入入!enndl;_slleepp(10000);elseec_ccharr();forr(innt ii=0;iccounnt;ii+)c_outt(i);staatissticcs();couutnnntttt;sysstemm(ppausse);void C

24、heen:inqquirry()int i;striing temmp;systtem(clls);i=c_numm(ttestt);if(ccounnt=0)couutnnntttt还还没有教教师信息息!请先先输入!;_slleepp(10000);retturnn;whille(11)syysteem(clss);cooutnnnnnttt11.按教教师号查查询 2.按姓名名查找 00.返回回菜单nntttt;chhar a110;ffflussh(sstdiin);geets(a);swwitcch(aa0)ccasee 11:couutttempp; i=c_nnum(temmp);if(i=-1)couutnnntttt没没有找到到该

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论