房屋中介管理系统简易源代码Word格式文档下载.docx
- 文档编号:1080073
- 上传时间:2023-04-30
- 格式:DOCX
- 页数:14
- 大小:47.55KB
房屋中介管理系统简易源代码Word格式文档下载.docx
《房屋中介管理系统简易源代码Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《房屋中介管理系统简易源代码Word格式文档下载.docx(14页珍藏版)》请在冰点文库上搜索。
>
n;
输入密码"
p;
ifstreaminput;
input.open("
logoinfo.txt"
);
while(!
input.eof())
{input>
name>
password;
if(name==n&
&
p==password)
i=1;
}if(n==name)j=1;
input.close();
if(j==0)
用户不存在,请先注册!
returni;
//i值为1表示登录成功;
为0时表示登录失败}voidLogo:
reg()//
ofstreamoutput;
output.open("
ios:
out|ios:
app);
cout<
输入你的姓名:
"
cin>
name;
输入密码(有效位数8-16)"
while(password.size()<
8||password.size()>
16)
密码无效,请重新输入"
}output<
name<
'
'
password<
output.close();
注册成功"
}
voidLogo:
print()
setw(40)<
欢迎使用房屋中介管理系统"
请选择操作:
\t\t\t1、用户登录"
\t\t\t2、用户注册"
//
(2)房屋信息管理模块:
房屋信息的增、删、改、查。
积),equip(房屋
//类House,name(物业名称),place(地段),type(户型),direction(朝向),area(面
设施),price(价格),
//使用文件“houseinfo.txt”,"
hsize.txt"
classHouse
{private:
stringname,place,type,direction,equip;
floatarea,price;
stringgetname1()
{returnHouse:
voidset(stringn,stringp,stringt,stringd,stringe,floata,floatpr){
name=n;
place=p;
type=t;
direction=d;
equip=e;
area=a;
price=pr;
voidprint()
fstreaminout;
inout.open("
houseinfo.txt"
equip<
inout<
place<
type<
direction<
area<
price<
inout.close();
fstreamisize;
isize.open("
in);
isize>
hsize;
isize.close();
//对文件hsize.txt操作,读出房屋的信息条数;
inout.open("
输入物业名称:
输入房屋地段:
place;
输入房屋户型:
type;
输入房屋朝向:
direction;
输入房屋设施:
equip;
输入房屋面积:
area;
输入房屋价格:
price;
inout<
inout.close();
hsize++;
fstreamosize;
osize.open("
out);
osize<
osize.close();
//对文件hsize.txt操作,写入新的房屋的信息条数
房屋信息更新完成。
voidHouse:
del()
stringisname;
输入你需要删除的物业名字:
isname;
House*a=newHouse[hsize];
inti=0,flag=0;
while(!
input>
place>
type>
direction>
equip>
area>
if(name==isname)
flag++;
//flag记录要删除房屋的个数
continue;
else
a[i].set(name,place,type,direction,equip,area,price);
i++;
input.close();
output.open("
for(i=0;
i<
hsize-flag;
i++)a[i].print();
output.close();
alter()
输入你需要更新的物业名字即"
House:
del();
输入更新后房屋信息"
House:
add();
select()
stringhname;
输入你要查询的物业名称"
hname;
inout.eof())
{inout>
if(name==hname)
物业名称"
房屋地段"
房屋户型"
房屋
房屋朝向"
房屋设施"
面积"
房屋价格"
elsecontinue;
}inout.close();
//(3)顾客管理模块,顾客信息的增、删、改、查。
//类Customercname(顾客姓名),tel(联系方式),
//使用文件“coustomerinfo.txt”,"
csize.txt"
classCustomer
stringcname,tel;
stringgetname2()
{returnCustomer:
cname;
}unsignedlongcsize;
voidadd();
//增加一条客户信息
voiddel();
//删除一条客户信息
voidalter();
//修改一条客户记录
voidselect();
//查找客户信息
voidset(stringcn,stringte)
{cname=cn;
tel=te;
customerinfo.txt"
cname<
tel<
voidCustomer:
add()//仅特殊用户能增加操作
csize;
//对文件csize.txt操作,读出客户的信息条数;
输入客户名称:
输入客户联系方式:
tel;
inout.close();
csize++;
//对文件csize.txt操作,写入新的客户的信息条数
客户信息更新完成。
输入你需要删除的客户名字:
Customer*b=newCustomer[csize];
cname>
if(cname==isname)
//flag记录要删除客户的个数
b[i].set(cname,tel);
for(i=0;
csize-flag;
i++)
b[i].print();
output.close();
输入你需要更新的客户名字即"
Customer:
输入更新后客户信息"
stringfind;
输入你要查询的客户名称"
find;
inout>
if(cname==find)
客户姓名"
客户联系方式"
//(4)统计模块tj类,size统计数classtj
intsize;
voidhsum()//统计房屋总数
{fstreaminput;
input.open("
input>
size;
input.close();
房屋总数为:
size<
voidcsum()//统计顾客总数
customer.txt"
顾客的总数为:
intmain()
登录管理提示cin>
flag1;
Logocustomer;
inti,flag1,flag2,flag3,flag4,flag5,flag6,flag7;
customer.print();
//if(flag1==1)
flag2=customer.in();
〃用户登录
while(flag2==0)
您登录失败。
退出
coutvv"
\t\t\t
系统"
\t\t\t3f一一
其他数字重新登录"
endl;
\t\t\t亠
请选择:
>
i;
if(i==3)
return0;
}
elseif(flag仁=2)
customer.reg();
//新用户注册
你将退出系统,如需其他操作请重新登录系统"
vvendl;
else{
输入有误"
system("
cls"
恭喜您登录成功!
coutvvsetw(40)vv"
(主菜单)请选择操作类型:
vvendl;
coutvv"
\t\t\t1表示房屋信/客户息查询;
\t\t\t2表示房屋/顾客信息
进行增删改;
\t\t\t3表示进行相关信息统计"
flag3;
switch(flag3)
case1:
欢迎进入信息查询系统"
输入查询的方面:
\t\t\t1表示房屋"
\t\t\t2表示顾客"
flag4;
if(flag4==1)
HouseH;
H.select();
elseif(flag4==2)
CustomerC;
C.select();
elsecout<
输入错误!
break;
case2:
setw(35)<
选择操作:
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 房屋中介 管理 系统 简易 源代码