c程序设计房屋租售管理系统.docx

上传人:b****5 文档编号:4254492 上传时间:2022-11-28 格式:DOCX 页数:40 大小:57.43KB
下载 相关 举报
c程序设计房屋租售管理系统.docx_第1页
第1页 / 共40页
c程序设计房屋租售管理系统.docx_第2页
第2页 / 共40页
c程序设计房屋租售管理系统.docx_第3页
第3页 / 共40页
c程序设计房屋租售管理系统.docx_第4页
第4页 / 共40页
c程序设计房屋租售管理系统.docx_第5页
第5页 / 共40页
点击查看更多>>
下载资源
资源描述

c程序设计房屋租售管理系统.docx

《c程序设计房屋租售管理系统.docx》由会员分享,可在线阅读,更多相关《c程序设计房屋租售管理系统.docx(40页珍藏版)》请在冰豆网上搜索。

c程序设计房屋租售管理系统.docx

c程序设计房屋租售管理系统

程序设计报告

(2012/2013学年第一学期)

题目:

房屋租售管理系统

专业

学生姓名

班级学号

指导教师

指导单位

日期

评分细则

评分项

优秀

良好

中等

遵守机房规章制度

上机时的表现

学习态度

程序准备情况

程序设计能力

团队合作精神

课题功能实现情况

算法设计合理性

用户界面设计

报告书写认真程度

内容详实程度

文字表达熟练程度

回答问题准确度

简短评语

教师签名:

年月日

评分等级

备注

评分等级有五种:

优秀、良好、中等、及格、不及格

房屋租售管理系统

一、课题内容和要求

该系统要求建立某房屋租售中介管理系统,并实现输入口令进入系统、基础信息建立、客户统计、房源排序、销售业绩及佣金收入统计、相关文件存盘功能。

通过此课题,熟练掌握文件、数组、指针的各种操作,以及一些算法思想的应用。

二、需求分析

模块一:

基础信息管理,该模块实现员工、楼盘及门店信息的查看与建立;

模块二:

客户管理,该模块实现客户信息的建立、查看与各类客户数量统计;

模块三:

房源查看,该模块实现房源信息按租金升序、售金升序、租金降序、售金降序显示;

模块四:

统计分析,该模块实现某一指定时间段内销售情况及佣金收入统计;

模块五:

保存文件,该模块实现各类相关文件的保存;

模块六:

退出系统,该模块实现本系统的退出;

三、概要设计

N

Y

123450

1.基础信息管理:

包括楼盘信息查询、员工信息查询、门店信息查询、楼盘信息建立、员工信息建立、门店信息建立、返回上级菜单几项功能;

2.客户管理:

包括客户信息查询、客户信息建立、客户数量统计及返回上级菜单几项功能;

3.房源查看:

包括按租金升序显示房源信息、按租金降序显示房源信息、按售金升序显示房源信息、按售金降序显示房源信息及返回上级菜单几项功能;

4.统计分析:

包括销售情况及佣金收入统计及返回上级菜单几项功能;

5.保存文件:

保存所有相关文件;

6.退出系统:

退出房屋租售管理系统。

四、源程序代码

#include

#include

#include

#include

#include

#include

usingnamespacestd;

classDate//定义日期类

{

protected:

intyear;//年

intmonth;//月

intday;//日

public:

voidSet(int,int,int);//设置日期

voidInput();//输入日期

booloperator<(Dateob)const;//重载<运算,实现日期比较

intGetYear();//返回年

intGetMonth();//返回月

intGetDay();//返回日

};

//Date类函数的实现

voidDate:

:

Set(inty,intm,intd)

{

year=y;

month=m;

day=d;

}

voidDate:

:

Input()

{

cout<<"年:

";

cin>>year;

cout<<"月:

";

cin>>month;

cout<<"日:

";

cin>>day;

}

boolDate:

:

operator<(Dateob)const

