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

正文內(nèi)容

用c實(shí)現(xiàn)水電煤氣管理系統(tǒng)(留存版)

2025-05-23 01:03上一頁面

下一頁面
  

【正文】 o。 TeacherFile tf。 } else return 。 cout請輸入新教工的身份證號(hào):。應(yīng)繳費(fèi)用(四)UML圖:StuFile+id:string+name:string+useWater:float+usePower:float+useGas:float+money:float+add():void+display():void+wjf():voidStudentfreeWater:floatfreePower:floatfreeGas:float+display():void+getMoney():voidUser+i:string+n:string+w:float+p:float+g:float+getId():string+getName():string+setId(string i) :string+setName(string n) :string+setWater(float w) :float+setPower(float p) :float+setGas(float g) :float+getWater():float 三. 程序代碼://收費(fèi)標(biāo)準(zhǔn)ifndef Constantdefine Constant//教師const static float TwaterUnit=1。在設(shè)計(jì)時(shí)要考慮到學(xué)生和教工在用水電時(shí)的不同,學(xué)生可以免費(fèi)使用一定額度的水電,超過這個(gè)額度的隨便以后必須自費(fèi)使用,且自費(fèi)部分水電費(fèi)的價(jià)格標(biāo)準(zhǔn)要高于教工的收費(fèi)標(biāo)準(zhǔn)(主要是節(jié)約資源)。(2) 該文件中有兩個(gè)類:1. StuFile類,主要用于對學(xué)生信息的操作 函數(shù)屬性注釋PublicStuFile()構(gòu)造函數(shù)Publicvoid add(Student amp。//保存教師信息的文件const static char* teaFileName=。 } else if(o==2) { string id。 TeacherFile tf。 return 。 StuFile sf。 cingas。 cout|setw(18)身份證號(hào)| setw(8)姓名| setw(8)用水量| setw(8)用電量| setw(8)用煤氣量| setw(8)要繳的費(fèi)用endl。 cout endl。 case 2: select()。 system(pause)。 float useGas。 ()。 for(int i=0。 } } } isclose()。 ()。 float freeGas。endifincludeiostreamincludeiomanipincludestringusing namespace std。 } void setName(string n) { name=n。 程序的完成使我很高興,所有的疲憊已經(jīng)不算什么了,現(xiàn)在覺得要想編寫一個(gè)好的程序真的很累,它需要牢固的基礎(chǔ)知識(shí)作為鋪墊,所有源代碼的編寫輸入以及每一步的調(diào)試都容不得一點(diǎn)馬虎,整個(gè)牢固的基礎(chǔ)是編程的最基本需要,要想好每一步的算法,要想到每一個(gè)相應(yīng)的函數(shù)。 money=0。 float p=TpowerUnit* usePower。 } }}。 ()。 } else { while(isgood()) { Teacher s(,)。stuListat(i),sizeof(Student))。s) { stuListpush_back(s)。public : string id。 cout ☆ 楊振坡 ☆endl。 } } while(a0||a4)。 cout ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆endl。 if(user==0) user=(id)。 cinwater。 float water。 cinid。 cout請輸入你要進(jìn)行的操作:。 cinname。//學(xué)生const static float SwaterUnit=1。,用于初始化身份證號(hào)碼、姓名、用水電、煤氣量,又定義了繳費(fèi)函數(shù)setMonery(),用在有人繳費(fèi)的函數(shù)體中,從鍵盤輸入繳的費(fèi)用,一開始我們在setMoney(),中沒有對繳的費(fèi)用進(jìn)行累加,在查詢信息時(shí)現(xiàn)實(shí)的應(yīng)繳費(fèi)用不正確,經(jīng)過我們的努力,檢查出錯(cuò)誤并加以改正,讓程序更加完善。|Teacher類,其中有計(jì)算應(yīng)該繳的費(fèi)用,Student類比Teacher類多了免費(fèi)。const static float SpowerUnit=1。 Teacher t(id,name)。 int o。 user=(id)。 float power。 cout請輸入他的用電量:。 if(user==0) { cout資料庫中沒有該身份證號(hào)的用戶!endl。 coutendl。 return a。 cout ☆ ☆endl。 string name。 } void display() { for(int i=0。 } ()。 isread((char*)amp。 } } } void display() { for(int i=0。endififndef STUDENT_CLASSdefine STUDENT_CLASSincludeiostreamincludeiomanipincludestringincludeincludeusing namespace std。 float g=TgasUnit* useGas。 } string getId() { return id。 我覺得一周的課程設(shè)計(jì)遠(yuǎn)遠(yuǎn)比我自己看兩周書的收
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1