![房屋租售管理系統(tǒng)c++程序設(shè)計(jì)1_第1頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/8/28a30583-ac75-4042-994e-2d7edb03e9fd/28a30583-ac75-4042-994e-2d7edb03e9fd1.gif)
![房屋租售管理系統(tǒng)c++程序設(shè)計(jì)1_第2頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/8/28a30583-ac75-4042-994e-2d7edb03e9fd/28a30583-ac75-4042-994e-2d7edb03e9fd2.gif)
![房屋租售管理系統(tǒng)c++程序設(shè)計(jì)1_第3頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/8/28a30583-ac75-4042-994e-2d7edb03e9fd/28a30583-ac75-4042-994e-2d7edb03e9fd3.gif)
![房屋租售管理系統(tǒng)c++程序設(shè)計(jì)1_第4頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/8/28a30583-ac75-4042-994e-2d7edb03e9fd/28a30583-ac75-4042-994e-2d7edb03e9fd4.gif)
![房屋租售管理系統(tǒng)c++程序設(shè)計(jì)1_第5頁](http://file2.renrendoc.com/fileroot_temp3/2021-7/8/28a30583-ac75-4042-994e-2d7edb03e9fd/28a30583-ac75-4042-994e-2d7edb03e9fd5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、程序設(shè)計(jì)報(bào)告( 2012 / 2013 學(xué)年 第 一 學(xué)期)題 目: 房屋租售管理系統(tǒng) 專 業(yè) 學(xué) 生 姓 名 班 級 學(xué) 號 指 導(dǎo) 教 師 指 導(dǎo) 單 位 日 期 2012.11.02 評 分 細(xì) 則評分項(xiàng)優(yōu)秀良好中等差遵守機(jī)房規(guī)章制度上機(jī)時(shí)的表現(xiàn)學(xué)習(xí)態(tài)度程序準(zhǔn)備情況程序設(shè)計(jì)能力團(tuán)隊(duì)合作精神課題功能實(shí)現(xiàn)情況算法設(shè)計(jì)合理性用戶界面設(shè)計(jì)報(bào)告書寫認(rèn)真程度內(nèi)容詳實(shí)程度文字表達(dá)熟練程度回答問題準(zhǔn)確度簡 短 評 語教師簽名: 年 月 日評分等級備注評分等級有五種:優(yōu)秀、良好、中等、及格、不及格房屋租售管理系統(tǒng)一、 課題內(nèi)容和要求 該系統(tǒng)要求建立某房屋租售中介管理系統(tǒng),并實(shí)現(xiàn)輸入口令進(jìn)入系統(tǒng)、基礎(chǔ)信息建
2、立、客戶統(tǒng)計(jì)、房源排序、銷售業(yè)績及傭金收入統(tǒng)計(jì)、相關(guān)文件存盤功能。通過此課題,熟練掌握文件、數(shù)組、指針的各種操作,以及一些算法思想的應(yīng)用。二、需求分析模塊一:基礎(chǔ)信息管理,該模塊實(shí)現(xiàn)員工、樓盤及門店信息的查看與建立;模塊二:客戶管理,該模塊實(shí)現(xiàn)客戶信息的建立、查看與各類客戶數(shù)量統(tǒng)計(jì);模塊三:房源查看,該模塊實(shí)現(xiàn)房源信息按租金升序、售金升序、租金降序、售金降序顯示;模塊四:統(tǒng)計(jì)分析,該模塊實(shí)現(xiàn)某一指定時(shí)間段內(nèi)銷售情況及傭金收入統(tǒng)計(jì);模塊五:保存文件,該模塊實(shí)現(xiàn)各類相關(guān)文件的保存;模塊六:退出系統(tǒng),該模塊實(shí)現(xiàn)本系統(tǒng)的退出;三、概要設(shè)計(jì) 開始輸入密碼密碼正確確ny進(jìn)入系統(tǒng)統(tǒng)計(jì)分析保存文件退出系統(tǒng)房源
3、查看客戶管理基礎(chǔ)信息管理123450結(jié)束1.基礎(chǔ)信息管理:包括樓盤信息查詢、員工信息查詢、門店信息查詢、樓盤信息建立、員工信息建立、門店信息建立、返回上級菜單幾項(xiàng)功能;2.客戶管理:包括客戶信息查詢、客戶信息建立、客戶數(shù)量統(tǒng)計(jì)及返回上級菜單幾項(xiàng)功能;3.房源查看:包括按租金升序顯示房源信息、按租金降序顯示房源信息、按售金升序顯示房源信息、按售金降序顯示房源信息及返回上級菜單幾項(xiàng)功能;4.統(tǒng)計(jì)分析:包括銷售情況及傭金收入統(tǒng)計(jì)及返回上級菜單幾項(xiàng)功能;5.保存文件:保存所有相關(guān)文件;6退出系統(tǒng):退出房屋租售管理系統(tǒng)。四、源程序代碼 #include#include#include#include#i
4、nclude#includeusing namespace std;class date /定義日期類protected:int year; /年int month; /月int day; /日public:void set(int,int,int); /設(shè)置日期void input(); /輸入日期bool operator(date ob)const; /重載運(yùn)算,實(shí)現(xiàn)日期比較int getyear(); /返回年int getmonth(); /返回月int getday(); /返回日 ;/date類函數(shù)的實(shí)現(xiàn)void date:set(int y,int m,int d)year=y
5、;month=m;day=d;void date:input()coutyear;coutmonth;coutday;bool date:operator(date ob)constif(yearob.year)return true;else if(year=ob.year)if(monthob.month)return true;else if(month=ob.month)if(dayob.day)return true;elsereturn false;else return false;elsereturn false;int date:getyear()return year;in
6、t date:getmonth()return month;int date:getday()return day;class floor /定義樓盤類protected:string num; /樓盤編號 double size; /樓盤面積 double hire; /樓盤租金 double buy; /樓盤售金 bool state; /樓盤狀態(tài)(1-售,0-租)date da; /租出/售出日期public:floor(string nu,double si,double hi,double bu,bool st,int y,int m,int d); /構(gòu)造函數(shù)void input(
7、); /輸入單個(gè)樓盤信息 bool operator(floor ob)const; /重載運(yùn)算,set容器要求元素之間滿足該關(guān)系string getnum(); /返回樓盤編號double getsize(); /返回樓盤面積 double gethire(); /返回樓盤租金double getbuy(); /返回樓盤售金bool getstate(); /返回樓盤狀態(tài)date getda(); /返回樓盤租出/售出日期;/floor類函數(shù)的實(shí)現(xiàn)floor:floor(string nu,double si,double hi,double bu,bool st,int y,int m,i
8、nt d)num=nu;size=si;hire=hi;buy=bu;state=st;da.set(y,m,d);void floor:input()coutnum;coutendl;coutsize;coutendl;couthire;coutendl;coutbuy;coutendl;coutstate;coutendl;cout租出/售出日期: n;da.input();bool floor:operator(floor ob)constif(numob.num)return true;elsereturn false;string floor:getnum()return num;d
9、ouble floor:getsize()return size;double floor:gethire()return hire;double floor:getbuy()return buy;bool floor:getstate()return state;date floor:getda()return da;class staff /定義員工類protected:string number;/員工編號 string name; /員工姓名char sex; /員工性別string tel; /員工電話 double commission; /員工工資public:staff(str
10、ing num,string na,char se,string te,double co); /構(gòu)造函數(shù) void input(); /輸入員工信息bool operator(staff ob)const; /重載運(yùn)算,set容器要求元素之間滿足該關(guān)系string getnumber(); /返回員工編號string getname(); /返回員工姓名char getsex(); /返回員工性別string gettel(); /返回員工電話double getcommission(); /返回員工工資;/staff類函數(shù)的實(shí)現(xiàn)staff:staff(string num,string n
11、a,char se,string te,double co)number=num;name=na;sex=se;tel=te;commission=co;void staff:input()coutname;coutnumber;coutsex;couttel;coutcommission;bool staff:operator(staff ob)constif(numberob.number)return true;elsereturn false;string staff:getnumber()return number;string staff:getname()return name;
12、char staff:getsex()return sex;string staff:gettel()return tel;double staff:getcommission()return commission;class store /定義門店類protected:string stonum; /門店編號int staffnum; /員工數(shù)量int floornum; /負(fù)責(zé)樓盤數(shù)量public:store(string sn,int st,int fl); /構(gòu)造函數(shù)void input(); /輸入門店信息bool store:operator(store ob)const; /重載
13、運(yùn)算,set容器要求元素之間滿足該關(guān)系string getstonum(); /返回門店編號int getstaffnum(); /返回員工數(shù)量int getfloornum(); /返回負(fù)責(zé)樓盤數(shù)量;/store類函數(shù)的實(shí)現(xiàn)store:store(string sn,int st,int fl)stonum=sn;staffnum=st;floornum=fl;void store:input()coutstonum;coutendl;coutstaffnum;coutendl;coutfloornum;coutendl;bool store:operator(store ob)consti
14、f(stonumob.stonum)return true;elsereturn false;string store:getstonum()return stonum;int store:getstaffnum()return staffnum;int store:getfloornum()return floornum;class client /定義客戶類protected:string name; /客戶姓名string number; /客戶編號char sex; /客戶性別string tel; /客戶電話int type; /客戶類別public:client(string na
15、,string nu,char se,string te,int ty); /構(gòu)造函數(shù)void input(); /輸入客戶信息bool client:operator(client ob)const; /重載運(yùn)算,set容器要求元素之間滿足該關(guān)系string getname(); /返回客戶姓名string getnumber(); /返回客戶編號char getsex(); /返回客戶性別string gettel(); /返回客戶電話int gettype(); /返回客戶類型;/client類函數(shù)實(shí)現(xiàn)client:client(string na,string nu,char se,s
16、tring te,int ty)name=na;number=nu;sex=se;tel=te;type=ty;void client:input()coutname;coutnumber;coutsex;couttel;couttype;bool client:operator(client ob)constif(numberob.number)return true;elsereturn false;string client:getname()return name;string client:getnumber()return number;char client:getsex()re
17、turn sex;string client:gettel()return tel;int client:gettype()return type;class adminprotected:set fl; /floor類數(shù)據(jù)集set sta; /staff類數(shù)據(jù)集set sto; /store類數(shù)據(jù)集set cl; /client類數(shù)據(jù)集 public:admin(); /構(gòu)造函數(shù)void readfloor(); /讀取樓盤文件void readstaff(); /讀取員工文件void readstore(); /讀取門店文件void readclient(); /讀取客戶文件void sh
18、owfloorinfo(); /顯示所有樓盤信息void showstaffinfo(); /顯示所有員工信息void addfloor(); /添加樓盤信息void addstaff(); /添加員工信息void showstoreinfo(); /顯示所有門店信息void addstore(); /添加門店信息void showclientinfo(); /顯示所有客戶信息void addclient(); /添加客戶信息void hirerise(); /按租金升序顯示所有樓盤信息void hirefall(); /按租金降序顯示所有樓盤信息void buyrise(); /按售金升序顯
19、示所有樓盤信息void buyfall(); /按售金降序顯示所有樓盤信息void sellsta(); /某段時(shí)間內(nèi)銷售及傭金收入統(tǒng)計(jì)void clientsta(); /客戶信息統(tǒng)計(jì)void savefloor(); /樓盤信息存檔void savestaff(); /員工信息存檔void savestore(); /門店信息存檔void saveclient(); /客戶信息存檔;admin:admin() /定義對象的同時(shí)讀取文件readfloor();readstaff();readstore();readclient();void admin:readfloor()ifstream
20、 in(c:floorinfo.txt);if(!in)coutcannot open the file:floorinfo.txtn;return ;string num;double size;double hire;double buy;bool state;int y;int m;int d;set:iterator p=fl.begin();innumsizehirebuystateymd;while(!in.eof()floor ob(num,size,hire,buy,state,y,m,d);fl.insert(ob);innumsizehirebuystateymd;in.c
21、lose();return;void admin:readstaff()ifstream in(c:staffinfo.txt);if(!in)coutcannot open the file:staffinfo.txtn;return ;string number;string name;char sex;string tel;double commission;set:iterator p=sta.begin();innumbernamesextelcommission;while(!in.eof()staff ob(number,name,sex,tel,commission);sta.
22、insert(ob);innumbernamesextelcommission;in.close();return;void admin:readstore()ifstream in(c:storeinfo.txt);if(!in)coutcannot open the file:storeinfo.txtn;return ;string stonum; int staffnum; int floornum;set:iterator p=sto.begin();instonumstaffnumfloornum;while(!in.eof()store ob(stonum,staffnum,fl
23、oornum);sto.insert(ob);instonumstaffnumfloornum;in.close();return;void admin:readclient()ifstream in(c:clientinfo.txt);if(!in)coutcannot open the file:clientinfo.txtn;return ;string name; string number; char sex; string tel; int type;set:iterator p=cl.begin();innumbernamesexteltype;while(!in.eof()cl
24、ient ob(name,number,sex,tel,type);cl.insert(ob);innumbernamesexteltype;in.close();return;void admin:showfloorinfo()system(cls);cout樓盤編號 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(tài) 租出/售出日期n;set:iterator p=fl.begin();while(p!=fl.end()cout getnum()t getsize()t gethire()t getbuy()getstate()cout售t ;elsecoutgetda();coutbi.getyea
25、r()-bi.getmonth()-bi.getday()endl;p+;void admin:showstaffinfo()system(cls);cout員工編號t員工姓名t員工性別t員工電話t員工工資n;set:iterator p=sta.begin();while(p!=sta.end()cout getnumber()ttgetname()getsex()=f)cout男tt;elsecout女tt;coutgettel()t getcommission()n;p+;void admin:showstoreinfo()system(cls);cout門店編號 員工數(shù)量 負(fù)責(zé)樓盤數(shù)量
26、n;set:iterator p=sto.begin();while(p!=sto.end()cout getstonum()t getstaffnum()t getfloornum()endl;p+;void admin:showclientinfo()system(cls);cout客戶編號 客戶姓名 客戶性別 客戶電話 客戶類別n;set:iterator p=cl.begin();while(p!=cl.end()cout getnumber()t getname()getsex()=f)cout男 ;elsecout女 ;coutgettel()gettype()=1)coutget
27、type()=2)coutgettype()=3)cout出租客戶n;elsecout出售客戶n;p+;void admin:addfloor()char ch=n;dofloor ob(1,1,1,1,1,1,1,1);ob.input();fl.insert(ob);cout繼續(xù)輸入?(y/n)ch;while(ch=y);void admin:addstaff()char ch=n;dostaff ob(1,1,1,1,1);ob.input();sta.insert(ob);cout繼續(xù)輸入?(y/n)ch;while(ch=y);void admin:addstore()char c
28、h=n;dostore ob(1,1,1);ob.input();sto.insert(ob);cout繼續(xù)輸入?(y/n)ch;while(ch=y);void admin:addclient()char ch=n;doclient ob(1,1,1,1,1);ob.input();cl.insert(ob);cout繼續(xù)輸入?(y/n)ch;while(ch = y);void admin:hirerise()int count=0;int i;double r=0;system(cls);cout樓盤編號 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(tài) 租出/售出日期n;set:iterator
29、 p=fl.begin();while(p!=fl.end() /count用于樓盤計(jì)數(shù)count=count+1;p+;for(i=0;igethire()min&rgethire() /提取大于上一輪min值的最小租金min=p-gethire();p+;r=min; /r用于記錄min值p=fl.begin();while(p!=fl.end()if(min=p-gethire() /輸出本輪最小租金的樓盤信息cout getnum()t getsize()t gethire()t getbuy()getstate()cout售t ;elsecoutgetda();coutbi.gety
30、ear()-bi.getmonth()-bi.getday()endl;p+;void admin:hirefall()int count=0;int i;system(cls);cout樓盤編號 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(tài) 租出/售出日期n;set:iterator p=fl.begin();while(p!=fl.end()count=count+1;p+;double r=100000000;for(i=0;icount;i+)double max=0;p=fl.begin();while(p!=fl.end()if(maxgethire()&rp-gethire()max=
31、p-gethire();p+;r=max;p=fl.begin();while(p!=fl.end()if(max=p-gethire()cout getnum()t getsize()t gethire()t getbuy()getstate()cout售t ;elsecoutgetda();coutbi.getyear()-bi.getmonth()-bi.getday()endl;p+;void admin:buyrise()int count=0;int i;system(cls);cout樓盤編號 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(tài) 租出/售出日期n;set:iterator p
32、=fl.begin();while(p!=fl.end()count=count+1;p+;double r=0;for(i=0;ip-getbuy()&rgetbuy()min=p-getbuy();p+;r=min;p=fl.begin();while(p!=fl.end()if(min=p-getbuy()cout getnum()t getsize()t gethire()t getbuy()getstate()cout售t ;elsecoutgetda();coutbi.getyear()-bi.getmonth()-bi.getday()endl;p+;void admin:buy
33、fall()int count=0;int i;system(cls);cout樓盤編號 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(tài) 租出/售出日期n;set:iterator p=fl.begin();while(p!=fl.end()count=count+1;p+;double r=100000000;for(i=0;icount;i+)double max=0;p=fl.begin();while(p!=fl.end()if(maxgetbuy()&rp-getbuy()max=p-getbuy();p+;r=max;p=fl.begin();while(p!=fl.end()if(max
34、=p-getbuy()cout getnum()t getsize()t gethire()t getbuy()getstate()cout售t ;elsecoutgetda();coutbi.getyear()-bi.getmonth()-bi.getday()endl;p+;void admin:sellsta()date firstday;firstday.set(1900,1,1); /起始日期默認(rèn)1900年1月1日date finalday;finalday.set(1900,1,1); /截至日期默認(rèn)1900年1月1日double money=0; /傭金計(jì)數(shù)int sc=0; /
35、售樓計(jì)數(shù)int hc=0; /租樓計(jì)數(shù)system(cls);cout查詢起始日期: n;firstday.input();cout查詢截至日期: n;finalday.input();set:iterator p=fl.begin();while(p!=fl.end()if(firstdaygetda()&p-getda()getstate()money=money+p-getbuy();sc=sc+1;elsemoney=money+p-gethire();hc=hc+1;p+;cout查詢時(shí)間段內(nèi)共n;cout售出: scendl;cout租出: hcendl;cout總金額: mone
36、yendl;cout傭金收入(中介費(fèi)3%): money*0.03endl;void admin:clientsta()int qz=0;int qs=0;int cz=0;int cs=0;int all=0;system(cls);set:iterator p=cl.begin();while(p!=cl.end()switch(p-gettype()case 1:qz=qz+1;all=all+1;break;case 2:qs=qs+1;all=all+1;break;case 3:cz=cz+1;all=all+1;break;case 4:cs=cs+1;all=all+1;break;p+;cout求租客戶數(shù)量: qzendl;cout求售客戶數(shù)量: qsendl;cout出租客戶數(shù)量: czendl;cout出售客戶數(shù)量: csendl;cout客戶總數(shù)量: allendl;void admin:savefloor(
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 湘教版地理八年級下冊7.4《長江三角洲區(qū)域的內(nèi)外聯(lián)系》(第2課時(shí))聽課評課記錄
- 北師大版道德與法治七年級下冊9.1《我們身邊的法律》聽課評課記錄
- 湘教版數(shù)學(xué)九年級下冊聽評課記錄:2.3 垂徑定理
- 小學(xué)二年級上冊數(shù)學(xué)口算練習(xí)題人教版新課標(biāo)
- 小學(xué)二年級人教版口算及豎式計(jì)算寒假練習(xí)A4排版
- 小學(xué)二年級加減乘法口算練習(xí)題
- 蘇教版小學(xué)二年級數(shù)學(xué)上冊口算題卡
- 超市連鎖加盟合同范本
- 儲藏室租賃合同范本
- 汽車二級經(jīng)銷商合作協(xié)議書范本
- 高標(biāo)準(zhǔn)農(nóng)田施工組織設(shè)計(jì)(全)
- 宿舍、辦公樓消防應(yīng)急預(yù)案
- 細(xì)胞全能性的課件資料
- 職業(yè)安全健康工作總結(jié)(2篇)
- 14S501-1 球墨鑄鐵單層井蓋及踏步施工
- YB 4022-1991耐火泥漿荷重軟化溫度試驗(yàn)方法(示差-升溫法)
- 水土保持方案中沉沙池的布設(shè)技術(shù)
- 安全生產(chǎn)技術(shù)規(guī)范 第25部分:城鎮(zhèn)天然氣經(jīng)營企業(yè)DB50-T 867.25-2021
- 現(xiàn)代企業(yè)管理 (全套完整課件)
- 走進(jìn)本土項(xiàng)目化設(shè)計(jì)-讀《PBL項(xiàng)目化學(xué)習(xí)設(shè)計(jì)》有感
- 高中語文日積月累23
評論
0/150
提交評論