c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc

上传人:laozhun 文档编号:2384660 上传时间:2023-02-17 格式:DOC 页数:20 大小:37KB
返回 下载 相关 举报
c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第1页
第1页 / 共20页
c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第2页
第2页 / 共20页
c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第3页
第3页 / 共20页
c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第4页
第4页 / 共20页
c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第5页
第5页 / 共20页
点击查看更多>>
资源描述

《c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc》由会员分享,可在线阅读,更多相关《c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc(20页珍藏版)》请在三一办公上搜索。

1、 课程设计报告学院:天津理工大学华信软件学院专业名称:软件工程课程设计科目C语言课程设计所在班级:一班学生学号:20105945学生姓名:吴健指导教师:陈立娜完成时间:2011年4月-6月 教师工资管理系统 每个教师的信息为:教师号、姓名、性别、单位名称、家庭住址、基本工资、津贴、生活补贴、应发工资、电话费、水电费、房租、所得税、卫生费、公积金、合计扣款、实发工资。注:应发工资基本工资+津贴+生活补贴;合计扣款电话费+水电费+房租+所得税+卫生费+公积金;实发工资应发工资-合计扣款。 A、教师信息处理 1输入教师信息 2 插入(修改)教师信息: 3 删除教师信息: 4 浏览教师信息: 提示:具

2、体功能及操作参考题1。 B、教师数据处理: 1 按教师号录入教师基本工资、津贴、生活补贴、电话费、水电费、房租、所得税、卫生费、公积金等基本数据。 2 教师实发工资、应发工资、合计扣款计算。 提示:计算规则如题目。 3 教师数据管理 提示:输入教师号,读出并显示该教师信息,输入新数据,将改后信息写入文件 4 教师数据查询: 提示:输入教师号或其他信息,即读出所有数据信息,并显示出来。 5 教师综合信息输出 提示:输出教师信息到屏幕。 1. 课程设计目的和要求巩固和加强c语言程序设计课程的理论知识。掌握c语言的基本概念,语法,语义和数据类型的使用特点。掌握c语言程序设计的方法及编程技巧,能正确使

3、用c语言编写程序。进一步理解和运用结构化程序设计的思想和放法。使学生掌握调试程序的基本方法及上机操作方法。通过查询手册和文献资料,培养学生独立分析问题和解决问题的能力。初步掌握开发一个小型实用系统的基本方法。培养学生的创新能力和创新思维。培养学生良好的程序设计风格。进一步理解和运用2.课程设计题目及内容教师工资管理系统 每个教师的信息为:教师名,姓名,性别,单位名称,家庭住址,基本工资,津贴,生活补贴,应发工资,电话费,水电费,房租,所得税,卫生费,公积金,合计扣款,实发工资。注:应发工资基本工资+津贴+生活补贴;合计扣款电话费+水电费+房租+所得税+卫生费+公积金;实发工资应发工资?合计扣款

4、。 1教师信息处理输入教师信息插入(修改)教师信息删除教师信息;浏览教师信息;(提示:具体功能及操作参考题1。)2教师数据处理;按教师号录入教师基本工资,津贴,生活补贴,电话费,水电费,房租,所得税,卫生费,公积金等基本信息;教师实发工资、应发公资、合计扣款;教师数据管理;(提示:输入教师号,读出并显示该教师信息,输入新数据,将改后信息写入文件。)教师数据查询;(提示:输入教师好或其他信息,即读出所有数据信息,并显示出来。)教师综合信息输出;(提示;输出教师信息到屏幕。)需求分析教师信息处理A输入教师信息B插入修改教师信息C删除教师信息D浏览教师信息教师数据处理A按教师号录入教师基本工资、津贴

5、、生活补贴、电话费、水电费、房租、所得税、卫生费、公积金等基本数据。B教师实发工资,应发工资,合计扣款计算。C教师数据管理D教师数据查询E教师综合信息输出 二总体设计4.总体设计、建立动态链表。删除结点插入结点修改三、详细设计源程序#include#include#include#define LEN sizeofstruct teacherstruct teacher *creat;struct teacherchar num11;char name10;char sex8;char unit10;char address10;long telnum;float salary_1;float

