![房屋租售管理系統(tǒng)c++程序設(shè)計(jì)1_第1頁(yè)](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頁(yè)](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頁(yè)](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頁(yè)](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頁(yè)](http://file2.renrendoc.com/fileroot_temp3/2021-7/8/28a30583-ac75-4042-994e-2d7edb03e9fd/28a30583-ac75-4042-994e-2d7edb03e9fd5.gif)
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、程序設(shè)計(jì)報(bào)告( 2012 / 2013 學(xué)年 第 一 學(xué)期)題 目: 房屋租售管理系統(tǒng) 專 業(yè) 學(xué) 生 姓 名 班 級(jí) 學(xué) 號(hào) 指 導(dǎo) 教 師 指 導(dǎo) 單 位 日 期 2012.11.02 評(píng) 分 細(xì) 則評(píng)分項(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á)熟練程度回答問(wèn)題準(zhǔn)確度簡(jiǎn) 短 評(píng) 語(yǔ)教師簽名: 年 月 日評(píng)分等級(jí)備注評(píng)分等級(jí)有五種:優(yōu)秀、良好、中等、及格、不及格房屋租售管理系統(tǒng)一、 課題內(nèi)容和要求 該系統(tǒng)要求建立某房屋租售中介管理系統(tǒng),并實(shí)現(xiàn)輸入口令進(jìn)入系統(tǒng)、基礎(chǔ)信息建
2、立、客戶統(tǒng)計(jì)、房源排序、銷售業(yè)績(jī)及傭金收入統(tǒng)計(jì)、相關(guān)文件存盤功能。通過(guò)此課題,熟練掌握文件、數(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ì) 開(kāi)始輸入密碼密碼正確確ny進(jìn)入系統(tǒng)統(tǒng)計(jì)分析保存文件退出系統(tǒng)房源
3、查看客戶管理基礎(chǔ)信息管理123450結(jié)束1.基礎(chǔ)信息管理:包括樓盤信息查詢、員工信息查詢、門店信息查詢、樓盤信息建立、員工信息建立、門店信息建立、返回上級(jí)菜單幾項(xiàng)功能;2.客戶管理:包括客戶信息查詢、客戶信息建立、客戶數(shù)量統(tǒng)計(jì)及返回上級(jí)菜單幾項(xiàng)功能;3.房源查看:包括按租金升序顯示房源信息、按租金降序顯示房源信息、按售金升序顯示房源信息、按售金降序顯示房源信息及返回上級(jí)菜單幾項(xiàng)功能;4.統(tǒng)計(jì)分析:包括銷售情況及傭金收入統(tǒng)計(jì)及返回上級(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; /樓盤編號(hào) 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(); /返回樓盤編號(hào)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;/員工編號(hào) 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(); /返回員工編號(hào)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; /門店編號(hào)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(); /返回門店編號(hào)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; /客戶編號(hào)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(); /返回客戶編號(hào)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() /定義對(duì)象的同時(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樓盤編號(hào) 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(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員工編號(hào)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門店編號(hào) 員工數(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客戶編號(hào) 客戶姓名 客戶性別 客戶電話 客戶類別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樓盤編號(hào) 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(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樓盤編號(hào) 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(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樓盤編號(hào) 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(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樓盤編號(hào) 樓盤面積 樓盤租金 樓盤售金 樓盤狀態(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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年二手車個(gè)體交易策劃合同范本
- 2025年專利權(quán)交換協(xié)議格式
- 2025年個(gè)人信用管理協(xié)議書
- 2025年二手汽車交易未過(guò)戶合同模板
- 2025年農(nóng)資研發(fā)與實(shí)驗(yàn)勞動(dòng)合同
- 2025年體重管理服務(wù)協(xié)議
- 2025年企業(yè)員工住房公積金貸款合同
- 2025年上海市新能源汽車產(chǎn)業(yè)投資合作協(xié)議
- 2025年養(yǎng)殖場(chǎng)租賃協(xié)議正式版本
- 2025年云服務(wù)器租用合同示范
- 安全生產(chǎn)技術(shù)規(guī)范 第25部分:城鎮(zhèn)天然氣經(jīng)營(yíng)企業(yè)DB50-T 867.25-2021
- 現(xiàn)代企業(yè)管理 (全套完整課件)
- 走進(jìn)本土項(xiàng)目化設(shè)計(jì)-讀《PBL項(xiàng)目化學(xué)習(xí)設(shè)計(jì)》有感
- 《網(wǎng)店運(yùn)營(yíng)與管理》整本書電子教案全套教學(xué)教案
- 教師信息技術(shù)能力提升培訓(xùn)課件希沃的課件
- 高端公寓住宅項(xiàng)目營(yíng)銷策劃方案(項(xiàng)目定位 發(fā)展建議)
- 執(zhí)業(yè)獸醫(yī)師聘用協(xié)議(合同)書
- 第1本書出體旅程journeys out of the body精教版2003版
- [英語(yǔ)考試]同等學(xué)力英語(yǔ)新大綱全部詞匯
- 2022年肝動(dòng)脈化療栓塞術(shù)(TACE)
- 形式發(fā)票格式2 INVOICE
評(píng)論
0/150
提交評(píng)論