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

正文內(nèi)容

面向?qū)ο骳課程設(shè)計-在線瀏覽

2024-08-03 13:11本頁面
  

【正文】 nclude include include iostream include iomanip include string include cstring //靜態(tài)變量初始化 int StudentNode::s_count=0。 } //構(gòu)造函數(shù) 創(chuàng)建第一個學(xué)生對象 StudentNode::StudentNode(string name,string sex,string major,string birthday,string address,float EnScore) { thism_no=++s_count。 thism_sex=sex。 thism_birthday=birthday。 thism_EnScore=EnScore。 } //構(gòu)造函數(shù) 創(chuàng)建第二個及以上學(xué)生對象 連接到調(diào)用對象尾巴 StudentNode::StudentNode(string name,string sex,string major,string birthday,string address,float EnScore,StudentNode *p) { thism_no=++s_count。 thism_sex=sex。 thism_birthday=birthday。 thism_EnScore=EnScore。 } //設(shè)置學(xué)生信息 福建工程學(xué)院 信息學(xué)院 面向?qū)ο笳n程設(shè)計(題目范例) 7 void StudentNode::setStudentNode(string name,string sex,string major,string birthday,string address,float EnScore,StudentNode *_next/*=NULL*/) { thism_no=++s_count。 thism_sex=sex。 thism_birthday=birthday。 thism_EnScore=EnScore。 } //復(fù)制構(gòu)造函數(shù) StudentNode::StudentNode(StudentNode amp。 thism_name=。 thism_major=。 thism_address=。 thisnext=NULL。 } //獲取編號 int StudentNode::getNo() { return thism_no。 } //獲取英語成績 float StudentNode::getEnScore() { return thism_EnScore。 } //獲取性別 string StudentNode::getSex() { return thism_sex。 } //獲取地址 string StudentNode::getAddress() { return thism_address。 } //訪問學(xué)生對象 void StudentNode::visitStudentNode() { coutsetiosflags(ios::left)。 } /////////////////////////////////////////////////////////////// // // FileName : // Creator : Berlin // Date : 2021318 10:20 // Comment :鏈表類聲明 // /////////////////////////////////////////////////////////////// ifndef __STUDENTLINKLIST_H_ define __STUDENTLINKLIST_H_ 福建工程學(xué)院 信息學(xué)院 面向?qū)ο笳n程設(shè)計(題目范例) 9 include include iostream include string using namespace std。 public: StudentLinklist()。 void addAtEnd(string name,string sex,string major,string birthday,string address,float EnScore)。 void createList()。//瀏覽學(xué)生記錄 void deleteStuNode()。//搜索學(xué)生記錄 void modifyStuNode()。//導(dǎo)入學(xué)生信息 void saveStuNode()。//統(tǒng)計學(xué)生選擇 void showMajor()。//按性別統(tǒng)計 void showAge()。//冒泡排序 ~StudentLinklist(){} }。 //無參構(gòu)造函數(shù) StudentLinklist::StudentLinklist() { thishead=NULL。 } //讀取文件內(nèi)容 void StudentLinklist::createList() { StudentNode *rear=thishead。 ifstream fileOut( .txt,ios::binary|ios::out)。 exit(EXIT_FAILURE)。// 臨時中轉(zhuǎn)站 ( reinterpret_castchar *(p) , sizeof(*p) )。//錯誤: rear=new StudentNode(*p)。//沒有此句 錯誤 } else { while( reargetNext()!=NULL ) 福建工程學(xué)院 信息學(xué)院 面向?qū)ο笳n程設(shè)計(題目范例) 11 { rear=reargetNext()。//調(diào)用復(fù)制構(gòu)造函數(shù) } } ()。//rear=NULL。 cout請輸入導(dǎo)入的文件路徑及文件名: endl。 ifstream fileOut(fileName,ios::binary|ios::out)。 exit(EXIT_FAILURE)。// 臨時中轉(zhuǎn)站 ( reinterpret_castchar *(p) , sizeof(*p) )。//錯誤: rear=new StudentNode(*p)。//沒有此句 錯誤 } else { while( reargetNext()!=NULL ) { rear=reargetNext()。//調(diào)用復(fù)制構(gòu)造函數(shù) } } ()。 StudentNode *rear=thishead。 ( .txt, ios_base::app)。 thishead=p。 } else { while(reargetNext()!=NULL) { rear=reargetNext()。 rearsetNext(p)。 } ()。 if(thishead=NULL) { thishead=p。 } pnsetNext(p)。 p=thishead。 } else { cout\t\t\t\t學(xué)生情況 endl。 coutsetiosflags(ios::left)。 cout━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━ endl。 p=pgetNext()。 cout━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ endl。 } } //刪除學(xué)生記錄 void StudentLinklist::deleteStuNode() { string name。 StudentNode* follow=p。 cinname。 return。 delete p。amp。//follow一直指向 p的前一個結(jié)點 p=pgetNext()。 delete p。 StudentNode* p=thishead。 if(thishead!=NULL) { cout請輸入學(xué)生姓名關(guān)鍵字 :endl。 } else { cout學(xué)生記錄為空,沒有可搜索的學(xué)生。 return。 if(flag==1) { 福建工程學(xué)院 信息學(xué)院 面向?qū)ο笳n程設(shè)計(題目范例) 15 cout姓名關(guān)鍵字為 :name的學(xué)生信息為: endl。 coutsetw(5) 編號 setw(10) 學(xué)生姓名 setw(5) 性別setw(10)生日 setw(15)專業(yè) setw(10)外語成績 setw(20)地址endl。 } pvisitStudentNode()。 } else p=pgetNext()。 else cout沒有名為: name的學(xué)生。 } //統(tǒng)計學(xué)生總?cè)藬?shù) void StudentLinklist::showStuNode(StudentLinklist *sl) { cout學(xué)生總?cè)藬?shù)為: 。//靜態(tài)成員函數(shù)調(diào)用 顯示人數(shù) coutendl。 cout\t\t┃ 學(xué)生信息統(tǒng)計 ┃ endl。 cout\t\t┃ 1 = 按專業(yè)統(tǒng)計 ┃ endl。 cout\t\t┃ 3 = 按年齡統(tǒng)計 ┃ endl。 cout\t\t┗━━━━━━━━━━━━━━━━━━━━━┛ endl。 cout請輸入選擇: 。 switch(choice) { case 0: slshowMajor()。 case 1: slshowSex()。 case 2: system(cls)。 break。 slshowAge()。 default: cout輸入錯誤,請從新輸入 endl。 } } //按年齡統(tǒng)計 void StudentLinklist::showAge() { StudentNode *follow=thishead。 int bornyear。//類 CTime的對象 curren
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1