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

正文內(nèi)容

用c實(shí)現(xiàn)水電煤氣管理系統(tǒng)-文庫(kù)吧

2025-03-24 01:03 本頁(yè)面


【正文】 ng i,string n,float w=0,float p=0,floatg=0):User(I,n,w,p,g)構(gòu)造函數(shù)Publicvoid display()依次顯示所有的教工信息Publicfloat getMoney()返回教工應(yīng)繳的費(fèi)用 (6)函數(shù)屬性注釋PublicUser(string i,string n,float w=0,float p=0,float g=0)構(gòu)造函數(shù)Publicstring getId()獲取編號(hào)Publicstring getName()獲取姓名Publicvoid setId(string i)設(shè)置編號(hào)Publicvoid setName(string n)設(shè)置姓名Publicvoid setWater(float w)設(shè)置水量Publicvoid setPower(float p)設(shè)置電量Publicvoid setGas(float g)設(shè)置煤氣量Publicfloat getWater()使用水量Publicvirtual void display()=0。依次顯示所有信息Publicvoid setMoney(float m)繳費(fèi)Publicvirtual float getMoney()=0。應(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。const static float TpowerUnit=1。const static float TgasUnit=1。//學(xué)生const static float SwaterUnit=1。const static float SpowerUnit=1。const static float SgasUnit=1。//保存學(xué)生信息的文件const static char* stuFlieName=。//保存教師信息的文件const static char* teaFileName=。endifincludeiostreamincludeiomanipincludestringincludevectorincludeincludeincludeusing namespace std。void init(){ coutendl。 cout\n \nendl。 cout請(qǐng)選擇你要進(jìn)行的操作:endl。 int o。 cino。 if(o==1) { string id。 string name。 cout請(qǐng)輸入新教工的身份證號(hào):。 cinid。 cout請(qǐng)輸入新教工的姓名:。 cinname。 Teacher t(id,name)。 TeacherFile tf。 (t)。 } else if(o==2) { string id。 string name。 cout請(qǐng)輸入新學(xué)生的身份證號(hào):。 cinid。 cout請(qǐng)輸入新學(xué)生的姓名:。 cinname。 Student s(id,name)。 StuFile sf。 (s)。 } else return 。}void select(){ coutendl。 cout\n \n \n \n \nendl。 cout請(qǐng)輸入你要進(jìn)行的操作:。 int o。 cino。 StuFile sf。 TeacherFile tf。 if(o==1) { cout該用戶的信息是:endl。 cout|setw(18)身份證號(hào)| setw(8)姓名| setw(8)用水量| setw(8)用電量| setw(8)用煤氣量| setw(8)要繳的費(fèi)用endl。 ()。 } else if(o==2) { cout該用戶的信息是:endl。 cout|setw(18)身份證號(hào)| setw(8)姓名| setw(8)用水量| setw(8)用電量| setw(8)用煤氣量| setw(8)要繳的費(fèi)用endl。 ()。 } else if(o==3) { User *user。 StuFile sf。 TeacherFile tf。 string id。 cout請(qǐng)輸入他的身份證號(hào):。 cinid。 user=(id)。 if(user==0) user=(id)。 if(user==0) { cout資料庫(kù)中沒有該身份證號(hào)的用戶!endl。 return 。 } cout該用戶的信息為:endl。 cout|setw(18)身份證號(hào)| setw(8)姓名| setw(8)用水量| setw(8)用電量| setw(8)用煤氣量|
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1