freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

簡(jiǎn)單學(xué)生信息管理系統(tǒng)c范文-在線瀏覽

2024-11-04 12:28本頁(yè)面
  

【正文】 )和數(shù)據(jù)結(jié)構(gòu)(g)三門(mén)課程成績(jī)輸入輸出和計(jì)算機(jī)平均分(ave)。博士后數(shù)據(jù)的輸入輸出。ff)。ff)。//名字作為關(guān)鍵字,這個(gè)函數(shù)就用來(lái)比較 void addList(chainList *list)。//根據(jù)名字刪除void editList(chainList *list,char *name)。//只提供名字查詢(xún)(其他以后加入)//返回前一個(gè)節(jié)點(diǎn)的指針void orderList(chainList *list)。//按年齡降序排列void orderListBySex(chainList *list)。void printList(chainList *list)。char fileName[30]。chainList *head=amp。if(sn==39。){ifstream file。(fileName)。}// coutfileRead(head,file)。} printStaticInfo(head)。do {coutctn。039。case 39。:addList(head)。case 39。:coutchar nm[20]。chainList *pdel。char sure。n39。coutcinsure。y39。cout} } break。339。chainList *pp。if(ppnext){coutppnextplprint()。}elsecoutbreak。439。cinname。p=searchList(head,name)。}elsecoutbreak。539。cinch。139。printStaticInfo(head)。case 39。:coutorderListByAge(head)。break。339。printStaticInfo(head)。default:cout}break。639。break。039。coutsave。n39。ofstream fin。//如果文件已經(jīng)存在,詢(xún)問(wèn)是否覆蓋。}fileWrite(head,fin)。coutvoid fileRead(chainList *list,ifstream amp。int tp。int ag。int slr。int e。int g。char schl[20]。int teaYear。persons*psn。while(tp){ ffag。ffsx。ffschl。break。ffteaYear。break。psn=new empoyee(ag,nm,sx,slr)。}} chainList*s=new chainList(tp,psn)。p=s。void fileWrite(chainList *list,ofstream amp。while(p){fftypeOfPnplageplnameplsexswitch(ptypeOfPn){case 1:ffpl)gradepl)schoolbreak。case 3:ffpl)salarybreak。} int aa=0。while((p1[i]==p2[i])amp。p1[i]amp。p2[i])i++。} else { if(p1[i]p2[i])return 1。} }void addList(chainList *list)//添加節(jié)點(diǎn) {char tp。do{ cout teacher mon employee”tp。int ag。int slr。char schl[20]。int m。int average。int teaYear。persons*psn。039。type=0。case 39。:type=1。coutcinag。coutcingrd。coutcine。coutcing。break。239。coutcinnm。coutcinsx。coutcinteaYear。break。339。coutcinnm。coutcinsx。psn=new empoyee(ag,nm,sx,slr)。default:type=6。cout}chainList*p=list。if(pnext){=pareStr(nm,pnextplname)。amp。if(pnext)=pareStr(nm,pnextplname)。snext=pnext。}}while(type)。nodenext=ptempnext。} void editList(chainList *list,char *name)//刪除,添加就是編輯。{ chainList *pde。char tp。do{coutcout teacher mon employee”coutcintp。int ag。int slr。char schl[20]。int m。int average。int teaYear。persons*psn。switch(tp){ case 39。:aa=0。break。139。coutnm。coutsx。coutschl。coutm。psn=new student(ag,nm,sx,grd,schl,e,m,g,average)。case 39。:type=2。coutag。coutsb。psn=new teacher(ag,nm,sx,sb,teaYear)。case 39。:type=3。coutcinag。coutcinslr。break。aa=0。//新節(jié)點(diǎn)在p所指的節(jié)點(diǎn)之前插入,if(aa){int 。cout}while(pnextamp。0)//比p節(jié)點(diǎn)小或者p為空退出{p=pnext。}chainList *s=new chainList(type,psn)。pnext=s。} chainList *searchList(chainList *list,char*name)//查找函數(shù) { chainList *p=list。if(pnext)=pareStr(name,pnextplname)。amp。if(pnext)=pareStr(name,pnextplname)。} void orderList(chainList *list){ chainList *p,*q。q=pnext。amp。amp。i=i。s=qnext。snext=pnext。p=s。}if(i==0)//字母順序相同的插到后面{chainList*ss。qnext=ssnext。//讓p永遠(yuǎn)指向插入位置前一個(gè)位置。pnext=ss。break。}p=list。if(qnext)q=qnext。} }void orderListByAge(chainList *list){ chainList*p,*q。q=pnext。amp。if(i0)//年齡大的插到用于比較的節(jié)點(diǎn)前面{chainList*s。qnext=snext。pnext=s。break。ss=qnext。p=pnext。ssnext=pnext。p=ss。}p=pnext。//讓p重新指向頭節(jié)點(diǎn)。//q前進(jìn)一步。p=q=list。f39。s=qnext。//刪除,然后插到前面snext=pnext。p=s。} }void printStaticInfo(chainList*list){ int count,countS,countT,countE,countMale,countFemale。chainList*p=listnext。count++。m39。elsecountFemale++。break。break。break。} cout部分截圖開(kāi)始NY輸入姓名或?qū)W號(hào)開(kāi)始NY輸入姓名或?qū)W號(hào)N打開(kāi)文件打開(kāi)文件Y輸出信息(name==sign)||(number==sign))Y刪除信息(name==sign)||(number==sign))N返回主菜單返回主菜單心得體會(huì):通過(guò)本次課程設(shè)計(jì)懂得了,學(xué)習(xí)計(jì)算機(jī)語(yǔ)言知識(shí),要不斷實(shí)踐,不斷學(xué)習(xí)新的內(nèi)容,特別是課堂中沒(méi)有涉及的內(nèi)容要自主的去學(xué)習(xí)并學(xué)會(huì)運(yùn)用。通過(guò)一星期的C++語(yǔ)言程序設(shè)計(jì)課程設(shè)計(jì),我們從中受益匪淺,并且對(duì)C++語(yǔ)言程序設(shè)計(jì)這一門(mén)課程有了更深一步的認(rèn)識(shí)。雖然我們對(duì)這些C++語(yǔ)言知識(shí)運(yùn)用得還不是很熟練,但是相信我們也在滴水穿石地成長(zhǎng)起來(lái)。在課程設(shè)計(jì)中,我設(shè)計(jì)了一個(gè)學(xué)生信息管理系統(tǒng),它基本足了界面友好,易于操作的要求,因此更利于用戶(hù)操作方便,運(yùn)行簡(jiǎn)易,從而達(dá)到對(duì)人員管理更加有效系統(tǒng)的管理,并且速度更快內(nèi)容更直接地達(dá)到用戶(hù)所想要的效果。但軟件中仍然存在一些不足,例如在輸入有關(guān)學(xué)生的數(shù)據(jù)時(shí)名字沒(méi)有限定,插入新的學(xué)生信息的程序還有待完善,菜單不美觀等。在實(shí)習(xí)中我們學(xué)到了很多,希望在以后我們能充分利用這樣的機(jī)會(huì)充實(shí)自己,并希望這樣的機(jī)會(huì)能被更好更多地提供。//文件指針class Time //時(shí)間類(lèi) {public:int year。int day。class Telem //個(gè)人信息 {public:char name[20]。Time birthtime。char wage[20]。int year。friend istreamamp。 input,Telemamp。friend ostreamamp。 t1,Time amp。}。virtual void AddF()=0。virtual void Add()=0。//輸出數(shù)組的內(nèi)容virtual void Displaypart(char p[])。virtual void Findyear(int)。virtual void Del(int)。Time now。}。virtual void Addall()。virtual void Display()。virtual void Del(char n[])。class worker:virtual public People //派生虛基類(lèi) {public:virtual void AddF()。virtual void Add()。virtual void Del(int i)。}。=2010。=6。for(i=0。for(i=0。default:cout}}loop:。for(i=0。for(i=0。if(ilength)coutfor(j=i。length。(“”,ios::in|ios::binary)。((char*)amp。//文件的隨機(jī)訪問(wèn)length++。goto loop。coutloop:if(1==flag)cout()。int flag=0。do{cindata[length]。((char*)amp。coutlength++。goto loop。}while(39。==ans||39。==ans)。}void worker::Add(){int flag=0。if(length==maxsize){flag=1。}cindata[length]。((char*)amp。coutlength++。}void worker::Display(){coutif(0==length)coutint i。icoutint i,j,k。iif(strcmp(data[i].name,n)==0){k=i+1。}if(kcoutfor(j=k。length。if(ilength)coutfor(j=i。length。(“”,ios::in|ios::binary)。data[length],sizeof(data[length]))。length++。goto loop。coutif(1==flag)cout()。int flag=0。do{cindata[length]。((char*)amp。coutlength++。got
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1