6、 allowance;float life_allow;float salary_2;float tel_fee;float tax;float health_fee;float water_fee;float rent;float grant;float total_fee;float actual_salary;struct teacher *next;int n;struct teacher *head;FILE *fp;struct teacher *creatvoidstruct teacher *p1,*p2;n0;p1p2struct teacher *mallocLEN;pri

7、ntf教师号:;scanf%d,&p1-num;fflushstdin;printf教师姓名:;getsp1-name;printf教师性别:;getsp1-sex;printf单位名称:;getsp1-unit;printf家庭地址:;getsp1-address;printf电话号码:;scanf%ld,&p1-telnum;fflushstdin;printf基本工资:;scanf%f,&p1-salary_1;fflushstdin;printf津贴:;scanf%f,&p1-allowance;fflushstdin;printf生活补贴:;scanf%f,&p1-life_allo

8、w;fflushstdin;printf电话费:;scanf%f,&p1-tel_fee;fflushstdin;printf个人所得税:;scanf%f,&p1-tax;fflushstdin;printf房租:;scanf%f,&p1-rent;fflushstdin;printf公积金:;scanf%f,&p1-grant;fflushstdin;printf水电费:;scanf%f,&p1-water_fee;fflushstdin;printf卫生费:;scanf%f,&p1-health_fee;fflushstdin;p1-salary_2p1-salary_1+p1-allow

9、ance+p1-life_allow;p1-total_feep1-tel_fee+p1-water_fee+p1-rent+p1-tax+p1-health_fee+p1-grant;p1-actual_salaryp1-salary_2-p1-total_fee; headNULL;whilep1-num!0nn+1;ifn1headp1;else p2-nextp1;p2p1;p1struct teacher*mallocLEN;printf教师号:;scanf%d,&p1-num;fflushstdin;printf教师姓名:;getsp1-name;printf教师性别:;getsp

10、1-sex;printf单位名称:;getsp1-unit;printf家庭地址:;getsp1-address;printf电话号码:;scanf%ld,&p1-telnum;fflushstdin;printf基本工资:;scanf%f,&p1-salary_1;fflushstdin;printf津贴:;scanf%f,&p1-allowance;fflushstdin;printf生活补贴:;scanf%f,&p1-life_allow;fflushstdin;printf电话费:;scanf%f,&p1-tel_fee;fflushstdin;printf个人所得税:;scanf%f

11、,&p1-tax;fflushstdin;printf房租:;scanf%f,&p1-rent;fflushstdin;printf公积金:;scanf%f,&p1-grant;fflushstdin;printf水电费:;scanf%f,&p1-water_fee;fflushstdin;printf卫生费:;scanf%f,&p1-health_fee;fflushstdin;p1-salary_2p1-salary_1+p1-allowance+p1-life_allow;p1-total_feep1-tel_fee+p1-water_fee+p1-rent+p1-tax+p1-heal

12、th_fee+p1-grant;p1-actual_salaryp1-salary_2-p1-total_fee;p2-nextNULL;returnhead;void printstruct teacher *headstruct teacher *p;printfnNow,These %d records are:n,n;phead;ifhead!NULLdoprintf教师号:%5dtt,p-num;printf教师姓名:%-10sn,p-name;printf教师性别:%-6stt,p-sex;printf单位名称:%-10sn,p-unit;printf家庭地址:%-10st,p-a

13、ddress;printf电话号码:%8ldn,p-telnum;printf基本工资:%5.0ftt,p-salary_1;printf津贴:%5.0fn,p-allowance;printf生活补贴:%5.0ft,p-life_allow;printft电话费:%5.0fn,p-tel_fee;printf个人所得税:%5.0ft,p-tax;printf卫生费:%5.0fn,p-health_fee;printf水电费:%5.0ftt,p-water_fee;printf房租:%5.0fn,p-rent;printf公积金:%5.0ftt,p-grant;printf应发工资:%5.0f