{

if(year

returntrue;

else

if(year==ob.year)

if(month

returntrue;

else

if(month==ob.month)

if(day

returntrue;

else

returnfalse;

else

returnfalse;

else

returnfalse;

}

intDate:

:

GetYear()

{

returnyear;

}

intDate:

:

GetMonth()

{

returnmonth;

}

intDate:

:

GetDay()

{

returnday;

}

classFloor//定义楼盘类

{

protected:

stringNum;//楼盘编号

doubleSize;//楼盘面积

doubleHire;//楼盘租金

doubleBuy;//楼盘售金

boolState;//楼盘状态(1-售,0-租)

DateDa;//租出/售出日期

public:

Floor(stringnu,doublesi,doublehi,doublebu,boolst,inty,intm,intd);//构造函数

voidInput();//输入单个楼盘信息

booloperator<(Floorob)const;//重载<运算,set容器要求元素之间满足该关系

stringGetNum();//返回楼盘编号

doubleGetSize();//返回楼盘面积

doubleGetHire();//返回楼盘租金

doubleGetBuy();//返回楼盘售金

boolGetState();//返回楼盘状态

DateGetDa();//返回楼盘租出/售出日期

};

//Floor类函数的实现

Floor:

:

Floor(stringnu,doublesi,doublehi,doublebu,boolst,inty,intm,intd)

{

Num=nu;

Size=si;

Hire=hi;

Buy=bu;

State=st;

Da.Set(y,m,d);

}

voidFloor:

:

Input()

{

cout<<"楼盘编号:

";

cin>>Num;

cout<

cout<<"楼盘面积:

";

cin>>Size;

cout<

cout<<"楼盘租金:

";

cin>>Hire;

cout<

cout<<"楼盘售金:

";

cin>>Buy;

cout<

cout<<"楼盘状态(0-租;1-售):

";

cin>>State;

cout<

cout<<"租出/售出日期:

\n";

Da.Input();

}

boolFloor:

:

operator<(Floorob)const

{

if(Num

returntrue;

else

returnfalse;

}

stringFloor:

:

GetNum()

{

returnNum;

}

doubleFloor:

:

GetSize()

{

returnSize;

}

doubleFloor:

:

GetHire()

{

returnHire;

}

doubleFloor:

:

GetBuy()

{

returnBuy;

}

boolFloor:

:

GetState()

{

returnState;

}

DateFloor:

:

GetDa()

{

returnDa;

}

classStaff//定义员工类

{

protected:

stringNumber;//员工编号

stringName;//员工姓名

charSex;//员工性别

stringTel;//员工电话

doubleCommission;//员工工资

public:

Staff(stringnum,stringna,charse,stringte,doubleco);//构造函数

voidInput();//输入员工信息

booloperator<(Staffob)const;//重载<运算,set容器要求元素之间满足该关系

stringGetNumber();//返回员工编号

stringGetName();//返回员工姓名

charGetSex();//返回员工性别

stringGetTel();//返回员工电话

doubleGetCommission();//返回员工工资

};

//Staff类函数的实现

Staff:

:

Staff(stringnum,stringna,charse,stringte,doubleco)

{

Number=num;

Name=na;

Sex=se;

Tel=te;

Commission=co;

}

voidStaff:

:

Input()

{

cout<<"员工姓名:

";

cin>>Name;

cout<<"员工编号:

";

cin>>Number;

cout<<"员工性别(\"f\"或\"m\"):

";

cin>>Sex;

cout<<"员工电话:

";

cin>>Tel;

cout<<"员工工资:

";

cin>>Commission;

}

boolStaff:

:

operator<(Staffob)const

{

if(Number

returntrue;

else

returnfalse;

}

stringStaff:

:

GetNumber()

{

returnNumber;

}

stringStaff:

:

GetName()

{

returnName;

}

charStaff:

:

GetSex()

{

returnSex;

}

stringStaff:

:

GetTel()

{

returnTel;

}

doubleStaff:

:

GetCommission()

{

returnCommission;

}

classStore//定义门店类

{

protected:

stringStoNum;//门店编号

intStaffNum;//员工数量

intFloorNum;//负责楼盘数量

public:

Store(stringsn,intst,intfl);//构造函数

voidInput();//输入门店信息

boolStore:

:

operator<(Storeob)const;//重载<运算,set容器要求元素之间满足该关系

stringGetStoNum();//返回门店编号

intGetStaffNum();//返回员工数量

intGetFloorNum();//返回负责楼盘数量

};

//Store类函数的实现

Store:

:

Store(stringsn,intst,intfl)

{

StoNum=sn;

StaffNum=st;

FloorNum=fl;

}

voidStore:

:

Input()

{

cout<<"门店编号:

";

cin>>StoNum;

cout<

cout<<"员工数量:

";

cin>>StaffNum;

cout<

cout<<"负责楼盘数量:

";

cin>>FloorNum;

cout<

}

boolStore:

:

operator<(Storeob)const

{

if(StoNum

returntrue;

else

returnfalse;

}

stringStore:

:

GetStoNum()

{

returnStoNum;

}

intStore:

:

GetStaffNum()

{

returnStaffNum;

}

intStore:

:

GetFloorNum()

{

returnFloorNum;

}

classClient//定义客户类

{

protected:

stringname;//客户姓名

stringnumber;//客户编号

charsex;//客户性别

stringtel;//客户电话

inttype;//客户类别

public:

Client(stringna,stringnu,charse,stringte,intty);//构造函数

voidInput();//输入客户信息

boolClient:

:

operator<(Clientob)const;//重载<运算,set容器要求元素之间满足该关系

stringGetName();//返回客户姓名

stringGetNumber();//返回客户编号

charGetSex();//返回客户性别

stringGetTel();//返回客户电话

intGetType();//返回客户类型

};

//Client类函数实现

Client:

:

Client(stringna,stringnu,charse,stringte,intty)

{

name=na;

number=nu;

sex=se;

tel=te;

type=ty;

}

voidClient:

:

Input()

{

cout<<"客户姓名:

";

cin>>name;

cout<<"客户编号:

";

cin>>number;

cout<<"客户性别(\"f\"或\"m\"):

";

cin>>sex;

cout<<"客户电话:

";

cin>>tel;

cout<<"客户类型(1-求租客户;2-求售客户;3-出租客户;4-出售客户):

";

cin>>type;

}

boolClient:

:

operator<(Clientob)const

{

if(number

returntrue;

else

returnfalse;

}

stringClient:

:

GetName()

{

returnname;

}

stringClient:

:

GetNumber()

{

returnnumber;

}

charClient:

:

GetSex()

{

returnsex;

}

stringClient:

:

GetTel()

{

returntel;

}

intClient:

:

GetType()

{

returntype;

}

classAdmin

{

protected:

setfl;//Floor类数据集

setsta;//Staff类数据集

setsto;//Store类数据集

setcl;//Client类数据集

public:

Admin();//构造函数

voidReadFloor();//读取楼盘文件

voidReadStaff();//读取员工文件

voidReadStore();//读取门店文件

voidReadClient();//读取客户文件

voidShowFloorInfo();//显示所有楼盘信息

voidShowStaffInfo();//显示所有员工信息

voidAddFloor();//添加楼盘信息

voidAddStaff();//添加员工信息

voidShowStoreInfo();//显示所有门店信息

voidAddStore();//添加门店信息

voidShowClientInfo();//显示所有客户信息

voidAddClient();//添加客户信息

voidHireRise();//按租金升序显示所有楼盘信息

voidHireFall();//按租金降序显示所有楼盘信息

voidBuyRise();//按售金升序显示所有楼盘信息

voidBuyFall();//按售金降序显示所有楼盘信息

voidSellSta();//某段时间内销售及佣金收入统计

voidClientSta();//客户信息统计

voidSaveFloor();//楼盘信息存档

voidSaveStaff();//员工信息存档

voidSaveStore();//门店信息存档

voidSaveClient();//客户信息存档

};

Admin:

:

Admin()//定义对象的同时读取文件

{

ReadFloor();

ReadStaff();

ReadStore();

ReadClient();

}

voidAdmin:

:

ReadFloor()

{

ifstreamin("C:

\\FloorInfo.txt");

if(!

in)

{

cout<<"Cannotopenthefile:

\"FloorInfo.txt\"\n";

return;

}

stringNum;

doubleSize;

doubleHire;

doubleBuy;

boolState;

inty;

intm;

intd;

set:

:

iteratorp=fl.begin();

in>>Num>>Size>>Hire>>Buy>>State>>y>>m>>d;

while(!

in.eof())

{

Floorob(Num,Size,Hire,Buy,State,y,m,d);

fl.insert(ob);

in>>Num>>Size>>Hire>>Buy>>State>>y>>m>>d;

}

in.close();

return;

}

voidAdmin:

:

ReadStaff()

{

ifstreamin("C:

\\StaffInfo.txt");

if(!

in)

{

cout<<"Cannotopenthefile:

\"StaffInfo.txt\"\n";

return;

}

stringNumber;

stringName;

charSex;

stringTel;

doubleCommission;

set:

:

iteratorp=sta.begin();

in>>Number>>Name>>Sex>>Tel>>Commission;

while(!

in.eof())

{

Staffob(Number,Name,Sex,Tel,Commission);

sta.insert(ob);

in>>Number>>Name>>Sex>>Tel>>Commission;

}

in.close();

return;

}

voidAdmin:

:

ReadStore()

{

ifstreamin("C:

\\StoreInfo.txt");

if(!

in)

{

cout<<"Cannotopenthefile:

\"StoreInfo.txt\"\n";

return;

}

stringStoNum;

intStaffNum;

intFloorNum;

set:

:

iteratorp=sto.begin();

in>>StoNum>>StaffNum>>FloorNum;

while(!

in.eof())

{

Storeob(StoNum,StaffNum,FloorNum);

sto.insert(ob);

in>>StoNum>>StaffNum>>FloorNum;

}

in.close();

return;

}

voidAdmin:

:

ReadClient()

{

ifstreamin("C:

\\ClientInfo.txt");

if(!

in)

{

cout<<"Cannotopenthefile:

\"ClientInfo.txt\"\n";

return;

}

stringname;

stringnumber;

charsex;

stringtel;

inttype;

set:

:

iteratorp=cl.begin();

in>>number>>name>>sex>>tel>>type;

while(!

in.eof())

{

Clientob(name,number,sex,tel,type);

cl.insert(ob);

in>>number>>name>>sex>>tel>>type;

}

in.close();

return;

}

voidAdmin:

:

ShowFloorInfo()

{

system("cls");

cout<<"楼盘编号楼盘面积楼盘租金楼盘售金楼盘状态租出/售出日期\n";

set:

:

iteratorp=fl.begin();

while(p!

=fl.end())

{

cout<<""<GetNum()<<"\t"<GetSize()<<"\t"<GetHire()<<"\t"<GetBuy()<<"\t";

if(p->GetState())

cout<<"售\t";

else

cout<<"租\t";

Datebi=p->GetDa();

cout<

p++;

}

}

voidAdmin:

:

ShowStaffInfo()

{

system("cls");

cout<<"员工编号\t员工姓名\t员工性别\t员工电话\t员工工资\n";

set

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 数学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1