版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
**** 第-1-页共50页山有路勤为径,学海无涯苦作舟osoftVisualC第-2-页共50页山有路勤为径,学海无涯苦作舟 需求分析 4 系统设计 6 系统测试 12 第-3-页共50页山有路勤为径,学海无涯苦作舟1.理论研究基础(1)c++语言的基本知识和技能,如:类与对象,输入和输出,文本文件的(2)面向对象的程序设计的基本思路和方法。2.技术层面的支持MicrosoftVisualC++6.0编译平台第-4-页共50页山有路勤为径,学海无涯苦作舟MicrosoftVisualC++6.0分析问题描述元法为:20*本月课时数求(1)对各类人员信息完成的基本功能有:;4)删除功能:根据查找结果,完成具体记录的删除。5)保存功能:将对高校人员信息进行的添加、删除、修改结果保存到(2)本程序处理的任务是:输入职工的相关数据,经过计算后,输出职工第-5-页共50页山有路勤为径,学海无涯苦作舟(3)学生在完成本次课程设计的基本要求后,进一步完善程序,从如下几。2)组合查询功能的实现。3)编辑数据时,注意操作的方便4)删除数据时,考虑删除操作的方便5)输入、输出操作时的方便、易用的解决方案:1)应用系统分析,建立该系统的功能模块框图以及界面的组织和设计;2)分析系统中的各个实体及它们之间的关系;3)根据问题描述,设计系统的类层次;4)完成类层次中各个类的描述;5)完成类中各个成员函数的定义;6)完成系统的应用模块;7)功能调试;8)完成系统总结报告。第-6-页共50页山有路勤为径,学海无涯苦作舟计sex、职工类别title和exist(判断对象是否删除))作为数据成员,供各2.教师类teacher:公用虚继承person类,并包括本月课时数classnum、教师基本工资工资salary1和教师工资teacher_salary作为本类数据成员。3.实验员类test:公用虚继承person类,并包括实验员基本工资工资salary2、实验室补助test_allowance和实验员工资test_salary作为本类数te第-7-页共50页承承r多ertest山有路勤为径,学海无涯苦作舟son继l继承rofficiallperson类(虚继承是为了避免二义性),再定义teacher_test和teacher_official两person(){exist=1;}无参构造函数person(stringn,stringna,chars,string第-8-页共50页山有路勤为径,学海无涯苦作舟tinumn),name(na),sex(s),title(ti){exist=1;}voidperson_set()set函数,用于添加对象和修改对象数据voidperson_input(ifstream&iput)person_input函数,用于从文件读取数据voidperson_display()person_display函数,用于向显示器输出数据voidperson_output(ofstream&oput)person_output函数,用于向文件输出数据stringperson_getnum()stringperson_getnum函数,用于获取num值stringperson_getname()stringperson_getname函数,用于获取name值voidchangeexist()voidchangeexist函数,用于改变exist值intperson_exist()intperson_exist函数,用于获得exist值2.教师类成员函数teacher(){}无参构造函数teacher(stringn,stringna,chars,stringti,intsa,intcnum):person(n,na,s,ti),salary1(sa),classnum(cnum){}voidteacher_set()set函数,用于添加对象和修改对象数据voidteacher_input(ifstream&iput)teacher_input函数,用于从文件读取数据voidteacher_display()teacher_display函数,用于向显示器输出数据voidteacher_output(ofstream&oput)teacher_output函数,用于向文件输出数据stringteacher_getnum()teacher_getnum函数,用于获取num值stringteacher_getname()teacher_getname函数,用于获取name值3.实验员类成员函数test(){}无参构造函数test(stringn,stringna,chars,stringti,intsa):person(n,na,s,ti),salary2(sa){}构造函数voidtest_set()set函数,用于添加对象和修改对象数据第-9-页共50页山有路勤为径,学海无涯苦作舟voidtest_input(ifstream&iput)test_input函数,用于从文件读取数据voidtest_display()test_display函数,用于向显示器输出数据voidtest_output(ofstream&oput)test_output函数,用于向文件输出数据stringtest_getnum()test_getnum函数,用于获取num值stringtest_getname()test_getname函数,用于获取name值4.行政人员类成员函数official(){}无参构造函数official(stringn,stringna,chars,stringti,intsa):person(n,na,s,ti),salary2(sa){}构造函数voidofficial_set()set函数,用于添加对象和修改对象数据voidofficial_input(ifstream&iput)official_input函数,用于从文件读取数据voidofficial_display()official_display函数,用于向显示器输出数据voidofficial_output(ofstream&oput)official_output函数,用于向文件输出数据stringofficial_getnum()official_getnum函数,用于获取num值stringofficial_getname()official_getname函数,用于获取name值5.教师兼实验员类成员函数teacher_test(){}无参构造函数teacher_test(stringn,stringna,chars,stringti,intsa):person(n,na,s,ti),salary2(sa){}voidteachertest_set()set函数,用于添加对象和修改对象数据voidteachertest_input(ifstream&iput)teachertest_input函数,用于从文件读取数据voidteachertest_display()teachertest_display函数,用于向显示器输出数据voidteachertest_output(ofstream&oput)teachertest_output函数,用于向文件输出数据stringteachertest_getnum()teachertest_getnum函数,用于获取num值stringteachertest_getname()第-10-页共50页山有路勤为径,学海无涯苦作舟6.行政人员兼教师类成员函数teacher_official(){}无参构造函数teacher_official(stringn,stringna,chars,stringti,intsa):person(n,na,s,ti),salary2(sa){}voidteacherofficial_set()set函数,用于添加对象和修改对象数据voidteacherofficial_input(ifstream&iput)teacherofficial_input函数,用于从文件读取数据voidteacherofficial_display()teacherofficial_display函数,用于向显示器输出voidteacherofficial_output(ofstream&oput)teacherofficial_output函数,用于向文件输出数据stringteacherofficial_getnum()teacherofficial_getnum函数,用于获取num值stringteacherofficial_getname()teacherofficial_getname函数,用于获取name值7.operate类成员函数voidoperate1(teacher&p)operate1函数,用于求教师类对象的工资voidoperate2(test&p)operate2函数,用于求实验员类对象的工资voidoperate3(official&p)operate3函数,用于求行政人员类对象的工资voidoperate4(teacher_test&p)operate4函数,用于求教师兼实验员类对象的工资voidoperate(teacher_official&p)第-11-页共50页山有路勤为径,学海无涯苦作舟测试1模块测试第-12-页共50页山有路勤为径,学海无涯苦作舟第-13-页共50页山有路勤为径,学海无涯苦作舟第-14-页共50页山有路勤为径,学海无涯苦作舟第-15-页共50页山有路勤为径,学海无涯苦作舟第-16-页共50页山有路勤为径,学海无涯苦作舟第-17-页共50页山有路勤为径,学海无涯苦作舟第-18-页共50页山有路勤为径,学海无涯苦作舟课程设计过程中遇到的问题刚开始做课设时,的确遇到了很多问题,比如对象怎么删除、怎么存档等。,逐渐打开了思路,解决了问题。例如,定义对象时加一个变量exist,通过改变它的值来判断是否删除;把各个类的对第-19-页共50页山有路勤为径,学海无涯苦作舟[1]陈维兴,林小茶.c++面向对象程序设计教程.北京:清华大学出版社,第-20-页共50页山有路勤为径,学海无涯苦作舟Salary.h:#include<iostream>#include<fstream>#include<string>usingnamespacestd;classoperate;//基类“人”classpersonpublic:person(){exist=1;}person(stringn,stringna,chars,stringti):num(n),name(na),sex(s),title(ti){exist=1;}voidperson_set();voidperson_input(ifstream&iput);voidperson_display();voidperson_output(ofstream&oput);stringperson_getnum();stringperson_getname();voidchangeexist();intperson_exist();friendoperate;private:stringnum;stringname;charsex;stringtitle;intexist;//教师类classteacher:virtualpublicpersonpublic:第-21-页共50页山有路勤为径,学海无涯苦作舟teacher(){}teacher(stringn,stringna,chars,stringti,intsa,intcnum):person(n,na,s,ti),salary1(sa),classnum(cnum){}voidteacher_set();voidteacher_input(ifstream&iput);voidteacher_display();voidteacher_output(ofstream&oput);stringteacher_getnum();stringteacher_getname();friendoperate;protected:intclassnum;private:intsalary1;staticintteacher_salary;//实验员类classtest:virtualpublicpersonpublic:test(){}test(stringn,stringna,chars,stringti,intsa):person(n,na,s,ti),salary2(sa){}voidtest_set();voidtest_input(ifstream&iput);voidtest_display();voidtest_output(ofstream&oput);stringtest_getnum();stringtest_getname();friendoperate;private:intsalary2;staticinttest_salary;staticinttest_allowance;//行政人员类classofficial:virtualpublicpersonpublic:official(){}official(stringn,stringna,chars,stringti,intsa):person(n,na,s,ti),salary3(sa){}voidofficial_set();第-22-页共50页山有路勤为径,学海无涯苦作舟voidofficial_input(ifstream&iput);voidofficial_display();voidofficial_output(ofstream&oput);stringofficial_getnum();stringofficial_getname();friendoperate;private:intsalary3;staticintofficial_salary;staticintofficial_allowance;//教师兼职实验员classteacher_test:publicteacher,publictestpublic:teacher_test(){}teacher_test(stringn,stringna,chars,stringti,intsa1,intsa2,intcnum,intsa3):teacher(n,na,s,ti,sa1,cnum),test(n,na,s,ti,sa2),salary4(sa3){}voidteachertest_set();voidteachertest_input(ifstream&iput);voidteachertest_display();voidteachertest_output(ofstream&oput);stringteachertest_getnum();stringteachertest_getname();friendoperate;private:intsalary4;//行政人员兼教师类成员函数classteacher_official:publicteacher,publicofficialpublic:teacher_official(){}teacher_official(stringn,stringna,chars,stringti,intsa1,intsa2,intcnum,intsa3):teacher(n,na,s,ti,sa1,cnum),official(n,na,s,ti,sa2),salary5(sa3){}voidteacherofficial_set();voidteacherofficial_input(ifstream&iput);voidteacherofficial_display();voidteacherofficial_output(ofstream&oput);stringteacherofficial_getnum();stringteacherofficial_getname();friendoperate;private:第-23-页共50页山有路勤为径,学海无涯苦作舟intsalary5;//operate类classoperatepublic:voidoperate1(teacher&);voidoperate2(test&);voidoperate3(official&);voidoperate4(teacher_test&);voidoperate5(teacher_official&);Salary.cpp:#include<iostream>#include<fstream>#include<string>#include"salary.h"usingnamespacestd;//人类成员函数voidperson::person_set(){cin>>num>>name>>sex>>title;}voidperson::person_input(ifstream&iput){iput>>num;iput>>name;iput>>sex;iput>>title;}voidperson::person_display(){cout<<"编号:"<<num<<"";cout<<"姓名:"<<name<<"";cout<<"性别:"<<sex<<"";cout<<"职工类别:"<<title<<"";}voidperson::person_output(ofstream&oput){oput<<num<<"";oput<<name<<"";oput<<sex<<"";oput<<title<<"";第-24-页共50页山有路勤为径,学海无涯苦作舟}stringperson::person_getnum(){returnnum;}stringperson::person_getname(){returnname;}voidperson::changeexist(){exist=0;}intperson::person_exist(){returnexist;}//教师类成员函数voidteacher::teacher_set(){person_set();cin>>classnum;}voidteacher::teacher_input(ifstream&iput){person_input(iput);iput>>classnum;iput>>salary1;}voidteacher::teacher_display(){if(person_exist()!=0){person_display();cout<<"本月课时数:"<<classnum<<"";cout<<"工资:"<<salary1<<endl;}}voidteacher::teacher_output(ofstream&oput){if(person_exist()!=0)第-25-页共50页山有路勤为径,学海无涯苦作舟{person_output(oput);oput<<classnum<<"";oput<<salary1<<endl;}}stringteacher::teacher_getnum(){stringstr;str=person_getnum();returnstr;}stringteacher::teacher_getname(){stringstr;str=person_getname();returnstr;}intteacher::teacher_salary=800;//实验员类成员函数voidtest::test_set(){person_set();}voidtest::test_input(ifstream&iput){person_input(iput);iput>>salary2;}voidtest::test_display(){if(person_exist()!=0){person_display();cout<<"工资:"<<salary2<<endl;}}voidtest::test_output(ofstream&oput){if(person_exist()!=0){第-26-页共50页山有路勤为径,学海无涯苦作舟person_output(oput);oput<<salary2<<endl;}}stringtest::test_getnum(){stringstr;str=person_getnum();returnstr;}stringtest::test_getname(){stringstr;str=person_getname();returnstr;}inttest::test_salary=650;inttest::test_allowance=150;//行政人员类成员函数voidofficial::official_set(){person_set();}voidofficial::official_input(ifstream&iput){person_input(iput);iput>>salary3;}voidofficial::official_display(){if(person_exist()!=0){person_display();cout<<"工资:"<<salary3<<endl;}}voidofficial::official_output(ofstream&oput){if(person_exist()!=0){person_output(oput);第-27-页共50页山有路勤为径,学海无涯苦作舟oput<<salary3<<endl;}}stringofficial::official_getnum(){stringstr;str=person_getnum();returnstr;}stringofficial::official_getname(){stringstr;str=person_getname();returnstr;}intofficial::official_salary=750;intofficial::official_allowance=250;//教师兼实验员类成员函数voidteacher_test::teachertest_set(){teacher_set();}voidteacher_test::teachertest_input(ifstream&iput){person_input(iput);iput>>classnum;iput>>salary4;}voidteacher_test::teachertest_display(){if(person_exist()!=0){person_display();cout<<"本月课时数:"<<classnum<<"";cout<<"工资:"<<salary4<<endl;}}voidteacher_test::teachertest_output(ofstream&oput){if(person_exist()!=0){person_output(oput);第-28-页共50页山有路勤为径,学海无涯苦作舟oput<<classnum<<"";oput<<salary4<<endl;}}stringteacher_test::teachertest_getnum(){stringstr;str=teacher_getnum();returnstr;}stringteacher_test::teachertest_getname(){stringstr;str=teacher_getname();returnstr;}//行政人员兼教师类成员函数voidteacher_official::teacherofficial_set(){teacher_set();}voidteacher_official::teacherofficial_input(ifstream&iput){person_input(iput);iput>>classnum;iput>>salary5;}voidteacher_official::teacherofficial_display(){if(person_exist()!=0){person_display();cout<<"本月课时数:"<<classnum<<"";cout<<"工资:"<<salary5<<endl;}}voidteacher_official::teacherofficial_output(ofstream&oput){if(person_exist()!=0){person_output(oput);oput<<classnum<<"";第-29-页共50页山有路勤为径,学海无涯苦作舟oput<<salary5<<endl;}}stringteacher_official::teacherofficial_getnum(){stringstr;str=teacher_getnum();returnstr;}stringteacher_official::teacherofficial_getname(){stringstr;str=teacher_getname();returnstr;}//operate类成员函数voidoperate::operate1(teacher&p){p.salary1=p.teacher_salary+20*p.classnum;}voidoperate::operate2(test&p){p.salary2=p.test_salary+p.test_allowance;}voidoperate::operate3(official&p){p.salary3=p.official_salary+p.official_allowance;}voidoperate::operate4(teacher_test&p){p.salary4=p.teacher_salary+20*p.classnum+p.test_salary+p.test_allowance;}voidoperate::operate5(teacher_official&p){p.salary5=p.teacher_salary+20*p.classnum+p.official_salary+p.official_alloance}aincppcludeiostreamcludefstreamcludestringncludesalaryh第-30-页共50页山有路勤为径,学海无涯苦作舟usingnamespacestd;intmain(){//定义各类的对象数组及操作类的对象teachert[100];testte[100];officialo[100];teacher_testt_te[100];teacher_officialt_o[100];operateop;ifstreaminfile,infile1,infile2,infile3,infile4,infile5;ofstreamoutfile,outfile1,outfile2,outfile3,outfile4,outfile5;//选择标记inta=0,b=0,c=0,d=0,x=0;//位置标记intp=0,i=0,j=0,k=0,l=0,m=0,n=0,del=0;//结束标记charCorN;//界面说明cout<<"★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★"<<endl;cout<<"★★"<<endl;cout<<"★★"<<endl;☆☆欢迎使用☆☆cout<<"★☆☆高校人员工资管理系统☆☆★"<<endl;cout<<"★★"<<endl;cout<<"★★"<<endl;cout<<"★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★"<<endl;//数据输入cout<<"请选择数据输入方式:1.从键盘输入cin>>x;if(x<1||x>2)cout<<"输入错误!"<<endl;x{2.从文档读入"<<endl;第-31-页共50页山有路勤为径,学海无涯苦作舟cout<<"☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆"<<endl;cout<<"请输入教职工信息(依次为编号、姓名、性别和职工类别,例如:0001张明m实验员)"<<endl;cout<<"每次输入按c继续输入下一个,按n结束!"<<endl;cout<<"☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆"<<endl;for(i=0;i<500;i++){cout<<"请选择要输入的职工类别:"<<endl;cout<<"1.教师2.实验员3.行政人员4.教师兼实验员5.行政人员兼教师"<<endl;cin>>a;if(a<1||a>5)cout<<"输入错误!"<<endl;elsecout<<"请依次输入编号、姓名、性别和职工类别。如是教师,输入本月课时数"<<endl;if(a==1){t[j].teacher_set();j++;}elseif(a==2){te[k].test_set();k++;}elseif(a==3){o[l].official_set();l++;}elseif(a==4){t_te[m].teachertest_set();m++;}else第-32-页共50页山有路勤为径,学海无涯苦作舟if(a==5){t_o[n].teacherofficial_set();n++;}cout<<"继续输入请按c,结束请按n"<<endl;cin>>CorN;while){if(CorN!='c'&&CorN!='n'){cout<<"输入错误,请重新输入!"<<endl;cin>>CorN;}elsebreak;}if(CorN=='n')break;cout<<"☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆"<<endl;//计算所输入职工的工资for(i=0;i<j;i++)op.operate1(t[i]);for(i=0;i<k;i++)op.operate2(te[i]);for(i=0;i<l;i++)op.operate3(o[i]);for(i=0;i<m;i++)op.operate4(t_te[i]);for(i=0;i<n;i++)op.operate5(t_o[i]);}}elseif(x==2){infile.open("biaojishu.txt",ios::in);if(!infile){cerr<<"读取文档biaojishu.txt出错!"<<endl;第-33-页共50页山有路勤为径,学海无涯苦作舟exit(1);}infile1.open("teacher.txt",ios::in);if(!infile1){cerr<<"读取文档teacher.txt出错!"<<endl;exit(1);}infile2.open("test.txt",ios::in);if(!infile2){cerr<<"读取文档test.txt出错!"<<endl;exit(1);}infile3.open("official.txt",ios::in);if(!infile3){cerr<<"读取文档official.txt出错!"<<endl;exit(1);}infile4.open("teachertest.txt",ios::in);if(!infile4){cerr<<"读取文档teachertest.txt出错!"<<endl;exit(1);}infile5.open("teacherofficial.txt",ios::in);if(!infile5){cerr<<"读取文档teacherofficial.txt出错!"<<endl;exit(1);}//读标记数infile>>j;infile>>k;infile>>l;infile>>m;infile>>n;//读数据for(i=0;i<j;i++){t[i].teacher_input(infile1);第-34-页共50页山有路勤为径,学海无涯苦作舟}for(i=0;i<k;i++){te[i].test_input(infile2);}for(i=0;i<l;i++){o[i].official_input(infile3);}for(i=0;i<m;i++){t_te[i].teachertest_input(infile4);}for(i=0;i<n;i++){t_o[i].teacherofficial_input(infile5);}infile.close();infile1.close();infile2.close();infile3.close();infile4.close();infile5.close();}//服务选择(循环)while(1){cout<<"☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆"<<endl;cout<<"输入数据完成,请选择所需服务编号:"<<endl;cout<<endl;cout<<"1.添加"<<endl;cout<<"2.查询"<<endl;cout<<"3.修改"<<endl;cout<<"4.删除"<<endl;cout<<"5.显示"<<endl;cout<<"6.保存"<<endl;cout<<"7.退出"<<endl;cout<<endl;cout<<"退出前请保存!"<<endl;cout<<"☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆"<<endl;第-35-页共50页山有路勤为径,学海无涯苦作舟//添加功能cin>>b;if(b<1||b>7)cout<<"输入错误!"<<endl;elseif(b==1){cout<<"添加功能:"<<endl;while(1){cout<<"请选择要添加人员的职工类别:"<<endl;cout<<"1.教师2.实验员3.行政人员4.教师兼实验员5.行政人员兼教师"<<endl;cin>>a;if(a<1||a>5)cout<<"输入错误!"<<endl;elsecout<<"请依次输入编号、姓名、性别和职工类别。如是教师,输入本月课时数"<<endl;if(a==1){t[j].teacher_set();op.operate1(t[j]);j++;}elseif(a==2){te[k].test_set();op.operate2(te[k]);k++;}elseif(a==3){o[l].official_set();op.operate3(o[l]);l++;}elsea{第-36-页共50页山有路勤为径,学海无涯苦作舟t_te[m].teachertest_set();op.operate4(t_te[m]);m++;}elseif(a==5){t_o[n].teacherofficial_set();op.operate5(t_o[n]);n++;}cout<<"继续添加请按c,结束请按n"<<endl;cin>>CorN;while){if(CorN!='c'&&CorN!='n'){cout<<"输入错误,请重新输入!"<<endl;cin>>CorN;}elsebreak;}fCorNnbreak;}cout<<"☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆"<<endl;}//查询功能elseif(b==2){cout<<"查询功能:"<<endl;stringnum,name;cout<<"请依次输入所要查询的编号号和姓名(例如:0001张明):"<<endl;cin>>num>>name;for(i=0;i<(j+k+l+m+n);i++){ifnumtiteachergetnum()&&name==t[i].teacher_getname())第-37-页共50页山有路勤为径,学海无涯苦作舟{op.operate1(t[i]);t[i].teacher_display();p=i;break;}if(num==te[i].test_getnum()&&name==te[i].test_getname()){op.operate2(te[i]);te[i].test_display();p=i;break;}if(num==o[i].official_getnum()&&name==o[i].official_getname()){op.operate3(o[i]);o[i].official_display();p=i;break;}if(num==t_te[i].teachertest_getnum()&&name==t_te[i].teachertest_getname()){op.operate4(t_te[i]);t_te[i].teachertest_display();p=i;break;}if(num==t_o[i].teacherofficial_getnum()&&name==t_o[i].teacherofficial_getname()){op.operate5(t_o[i]);t_o[i].teacherofficial_display();p=i;}}if(i==(j+k+l+m+n))cout<<"对不起,没有此人信息!"<<endl;}//修改功能第-38-页共50页山有路勤为径,学海无涯苦作舟elseif(b==3){cout<<"编辑功能:"<<endl;while(1){stringnum,name;cout<<"请依次输入所要修改的人员的编号号和姓名(例如:0001张明):"<<endl;cin>>num>>name;foriijklmn);i++){if(num==t[i].teacher_getnum()&&name==t[i].teacher_getname()){op.operate1(t[i]);t[i].teacher_display();p=i;break;}if(num==te[i].test_getnum()&&name==te[i].test_getname()){op.operate2(te[i]);te[i].test_display();p=i;break;}if(num==o[i].official_getnum()&&name==o[i].official_getname()){op.operate3(o[i]);o[i].official_display();p=i;break;}if(num==t_te[i].teachertest_getnum()&&name==t_te[i].teachertest_getname()){op.operate4(t_te[i]);t_te[i].teachertest_display();p=i;第-39-页共50页山有路勤为径,学海无涯苦作舟break;}if(num==t_o[i].teacherofficial_getnum()&&name==t_o[i].teacherofficial_getname()){op.operate5(t_o[i]);t_o[i].teacherofficial_display();p=i;break;}}if(i==(j+k+l+m+n)){cout<<"对不起,没有此人信息!"<<endl;break;}elsebreak;}{cout<<"请选择您所需要修改的数据的职工类型:"<<endl;cout<<"1.教师2.实验员3.行政人员4.教师兼实验员5.行政人员兼教师"<<endl;cin>>c;if(c<1||c>5)cout<<"输入错误!"<<endl;elsecout<<"请依次输入编号、姓名、性别和职工类别。如是教师,输入本月课时数"<<endl;if(c==1){t[p].teacher_set();op.operate1(t[p]);}elseif(c==2){te[p].test_set();op.operate2(te[p]);}第-40-页共50页山有路勤为径,学海无涯苦作舟if(c==3){o[p].official_set();op.operate3(o[p]);}elseif(c==4){t_te[p].teachertest_set();op.operate4(t_te[p]);}elseif(c==5){t_o[p].teacherofficial_set();op.operate5(t_o[p]);}}}//删除功能elseif(b==4){cout<<"删除功能:"<<endl;while(1){stringnum,name;如:0001张明):"<<endl;cin>>num>>name;foriijklmn);i++){if(num==t[i].teacher_getnum()&&name==t[i].teacher_getname()){op.operate1(t[i]);t[i].teacher_display();p=i;break;第-41-页共50页山有路勤为径,学海无涯苦作舟}if(num==te[i].test_getnum()&&name==te[i].test_getname()){op.operate2(te[i]);te[i].test_display();p=i;break;}if(num==o[i].official_getnum()&&name==o[i].official_getname()){op.operate3(o[i]);o[i].official_display();p=i;break;}if(num==t_te[i].teachertest_getnum()&&name==t_te[i].teachertest_getname()){op.operate4(t_te[i]);t_te[i].teachertest_display();p=i;break;}if(num==t_o[i].teacherofficial_getnum()&&name==t_o[i].teacherofficial_getname()){op.operate5(t_o[i]);t_o[i].teacherofficial_display();p=i;}}if(i==(j+k+l+m+n)){cout<<"对
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年度年福建省高校教师资格证之高等教育心理学综合练习试卷B卷附答案
- 2024年度山西省高校教师资格证之高等教育法规押题练习试题B卷含答案
- 重庆市西南大学附中2024-2025学年高一上定时检测(一)语文试题含答案
- 2024年度xx村监测对象风险消除民主评议会议记录
- 湖南省长沙市长郡郡维中学2022-2023学年九年级上学期入学英语试卷(含答案)
- 2024年长沙市事业单位招聘计算机岗位专业知识试题
- 2024年培训学校业务外包协议
- 2024年工程咨询服务具体协议样式
- 2024医疗销售企业合作协议样本
- 2024房屋建筑施工劳务协议详例
- 部编版五年级上册道德与法治第三单元知识点归纳整理
- 养老机构(养老院)全套服务管理实用手册
- 企业文化管理第八章企业文化的比较与借鉴
- WST311-2023《医院隔离技术标准》
- 《缕书香伴我同行》课件
- 建设项目竣工环境保护验收管理办法
- 100道解方程 计算题
- 赛事承办服务投标方案(技术方案)
- 概率论(华南农业大学)智慧树知到课后章节答案2023年下华南农业大学
- 上海中考英语专项练习-动词的时态-练习卷一和参考答案
- GB 4806.7-2023食品安全国家标准食品接触用塑料材料及制品
评论
0/150
提交评论