14、n,p-salary_2;printf合计扣款:%5.0ftt,p-total_fee;printf实发工资:%5.0fnnn,p-actual_salary;pp-next;whilep!NULL;struct teacher *insertstruct teacher*head,struct teacher *teachstruct teacher *p0,*p1,*p2;p1head;p0teach;ifheadNULLheadp0;p0-nextNULL;elsewhilep0-nump1-num&p1-next!NULLp2p1;p1p1-next;ifp0-nump1-numifh

15、eadp1headp0;else p2-nextp0;p0-nextp1;elsep1-nextp0;p0-nextNULL;nn+1;returnhead;struct teacher *delstruct teacher *head,int numberstruct teacher *p1,*p2;ifheadNULLprintfnlist nulln;returnhead;p1head;whilenumber!p1-num&p1-next!NULLp2p1;p1p1-next;ifnumberp1-numifp1headheadp1-next;else p2-nextp1-next;pr

16、intf删除:%dn,number;nn-1;else printf%ld is not foundn,number;returnhead;void saveint i;struct teacher *p1; p1head;iffpfopenteacher_list,wbNULL printfcannot open filen;return; fori0;in;i+iffwritep1,sizeofstruct teacher,1,fp!1printffile write errorn; p1p1-next;fclosefp;void loadstruct teacher *p1,*p2;if

17、fpfopenteacher_list,rbNULL printfcannot open filen; return;p1p2struct teacher *mallocLEN;headp1;doiffreadp1,sizeofstruct teacher,1,fp!1printffile errorn;goto end;ifp1-next!NULLp2p1; p1struct teacher *mallocLEN; p2-nextp1;elsebreak;while1;end:fclosefp;void querystruct teacher *pint no;phead;printfple

18、ase input num:n;scanf%d,&no;whilep-num!nopp-next;printf基本工资:%5.0ftt,p-salary_1;printf津贴:%5.0fn,p-allowance;printf生活补贴:%5.0ft,p-life_allow;printft电话费:%5.0fn,p-tel_fee;printf个人所得税:%5.0ft,p-tax;printf卫生费:%5.0fn,p-health_fee;printf水电费:%5.0ftt,p-water_fee;printf房租:%5.0fn,p-rent;printf公积金:%5.0ftt,p-grant;

19、printf应发工资:%5.0fn,p-salary_2;printf合计扣款:%5.0ftt,p-total_fee;printf实发工资:%5.0fnnn,p-actual_salary;void editstruct teacher *pint a;printfplease input num:n;scanf%d,&a;printf%dnn,a;for;ifp-numaprintf教师号:%5dtt,p-num;printf教师姓名:%-10sn,p-name;printf教师性别:%-6stt,p-sex;printf单位名称:%-10sn,p-unit;printf家庭地址:%-10

20、st,p-address;printf电话号码:%8ldn,p-telnum;printf基本工资:%5.0ftt,p-salary_1;printf津贴:%5.0fn,p-allowance;printf生活补贴:%5.0ft,p-life_allow;printft电话费:%5.0fn,p-tel_fee;printf个人所得税:%5.0ft,p-tax;printf卫生费:%5.0fn,p-health_fee;printf水电费:%5.0ftt,p-water_fee;printf房租:%5.0fn,p-rent;printf公积金:%5.0ftt,p-grant;printf应发工资

21、:%5.0fn,p-salary_2;printf合计扣款:%5.0ftt,p-total_fee;printf实发工资:%5.0fnnn,p-actual_salary;printf请输入新数据:n;printf教师号:;scanf%d,&p-num;fflushstdin;printf教师姓名:;getsp-name;printf教师性别:;getsp-sex;printf工作单位:;getsp-unit;printf家庭地址:;getsp-address;printf电话号码:;scanf%ld,&p-telnum;fflushstdin;printf基本工资:;scanf%f,&p-s

22、alary_1;fflushstdin;printf津贴:;scanf%f,&p-allowance;fflushstdin;printf生活补贴:;scanf%f,&p-life_allow;fflushstdin;printf电话费:;scanf%f,&p-tel_fee;fflushstdin;printf个人所得税:;scanf%f,&p-tax;fflushstdin;printf房租:;scanf%f,&p-rent;fflushstdin;printf公积金:;scanf%f,&p-grant;fflushstdin;printf水电费:;scanf%f,&p-water_fee

