内蒙古科技大学本科生课程设计说明书题目:C语言课程设计——人员管理系统学生姓名:武飞学号:1376807331专业:计算机科学与技术班级:2013-3指导教师:王丽颖内蒙古科技大学课程设计说明书I内蒙古科技大学课程设计任务书课程名称C语言课程设计设计题目人员管理系统指导教师王丽颖时间2014.12.31—2014.1.4一、教学要求1.巩固和加深学生对C语言课程的基本知识的理解和掌握2.掌握C语言编程和程序调试的基本技能3.利用C语言进行基本的软件设计4.掌握书写程序设计说明文档的能力5.提高运用C语言解决实际问题的能力二、设计资料及参数每个学生在教师提供的课程设计题目中任意选择一题,独立完成,题目选定后不可更换。人员管理系统现有一批人员的数椐,要求输入计算机并存放在内存中,然后增加若干个新人员的记录,并可输出人员清单,实现文件存盘和读入文件进行修改的功能。人员的基本信息包括姓名,性别,年龄,身份证号和简历(80个字符以内)。要求设计菜单来调用其各功能模块:新建文件、打开文件输入记录、输出记录查询记录(至少具有两种查询方式,例如以姓名查询和以身份证号查询)修改、插入和删除记录保存文件、退出三、设计要求及成果1.分析课程设计题目的功能需求(可选用数组或链表实现,可多人(最多3人)协作完成一个题目)2.写出详细设计说明(至少包括功能实现分析和模块流程图)3.编写程序代码,调试程序使其能正确运行(代码书写要规范,标示符要见名知意,要有必要的注释,每人至少3个函数,每人至少200行代码,不包括注释和花括号)4.设计完成的软件要便于操作和使用5.设计完成后提交课程设计报告(请严格按照模板进行排版)四、进度安排第一天选择课程设计题目,分析课题的要求第二天编程第三天编程及调试第四天写课程设计报告第五天提交课程设计报告(打印稿及电子稿)五、评分标准1.根据平时上机考勤、表现和进度,教师将每天点名和检查2.根据课程设计完成情况,必须有可运行的软件。3.根据课程设计报告的质量,如有雷同,则所有雷同的所有人均判为不及格。内蒙古科技大学课程设计说明书II目录内蒙古科技大学课程设计任务书····························································I第一章需求分析··············································································31.1引言··················································································31.2任务概述············································································31.3数据描述············································································31.4功能需求············································································3第二章概要设计············································································42.1总体设计············································································42.2数据类型设计(或数据结构设计)···········································42.3接口设计············································································52.4运行界面设计······································································5第三章详细设计············································································63.1输入模块设计······································································63.2输出模块设计······································································73.3查找模块设计······································································73.4保存及读取模块设计·····························································9第四章测试分析···········································································114.1测试程序执行情况·······························································11第五章用户手册(可选)·······························································145.1使用说明···········································································145.2运行说明···········································································14第六章课程设计总结·····································································15附录:程序代码················································································16参考文献·························································································24内蒙古科技大学课程设计说明书3第一章需求分析1.1引言随着管理人数的增加,手动管理人员将会显得不方便。这时就需要使用软件来实施人性化的管理。1.2任务概述做一个程序对人员信息实现:新建文件、打开文件、输入记录、输出记录、查询记录、修改、插入和删除记录、保存文件、退出功能1.3数据描述采用结构体来储存人员信息。人员信息包括姓名、性别、年龄、身份证号、个人简历。姓名长度输入时不能超过10。性别输入时只能输入时一个字符w/m。身份证长度输入时不能超过20。个人简历长度输入时不能超过120。1.4功能需求新建文件、打开文件输入记录、输出记录查询记录(至少具有两种查询方式,例如以姓名查询和以身份证号查询)修改、插入和删除记录保存文件、退出内蒙古科技大学课程设计说明书4第二章概要设计2.1总体设计2.2数据类型设计(或数据结构设计)typedefstructstudent{charname[M];//姓名charsex;//性别intyear;//年龄charnum[20];//身份证号charjian[120];//个人简历}stu;//结构体储存开始1.更新人员信息2..身份证号查找3.姓名查找4.修改信息5.插入信息6.删除信息7.输出信息8.保存信息9.读取文件0.退出内蒙古科技大学课程设计说明书52.3接口设计表2.1:函数列表函数名函数格式函数功能menuintmenu(void)用户菜单readintread(stust[])添加人员信息xieruvoidxieru(stust[],intn)写信息到文件duquintduqu(stust[]);从文件读取信息printvoidprint(stust[],intn)输出信息到屏幕shenfenzhengvoidshenfenzheng(stust[],intn)按身份证查找信息xingmingvoidxingming(stust[],intn)按姓名查找xiugaivoidxiugai(stust[],intn)修改信息charuintcharu(stust[],intn)插入信息shanchuvoidshanchu(stust[],intn)删除信息2.4运行界面设计内蒙古科技大学课程设计说明书6第三章详细设计3.1输入模块设计intread(stust[]){inti=-1;system(cls);printf(\t\t***********************************\n);printf(\t\t*1.更新成员信息*\n);printf(\t\t***********************************\n);do{i++;printf(请输入姓名:\n);scanf(%s,&st[i].name);if(atoi(st[i].name)=0){printf(请输入性别(w/m):\n);scanf(%c,&st[i].sex);printf(请输入年龄:\n);scanf(%d,&st[i].year);printf(请输入身份证号:\n);scanf(%s,&st[i].num);printf(请输入简历:\n);scanf(%s,&st[i].jian);printf(\n编号%d数据添加成功!\n,i+1);printf(输入姓名为负数结束输入!\n);printf(\n);}elsebreak;}while(st[i].num0);输出提示信息输入姓名判断姓名是否小于0。输入性别输入年龄输入身份证号输入简历开始结束NY内蒙古科技大学课程设计说明书7printf(\n--------------------------------------------------------------------\n);printf(数据更新成功!\n);system(pause);//按任意键继续returni;}3.2输出模块设计voidprint(stust[],intn){inti;system(cls);//清屏printf(\n--------------------------------------------------------------------\n);printf(编号\t姓名\t性别\t年龄\t身份证号\t\t简介\n);for(i=0;in;i++){printf(%d\t%s\t%c\t%d\t%-24s%s\n,i+1,st[i].name,st[i].sex,st[i].year,st[i].num,st[i].jian);}}3.3查找模块设计voidshenfenzheng(stust[],intn){charx[20];inti;system(cls);printf(\t\t***********************************\n);printf(\t\t*2.身份证号查找*\n);printf(\t\t***********************************\n);printf(输入你要查询的身份证号:);scanf(%s,x);fo