康恩贝七届董事会第六次会议决议公告.pdf
《康恩贝七届董事会第六次会议决议公告.pdf》由会员分享,可在线阅读,更多相关《康恩贝七届董事会第六次会议决议公告.pdf(131页珍藏版)》请在文库网上搜索。
1、很重要的。(九)附录源程序#include#include#include#include#includeusing namespace std;class studentprivate:string number;string name;string clas;char gender;string phone; double computer;double math;double sum;student *head;student *curnode;student *next;float jige_num;float youshen_num;float jige;float youxiu;f
2、loat jigelv;float youshenglv;float jigel;float youxiul;int count;public:student();/不带参数的构造函数/带数据域参数的构造函数,用来动态建立节点-student(string ,string ,string ,char ,string ,double ,double ,double=0.0);void help();/用于描述帮助信息 void sum_score();/总分函数void cin_app();/用于输入 void app_score(string,string,string,char,string
3、,double,double);/动态的建立节点void del_score();/删除全部节点void displist();/输出节点中的全部数据void lookup(int ,string );/查找函数void del_score(int ,string );/删除函数 void compositor(int);/排序函数 void tongji();/统计及格率和优秀率 ;/student类的实现void err_char();/输入错误字符检测函数void score_err();/成绩范围检测函数,当输入成绩不在0到100之间时提示重新输入student:student():n
4、ext(NULL)/不带参数的构造函数head=curnode=this;/带参数的构造函数student:student(string Number,string Name,string Clas,char Gender,string Phone,double Computer,double Math,double Sum):next(NULL)number=Number;name=Name;clas=Clas;gender=Gender;phone=Phone; computer=Computer;math=Math;sum=Sum;/统计及格率和优秀率 ?void student:ton
5、gji()int count; int jige_num=0,youshen_num=0,jige=0,youxiu=0;/分别算计算机和数学成绩的率人数和率 float jigelv,youshenlv,jigel,youxiul;/jigelv stand for computer;jigel stand for math int m=count; for(int i=0;i=60)jige_num=jige_num+1; if(computer=85)youshen_num=youshen_num+1; if(math=60)jige=jige+1; if(math=85)youxiu=
6、youxiu+1; jigelv=jige_num/m; youshenlv=youshen_num/m; jigel=jige/m; youxiul=youxiu/m; cout计算机及格率: jigelv*100.0% 计算机优秀率: youshenlv*100.0%endl; cout数学及格率: jigel*100.0% 数学优胜率: youxiu*100.0%endl; jige_num=0; youshen_num=0; jigelv=0; youshenlv=0; /帮助信息/ void student:help()cout 帮助信息 endl;cout系统有对学生的学号、姓名、
7、班级、性别、联系电话以及计算机、数学的成绩录入等功能endl; cout可以对学生的成绩按学号和姓名进行查寻,并且能对学生成绩实现排序功能。endl;cout 2014 Anpengfei. All rights reserved.endl; coutnext=new student(Number,Name,Clas,Gender,Phone,Computer,Math);curnode=curnode-next;/删除表中的全部数据void student:del_score()student *p;curnode=head-next;while(curnode!=NULL)p=curnod
8、e-next;delete curnode;curnode=p;head-next=NULL;curnode=head;cout现已是一个空表 endl;coutnext=NULL)cout!这是一个空表!endl;coutnext; cout学号 姓名 班级 性别 电话 计算机 数学 总分 endl;while(curnode!=NULL)coutnumber;coutsetw(12)name;coutsetw(8)clas;coutsetw(8)gender;coutsetw(14)phone;coutsetw(15)computer;coutsetw(8)math;curnode-sum
9、_score();coutsetw(8)sum;if(curnode-next!=NULL)coutendl;elsecoutnext;curnode=pw;cout!表中内容输出完毕!endl;coutendl;cout ;system(pause);/输入数据void student:cin_app()student *p=curnode;bool b=0;string Number;string Name;string Clas; char Gender;string Phone; double Computer;double Math;int count=0;while(1) cout
10、Number;curnode=head-next;while(curnode!=NULL)b=(Number=curnode-number);curnode=curnode-next;if(!b)break;elsecout出现了相同的学号,请重新输入endl;curnode=p;coutName;count+; curnode=p;coutClas; curnode=p;coutGender; curnode=p;coutPhone;while(1)coutComputer;while(cin.fail()err_char();coutComputer;if(Computer=0&Compu
11、ter=100)break;elsescore_err();while(1)coutMath;while(cin.fail()err_char();coutMath;if(Math=0&Mathapp_score(Number,Name,Clas,Gender,Phone,Computer,Math);cout记录已添加!endl;coutnext)cout!这是一个空表!endl;curnode=p;cout ;system(pause);return;cout 学号 姓名 班级 性别 电话 计算机 数学 总分 number=str;break;case 2: b=curnode-name=
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 康恩贝七届 董事会 第六 会议 决议 公告