c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第1页
c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第2页
c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第3页
c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第4页
c语言程序设计教师工资管理系统具体的设计报告(可编辑) .doc_第5页
已阅读5页,还剩16页未读, 继续免费阅读

下载本文档

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

文档简介

课程设计报告学院:天津理工大学华信软件学院专业名称:软件工程课程设计科目c语言课程设计所在班级:一班学生学号:20105945学生姓名:吴健指导教师:陈立娜完成时间:2011年4月-6月 教师工资管理系统 每个教师的信息为:教师号、姓名、性别、单位名称、家庭住址、基本工资、津贴、生活补贴、应发工资、电话费、水电费、房租、所得税、卫生费、公积金、合计扣款、实发工资。注:应发工资基本工资+津贴+生活补贴;合计扣款电话费+水电费+房租+所得税+卫生费+公积金;实发工资应发工资-合计扣款。 a、教师信息处理 1输入教师信息 2 插入(修改)教师信息: 3 删除教师信息: 4 浏览教师信息: 提示:具体功能及操作参考题1。 b、教师数据处理: 1 按教师号录入教师基本工资、津贴、生活补贴、电话费、水电费、房租、所得税、卫生费、公积金等基本数据。 2 教师实发工资、应发工资、合计扣款计算。 提示:计算规则如题目。 3 教师数据管理 提示:输入教师号,读出并显示该教师信息,输入新数据,将改后信息写入文件 4 教师数据查询: 提示:输入教师号或其他信息,即读出所有数据信息,并显示出来。 5 教师综合信息输出 提示:输出教师信息到屏幕。 1. 课程设计目的和要求巩固和加强c语言程序设计课程的理论知识。掌握c语言的基本概念,语法,语义和数据类型的使用特点。掌握c语言程序设计的方法及编程技巧,能正确使用c语言编写程序。进一步理解和运用结构化程序设计的思想和放法。使学生掌握调试程序的基本方法及上机操作方法。通过查询手册和文献资料,培养学生独立分析问题和解决问题的能力。初步掌握开发一个小型实用系统的基本方法。培养学生的创新能力和创新思维。培养学生良好的程序设计风格。进一步理解和运用2.课程设计题目及内容教师工资管理系统 每个教师的信息为:教师名,姓名,性别,单位名称,家庭住址,基本工资,津贴,生活补贴,应发工资,电话费,水电费,房租,所得税,卫生费,公积金,合计扣款,实发工资。注:应发工资基本工资+津贴+生活补贴;合计扣款电话费+水电费+房租+所得税+卫生费+公积金;实发工资应发工资?合计扣款。 1教师信息处理输入教师信息插入(修改)教师信息删除教师信息;浏览教师信息;(提示:具体功能及操作参考题1。)2教师数据处理;按教师号录入教师基本工资,津贴,生活补贴,电话费,水电费,房租,所得税,卫生费,公积金等基本信息;教师实发工资、应发公资、合计扣款;教师数据管理;(提示:输入教师号,读出并显示该教师信息,输入新数据,将改后信息写入文件。)教师数据查询;(提示:输入教师好或其他信息,即读出所有数据信息,并显示出来。)教师综合信息输出;(提示;输出教师信息到屏幕。)需求分析教师信息处理a输入教师信息b插入修改教师信息c删除教师信息d浏览教师信息教师数据处理a按教师号录入教师基本工资、津贴、生活补贴、电话费、水电费、房租、所得税、卫生费、公积金等基本数据。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 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;printf教师号:;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_allow;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-allowance+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教师性别:;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_allow;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-allowance+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;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-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应发工资:%5.0fn,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-numifheadp1headp0;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;printf删除:%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;iffpfopenteacher_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;printfplease 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;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家庭地址:%-10st,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应发工资:%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-salary_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;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; printfttt| |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;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 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-allowance;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水电费

温馨提示

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

评论

0/150

提交评论