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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

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

学生成绩分析管理系统.docx

1、学生成绩分析管理系统C+课程设计说明书学生成绩管理分析系统姓名:宁新丽 学号:069109141 班级:09级网工五班 指导老师:张晓民 一,目的与要求1.1目的1.2要求二,需求分析2.1功能分析 2.2 数据结构设计 2.3界面设计 2.4数据存储 2.5详细设计三,类图四,编码五,测试的步骤和内容六,课程设计总结七,参考文献一、目的与要求1.目的:(1)巩固C+基础知识;(2)能够运用面向对象方法进行类的设计;(3)锻炼学生编程能力,解决实际问题的能力。2.要求基本要求:(1)按照软件开发流程进行开发(2)类的设计合理;包括类的继承多态等;(3)模块划分清晰合理;(4)实用性好。二,需求

2、分析2.1功能分析(1),定义类视图类(View):数据成员:char Msg;/获取操作命令 bool flag;/ 判断操作是否正确 char tel50;/是否错误通知 char account20; /账号或学号 struct student *p;/用于链表寻找节点 struct student *q; /用于链表寻找节点成员函数:DisplayChoose(char id20,char n); /选择界面显示 DisplayChoose(char tel); /老师登陆 DisplayList(struct student *t); /列表界面 DisplayAnalysis(ch

3、ar id20); /分析界面 DisplayAdd(struct student *head); /添加界面 DisplayOperate(struct student *t); /修改界面 DisplayDelete(struct student *t); /删除界面 DisplayExit(); /关闭界面模型类-后台运算(Model):数据成员:bool flag; / 判断操作是否正确 char account20; /账号和密码 struct student head;/ 头链表 struct student t; /临时结构体 struct student *p;/用于链表寻找节

4、点 struct student *q;/用于链表寻找节点成员函数:bool Login(char account); /登陆 struct student* LoadData(); /数据加载 void Query(struct student* Head,char account20,char Msg); /查询数据 void Analysis(struct student *head,char Msg); /分析数据 struct student* Ranking(struct student *head,char Msg); /排名数据 void Quit(struct student

5、 *head); /退出friend class Controller;/私有方法充许Controller类调用的声明 void AddData(struct student *head,struct student *t); /添加数据 bool UpData(struct student *head,struct student *t,char account); /更新数据 bool DeleteDate(struct student *head,char account); /删除数据 bool SaveDate(struct student *head); /保存数据控制器-逻辑控制

6、(Controller):数据成员:bool flag; / 判断操作是否正确 char Msg; /获取操作命令 char tel50; /是否错误通知 char account20; /账号或学号 char id520; /选择项 struct student *head;/链表头成员函数:void Login(); /登陆 void Menu(char Msg); /主菜单 void Operate(struct student *head); /操作 void Query(struct student *head); /查找 void Analysis(struct student *

7、head); /分析 void Ranking(struct student *head); /排名 void Quit(struct student *head); /退出2.2数据结构设计利用结构体创建链表用来保存提取的学生信息结构体如下:struct student char StuNo12; /学号 char Name20; /姓名 char Majors20; /系别 char Clas20; /班级 int grade4; /成绩-5科成绩 struct student *next; ;2. 3界面设计(UI)字符界面选择登陆权限界面老师登陆界面老师主菜单学生界面退出界面2.4数据

8、存储(Data storage) 数据以文件形式存储,以二进制形式顺序存储在一个文件中,是student.txt,用与存储学生成绩信息。2.5 详细设计(Detail function)系统流程图学生操作流程图老师操作流程图查看流程图分析流程图排名流程图添加流程图修改流程图删除流程图三, 类图(Class diagram)四,编码Controller.h#include iostream#include fstream#include iomanip#include string#include windows.h#include Model.husing namespace std;clas

9、s Controller :public View,Model/控制流程 public: void Login(); /登陆 void Menu(char Msg); /主菜单 void Operate(struct student *head); /操作 bool Query(struct student *head); /查找 void Analysis(struct student *head); /分析 void Ranking(struct student *head); /排名 void Quit(struct student *head); /退出 private: bool f

10、lag; / 判断操作是否正确 char tel50; /是否错误通知 char account20; /账号认证 char admin20; /账号 char id520; /选择项 double result25; /分析结果 struct student *t; struct student *head;Model.h#include iostream#include fstream#include iomanip#include string#include windows.h#include View.h using namespace std;class Model /运算 pub

11、lic: bool Login(char account20,char admin20); /登陆 struct student* LoadData(); /数据加载 struct student* Query(struct student* Head,char account20,char Msg); /查询数据 void Analysis(struct student *head,char Msg,char account20,double *result); /分析数据 struct student* Ranking(struct student *head,char Msg,char

12、account20); /排名数据 void Quit(struct student *head); /退出 private: friend class Controller;/私有方法充许Controller类调用的声明 char* LoadAdmin(); /加载老师账号 void SaveAdmin(char account20); /保存老师帐号 void AddData(struct student *head,struct student *t); /添加数据 void UpData(struct student *head,struct student *t,char accou

13、nt20); /更新数据 void DeleteData(struct student *head,char account); /删除数据 void SaveData(struct student *head); /保存数据 bool flag; / 判断操作是否正确 char account20; /账号和密码 struct student head; struct student t; struct student *c; struct student *p; struct student *q;student.h#include iostream#include fstream#inc