23、;fflushstdin;printf卫生费:;scanf%f,&p-health_fee;fflushstdin; p-salary_2p-salary_1+p-allowance+p-life_allow; p-total_feep-tel_fee+p-water_fee+p-rent+p-tax+p-health_fee+p-grant; p-actual_salaryp-salary_2-p-total_fee; break;pp-next;void welcome printfttt+printfttt| |n; printfttt| 欢迎使用教师工资管理系统 |n; printft

24、tt| |n; printfttt+printfnn;char mainmenu char choice;printfn温馨提示:为保证您的操作得到保存,请按正常顺序退出系统_n;printfnn;printftttprintfttt| 教师工资管理系统 |n;printftttprintfttt| 1-输入教师信息 |n;printfttt| 2-插入教师信息 |n;printfttt| 3-删除教师信息 |n;printfttt| 4-浏览教师信息 |n;printfttt| 5-录入教师信息 |n;printfttt| 6-查询教师信息 |n;printfttt| 7-修改教师信息 |n

25、;printfttt| 8-加载教师信息 |n;printfttt| 0-退出系统 |n;printfttt|*?*?*?*?*?*?*?*?*?*?|n;printftttprintf请输入您的选择:;dofflushstdin;scanf%c,&choice;fflushstdin;whilechoice0|choice8;returnchoice;case 0:systemcls;exit0; case 1: printfinput records:n;headcreat;break;case 2:printfinput the inserted record:n;teachstruct

26、 teacher *mallocLEN;printf教师号:;scanf%d,&teach-num;fflushstdin;printf教师姓名:;getsteach-name;printf教师性别:;getsteach-sex;printf单位名称:;getsteach-unit;printf家庭地址:;getsteach-address;printf电话号码:;scanf%ld,&teach-telnum;fflushstdin;printf基本工资:;scanf%f,&teach-salary_1;fflushstdin;printf津贴:;scanf%f,&teach-allowanc

27、e;fflushstdin;printf生活补贴:;scanf%f,&teach-life_allow;fflushstdin;printf电话费:;scanf%f,&teach-tel_fee;fflushstdin;printf个人所得税:;scanf%f,&teach-tax;fflushstdin;printf房租:;scanf%f,&teach-rent;fflushstdin;printf公积金:;scanf%f,&teach-grant;fflushstdin;printf水电费:;scanf%f,&teach-water_fee;fflushstdin;printf卫生费:;s

28、canf%f,&teach-health_fee;fflushstdin;teach-salary_2teach-salary_1+teach-allowance+teach-life_allow;teach-total_feeteach-tel_fee+teach-water_fee+teach-rent+teach-tax+teach-health_fee+teach-grant;teach-actual_salaryteach-salary_2-teach-total_fee; headinserthead,teach;printhead;break; case 3: printfinp

29、ut the delete number:;scanf%d,&del_num;getchar;headdelhead,del_num;printhead;break; case 4: printhead; break; case 5: save; break; case 6:queryhead;break;case 7:edithead;break;case 8:load;break;调试与测试进入页面输入输出心得体会 持续两周的课程设计给了我太多感触,题目很大,设计量很大,也很繁杂,非一人之力可以解决。这样只是重新捡起书本来看,获得新知识。提升自己的能力。整个程序的设计是分模块实现具体的功能,每个模块分别由不同的函数。每个同学都有自己的分工。链表的建立实现输入信息功能,相比较于数组更加方便,更节省内存空间。通过使用文件fread和fwrite函数方便的将数据信息写入文件以及将文件中的信息载入显示段。通过这十几天的训练与设计我学会了很多,也更加熟悉c语言程序设计,从中得到很多乐趣,很快乐,感觉这些天我并没有浪费掉,而是利用了他,虽然天很热,可是能看见同学们自己设计的程序运行起来我还是很开心。在学校留着设计程序真的很有意义,很锻炼人的能力,为自己以后独立编程打下基础。 a

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

当前位置:首页 > 建筑/施工/环境 > 项目建议


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号