ImageVerifierCode 换一换
格式:DOCX , 页数:25 ,大小:161.70KB ,
资源ID:7516969      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/7516969.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(课程设计选题管理系统报告.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

课程设计选题管理系统报告.docx

1、课程设计选题管理系统报告上 海 电 力 学 院课程设计报告面向对象程序设计(2014/2015学年第一学期) 课题名称 课程设计选题管理系统设计 院 (系) 电子与信息工程学院 专 业 通信工程 学 号 * 姓 名 储昊 时 间 2015年1月19日至1月23日 地 点 虚拟仿真实验室(南4教312) 指导老师 骆政屹 一、设计目的与任务1、本课程设计的目的 1)课程设计是实践教学环节。设置课程设计的目的是加强学生对本课程及相关课程知识的理解,培养学生综合运用理论知识分析和解决实际问题的方法与能力。有助于提高学生的创新能力和创新意识。搞好课程设计教学工作,对实现专业培养目标,提高学生全面素质有

2、重要作用。2)通过课程设计更进一步理解 C+的基础知识。3)训练用系统的观点及软件开发的一般规范进行软件开发,并在此过程中培养严谨的科学态度和良好的工作作风。初步掌握软件开发过程中的问题分析、系统设计、程序编码、调试、测试等方面的基本方法和技能。4) 熟练掌握 C+知识在程序中的应用,了解书本知识在解决实际问题中的用途。2、本课程设计的任务(1)问题描述课程设计题目包括:编号、名称、关键词、实现技术、人员数(由几个人来完成)等信息。学生信息包括:学号、姓名、性别、年龄、班级、专业等信息。(2)功能要求 添加功能:程序能够添加学生的记录和课程设计题目记录,提供选择界面供用户选择所要添加的类别。添

3、加记录时,要求学号和编号要唯一。如果添加了重复记录,则提示数据添加重复并取消添加。 查询功能:可根据学号、姓名、编号、名称等信息对已添加的学生和课程设计题目进行查询,如果未找到,给出相应的提示信息,如果找到,则显示相应的记录信息。 显示功能:可显示当前系统中所有学生的信息和课程设计题目信息,每条记录占据一行。 编辑功能:可根据查询结果对相应的记录进行修改,修改时注意学号的唯一性。 删除功能:主要实现对已添加的学生和课程设计题目记录进行删除。如果当前系统中没有相应的记录,则提示“记录为空!”并返回操作。 统计功能:能根据多种参数进行统计。能按课程设计题目名称统计出学生选择该题目的人员的信息。 保

4、存功能:可将当前系统中各类记录存入文件中,存入方式任意。 读取功能:可将保存在文件中的信息读入到当前系统中,供用户进行使用。二、设计方案1、总体设计 我们设计一个程序对学生课程设计选题信息进行保存,对学生的选题信息进行可执行多种操作,该程序包括以下功能模块:1)学生信息添加模块:能够输入学生基本信息并保存到文件中。2)查询模块:显示所有符合要求的课程设计信息。3)编辑模块:可对学生信息进行修改。4)删除模块:可删除相应的学生信息。5)统计模块:能根据多种参数进行统计。6)查看模块:显示所有课程设计选题的信息。7)退出系统。为了完善系统,我们还添加了一个登录界面。2、系统设计1)类设计定义一个学

5、生类Student,类中包括学号stuid,姓名stuname,性别sex,年龄age,班级clas,专业specialty,及所选课程的课程编号couid,课程名称 couname,关键词keyword,实现技术technology;定义一个管理类Guanli,其成员函数包括向文件输入函数void write(int n);从文件读取函数,int read();添加学生信息函数void add(),查询信息函数void search (),按学号查询函数void searchsid(),按姓名查询函数void searchsname(),按题目编号查询函数void searchcid(),按

6、题目名称查询函数void searchcname();修改信息函数void alter() ;删除信息函数void del();统计信息函数void total();显示函数void display()以及一个数据成员Student stu50。2)函数设计void write(int n),向文件中写入数据,打开文本文档,并将数据输入到文本文档中;int read(),向文件中写入数据从文件中读数据,打开文本文档,并将文本文档中的数据输出;void add(),添加学生信息;void search()查询信息(可根据学生的学号、姓名、所选课程编号、课程名称进行信息查询);void alter

