资源描述:
《学生考勤管理系统源代码》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、#include#include#includeusingnamespacestd;classtime{public:time(inty=0,intm=0,intd=0){year=y;month=m;day=d;}~time(){}protected:intyear,month,day;};//信息类classxinxi:publictime{public:xinxi(){tiaoshu++;}~xinxi(){tiaoshu--;}voidsetname(char*n){strcpy(name,n);}
2、voidsettime(inty,intm,intd){year=y;month=m;day=d;}voidsetqklx(char*qk){strcpy(queke,qk);}voidsetjieci(char*jc){strcpy(jieci,jc);}voidsetkechen(char*kc){strcpy(kechen,kc);}char*getname(){char*n;n=name;returnn;}char*getqklx(){char*qk=queke;returnqk;}char*getjieci(){char*jc;jc=jieci;retur
3、njc;}char*getkechen(){char*gk;gk=kechen;returngk;}int*gettime();private:charname[20];//姓名charjieci[3],kechen[10],queke[10];inttm[3];staticinttiaoshu;};intxinxi::tiaoshu=0;int*xinxi::gettime(){int*t;t=tm;tm[0]=year;tm[1]=month;tm[2]=day;returnt;}classqkechen:publicxinxi{public:qkechen()
4、{kcshu++;}~qkechen(){kcshu--;}intgetrc(xinxist1[],intn,intj);charqkn[20];//公有数据成员private:intrenci;staticintkcshu;//静态数据成员};intqkechen::kcshu=0;intqkechen::getrc(xinxist1[],intn,intj){renci=0;renci++;for(inti=0;i5、e()+2)==*(st1[j].gettime()+2))if(strcmp(qkn,st1[i].getkechen())==0)renci++;returnrenci;}classqstu:publicxinxi{public:qstu(){qst++;}~qstu(){qst--;}voidprint(xinxi&st1);intgetjs(xinxist1[],intn,intj);intsetjs(intjs=0){jieshu=js;}charqstn[20];private:intjieshu;staticintqst;//静态数据成员};intqs
6、tu::qst=0;voidqstu::print(xinxi&st1){cout<<"
7、缺课日期
8、"<<"第几节课
9、"<<"课程名称
10、"<<"缺课类型
11、"<12、"<<*st1.gettime()<<"
13、"<<*(st1.gettime()+1)<<*(st1.gettime()+2)<<"
14、"<15、"<16、"<17、"<18、in;if(*(st1[j].getjieci()+2)!=' ')js=+2;elsejs++;for(i=0;i