14、lude iomanip#include string#include windows.h using namespace std; /定义结构体 struct student char StuNo12; /学号 char Name20; /姓名 char Majors20; /系别 char Clas20; /班级 double grade4; /成绩-4科成绩 struct student *next; ;View.h#include iostream#include fstream#include iomanip#include string#include windows.h#incl

15、ude student.h using namespace std;class View /显示 public: char DisplayChoose(char id20,char n); /选择界面显示 char* DisplayChoose(char tel); /老师登陆 bool DisplayList(struct student *t); /列表界面 void DisplayAnalysis(double *result); /分析界面 bool DisplayEnquire(); /询问是否继续 char* DisplayIn();/输入条件 char* DisplayIn(st

16、ruct student *head);/输入条件 struct student* DisplayAdd(struct student *head); /添加界面 struct student* DisplayUpdata(struct student *head,char account20); /修改界面 bool DisplayDelete(); /删除界面 void DisplayExit(); /退出界面 void DisplayWelcome(); /欢迎页面 void DisplayError();/错误页面 private: char Msg; bool flag; char

17、tel50; char account20; /账号和密码 struct student *p; struct student *q; ;学生成绩管理分析系统.cpp#include iostream#include fstream /输入输出流的头文件#include iomanip /iomanip.h是I/O流控制头文件,就像C里面的格式化输出一样#include string#include windows.h#include Controller.h using namespace std;char View:DisplayChoose(char id20,char n)/选择界面显

18、示 Msg=0; strcpy(tel,); while(Msg=0)/Msg=0故恒为真 DisplayWelcome(); coutntttt n tttsetw(10)id1 setw(10)id2n tttt n tttt n tt -n tttt n tttt n tttsetw(10)id3 setw(10)id4n tttt nnn telnn 您当前的状态id0nn 请输入数字然后按ENTER :; Msg=getchar(); fflush(stdin); /刷新缓冲区,防止输入过多数据 if(Msgn) Msg=0; strcpy(tel,ttt 输入错误!请重新输入!);

19、 return Msg;char* View:DisplayChoose(char tel) /老师登陆界面 DisplayWelcome(); couttelaccount; /account账号/密码 fflush(stdin); return account;bool View:DisplayList(struct student *t) /列表界面 p=t; int n=0; if(p-next!=NULL) DisplayWelcome(); coutt n t 编号学号姓名系别班级语文数学理综英语n next!=NULL) n+; p=p-next; coutt setw(4)ns

20、etw(4)StuNo setw(4)Namesetw(4)Majors setw(4)Classetw(4)grade0 setw(4)grade1setw(4)grade2 setw(4)grade3next!=NULL) coutt n; else coutt n; flag=true; else coutnnnttt没有数据!; flag=false; system(pause);/暂停 命令行里输出一行类似于“Press any key to exit”的字,等待用户按一个键,然后返回。 return flag;void View:DisplayAnalysis(double *re

21、sult) /分析界面 DisplayWelcome(); couttt科目t及格率t优秀率t最高分t最低分t平均成绩nn; cout.precision(2); /保留两位小数 couttt语文tsetw(4)result0tsetw(4)result1tsetw(4)result2tsetw(4)result3tsetw(4)result4nn; couttt数学tsetw(4)result5tsetw(4)result6tsetw(4)result7tsetw(4)result8tsetw(4)result9nn; couttt理综tsetw(4)result10tsetw(4)resu

22、lt11tsetw(4)result12tsetw(4)result13tsetw(4)result14nn; couttt英语tsetw(4)result15tsetw(4)result16tsetw(4)result17tsetw(4)result18tsetw(4)result19nn; couttt汇总tsetw(4)result20tsetw(4)result21tsetw(4)result22tsetw(4)result23tsetw(4)result24nnt; system(pause);bool View:DisplayEnquire() /询问是否继续 coutMsg; f

23、flush(stdin); return Msg=Y|Msg=y?true:false;char* View:DisplayIn() /输入条件 coutaccount; fflush(stdin); return account;char* View:DisplayIn(struct student *head) /输入条件 flag=false; coutttt ; while(!flag) coutaccount; fflush(stdin); p=head; while(p-next!=NULL) p=p-next; if(strcmp(account,p-StuNo)=0) flag

24、=true; break; if(!flag) couttt 学号输入错误,请重新; return account;struct student* View:DisplayAdd(struct student *head) /添加界面 flag=true; q=(struct student *)malloc(sizeof(struct student); DisplayWelcome(); coutttt ; while(flag) flag=false; coutq-StuNo; p=head; while(p-next!=NULL) p=p-next; if(strcmp(q-StuNo,p-StuNo)=0)/看是不是与添加的学号相同 couttt 输入学号重复,请重新; flag=true; break; coutq-Name; coutq-Majors; coutq-Clas; coutq-grade0; coutq-grade1; coutq-grade2; coutq-grade3; fflush(stdin); q-next=NULL; return q;

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

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