7、(),修改学生信息;void del(),删除学生信息,根据输入的学生学号通过调用函数实现;void total(),统计学生信息(根据学生所选课程名称进行统计);void display(),显示函数用来显示所有学生信息;int main()主函数,显示主菜单,调用各个函数实现所有功能。 3)系统流程图课程设计学生选课系统设计结构图:进入功能界面后,可以进行多项功能选择,如添加、查询、显示、修改、删除、统计,将数据写入文件以及从文件读取数据等;而查询功能又可以分为按学号、姓名、题目编号、题目名称等方式进行查询。如下图所示。4)界面设计主界面是“欢迎使用课程设计选课系统”,下面是所要使用的功能

8、:1. 添加新的纪录2. 查询记录信息3. 修改学生信息4. 删除学生信息5. 统计所有记录6. 显示所有记录0. 退出系统其中,查询记录又可以弹出一个界面分别有以下几个功能:1. 根据学号查询2. 根据姓名查询3. 根据编号查询4. 根据题目名称查询每实现一个功能,重新弹出主界面,进行下一个的功能选择。3、系统实现1)类实现class Studentpublic: int stuid; /学号 char stuname10; /姓名 char sex2; /性别 int age; /年龄 char clas10; /班级 char specialty10; /专业 int couid; /题

9、目编号 char couname10; /题目名称 char keyword20; /关键词 char technology30; /实现技术stu50; /定义对象class Guanliprivate: Student stu50;public: void add(); /添加学生信息 void search(); /查询信息 void searchsid(); /按学号查询信息 void searchsname(); /按名字查询信息 void searchcid(); /按题目编号查询信息 void searchcname(); /按题目名称查询信息 void alter(); /修改

10、信息 void del(); /删除信息 void total(); /统计信息 void display(); /显示信息 void write(int n); /向文件中写入数据 int read(); /从文件中读数据;2)函数实现 void Guanli:write(int n) fstream myfile; myfile.open(student.txt,ios:out|ios:binary); if(!myfile) cout该文件不能打开!endl; abort(); int count=n; myfilecountendlendl; for(int i=0;i=count;i

11、+) myfilestui.stuid stui.stuname stui.sex stui.age stui.clas stui.specialty stui.couid stui.couname stui.keyword stui.technology endl; myfile.close();int Guanli:read() fstream myfile; myfile.open(student.txt,ios:in|ios:binary); if(!myfile) cout该文件不能打开!count; for(int i=0;istui.stuidstui.stunamestui.s

12、exstui.agestui.classtui.specialtystui.couidstui.counamestui.keywordstui.technology; coutendl; myfile.close(); return count;void Guanli:add() int n=read(); int i=0; char sign; coutendl请输入增加的学生的相关信息: endl; while(sign!=N) loop: coutstui.stuid; cout endl; int c=0; while(ci) c+; if(stui.stuid=stui-c.stui

13、d) cout你输入的学号已经存在!请重新输入endl; goto loop; coutstui.stuname; coutendl; coutstui.sex; coutendl; coutstui.age; coutendl; coutstui.clas; coutendl; coutstui.specialty; coutendl; coutstui.couid; coutendl; coutstui.couname; coutendl; coutstui.keyword; coutendl; coutstui.technology; coutendl; coutsign; /输入判断

14、i+; write(i);void Guanli:search() int n=read(); cout* (1)根据学号查询 *endl; cout* (2)根据姓名查询 *endl; cout* (3)根据编号查询 *endl; cout* (4)根据名称查询 *endl; coutendl; int c; Guanli g; coutc; switch(c) case 1: g.searchsid(); break; case 2: g.searchsname(); break; case 3: g.searchcid(); break; case 4: g.searchcname();

15、 break; default: cout输入错误,请重新输入!endl; g.write(n);void Guanli:searchsid() int n=read(); int s; int i=0; coutendl查找学生信息:endl; cout请输入需要查找学生的学号:s; while(stui.stuid-s)!=0&in) i+; /查找判断 if(i=n) cout提示:对不起,无法找到该学生的信息!endl; else cout*endl; cout学号: stui.stuidendl; cout姓名: stui. stunameendl; cout性别: stui.sex

16、endl ; cout年龄: stui. ageendl; cout班级: stui.clas endl; cout专业: stui. specialtyendl; cout题目编号: stui.couidendl; cout题目名称: stui.counameendl; cout关键词: stui.keywordendl; cout实现技术: stui.technologyendl; void Guanli:searchsname() int n=read(); char a10; cout请输入需要查找学生的姓名:a; for(int i=0;in;i+) if(strcmp(stui.s

17、tuname,a)=0) cout*endl; cout学号: stui.stuidendl; cout姓名: stui. stunameendl; cout性别: stui.sexendl ; cout年龄: stui. ageendl ; cout班级: stui.clasendl; cout专业: stui. specialtyendl; cout题目编号: stui.couidendl; cout题目名称: stui.counameendl; cout关键词: stui.keywordendl; cout实现技术: stui.technologyendl; void Guanli:se

18、archcid()int n=read(); int b; int i=0; cout请输入需要查找的题目编号:b; while(stui.couid-b)!=0&in) i+; /查找判断 if(i=n) cout提示:对不起,无法找到该信息!endl; else cout*endl; cout学号: stui.stuidendl; cout姓名: stui. stunameendl; cout性别: stui.sexendl ; cout年龄: stui. ageendl ; cout班级: stui.clas endl; cout专业: stui. specialtyendl; cout

19、题目编号: stui.couidendl; cout题目名称: stui.counameendl; cout关键词: stui.keywordendl; cout实现技术: stui.technologyendl; void Guanli:searchcname() int n=read(); char c10; cout请输入需要查找的题目名称:c; for(int i=0;in;i+) if(strcmp(stui.couname,c)=0) cout*endl; cout学号: stui.stuidendl; cout姓名: stui. stunameendl; cout性别: stui

20、.sexendl ; cout年龄: stui. ageendl ; cout班级: stui.clas endl; cout专业: stui. specialtyendl; cout题目编号: stui.couidendl; cout题目名称: stui.counameendl; cout关键词: stui.keywordendl; cout实现技术: stui.technologyendl; void Guanli:alter() int n=read(); int s; int i=0; coutendl修改学生信息:endl; cout请输入需要修改学生的学号:s; while(stu

21、i.stuid-s)!=0&in) i+; /查找判断 if(i=n) cout提示:对不起,无该学生的信息endl; /输入失败信息 else cout该学生的信息:endl; cout学号stui.stuidn姓名stui.stunamen性别stui.sexn年龄stui.agen班级 stui.clasn专业stui.specialtyn题目编号stui.couidn题目名称stui.counamen 关键词stui.keywordn实现技术stui.technologynendl; cout请重新输入该学生的信息endl; coutstui. stuid ; coutendl; co

22、utstui. stuname; coutendl; coutstui.sex; coutendl; coutstui.age; coutendl; coutstui.clas ; coutendl; coutstui. specialty; coutendl; coutstui.couid; coutendl; coutstui.couname; coutendl; coutstui.keyword; coutendl; coutstui.technology; coutendl; char c; cout是否保存数据?(y/n)c; if(c=y) cout修改成功!endl; write

23、(n); void Guanli:del() int n=read(); int s; int i=0,j; coutendl删除学生信息:endl; cout请输入需要删除学生的学号:s; while(stui.stuid-s)!=0&in) i+; /查找判断 if(i=n) cout提示:记录为空endl; /返回失败信息 else for(j=i;jn-1;j+) /删除操作 stuj.stuid=stuj+1.stuid; strcpy(stuj.stuname,stuj+1.stuname); strcpy(stuj.sex,stuj+1.sex); stuj.age=stuj+1.age; strcpy(stuj.clas,stuj+1.clas); strcpy(stuj.specialty,stuj+1.specialty); stuj.couid=stuj+1.couid; strcpy(stuj.couname,stuj+1.couname); strcpy(stuj.keyword,stuj+1.keyword); strcpy(stuj.technology,stuj+1.technology); cout提示:已成功删除!endl; /返回成功信息 cout你要删除的信息如下:endl; cout姓名:stui.stuname

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1