ImageVerifierCode 换一换
格式:DOC , 页数:28 ,大小:255.04KB ,
资源ID:2993136      下载积分:5 金币
验证码下载
登录下载
邮箱/手机:
验证码: 获取验证码
温馨提示:
支付成功后,系统会自动生成账号(用户名为邮箱或者手机号,密码是验证码),方便下次登录下载和查询订单;
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/2993136.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  
声明  |  会员权益     获赠5币     写作写作

1、填表:    下载求助     索取发票    退款申请
2、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
3、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
4、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
5、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【快乐****生活】。
6、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
7、本文档遇到问题,请及时私信或留言给本站上传会员【快乐****生活】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。

注意事项

本文(客房标准管理系统C语言.doc)为本站上传会员【快乐****生活】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4008-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

客房标准管理系统C语言.doc

1、三峡大学理学院级电子信息科学与技术专业高档语言程序设计课程设计阐明书设计题目: 客房管理系统班级: 1421学号: 142139姓名: 徐晶完毕日期: -11-23目录一、 设计任务(2)二、 需求分析(2)三、 系统模块图(2)四、 模块阐明(3)五、 顾客阐明(18)六、 测试成果 (18)七、 设计小结 (19)八、 参照目录 (19)一、设计任务:客房管理系统实现顾客登记功能,要提供构造体输入操作,实现记录功能,要提供相应记录操作,实现查询功能,要提供查找操作,实现修改功能,要提供修改操作;此外尚有提供键盘式菜单实现功能选取。二、需求分析:1. 总体分析:整个客房管理系统被设计为顾客登

2、记模块,记录模块,查询模块,和修改模块。2. 详细分析:(1) 顾客登记模块 提示顾客输入自身信息以及客房信息,把数据存入Room数组中。(2) 记录模块18设立计数器,顺序遍历ROOM数组来实现,实现对房客数、某一天房客数记录。(3) 查询模块 通过基本查找算法查找Room数组,可以按房间号、价格、房间标记、顾客姓名、居民身份证查询。(4) 修改模块 采用基本查找算法在数组找到要修改数据。三、系统模块图依照需求分析,可以对这个系统设计分为如下几种模块:客户信息管理系统数据输入数据记录数据查询数据修改数据删除四、模块阐明:一种较大C语言程序不外乎由各种函数构成,本程序也并不例外。现就本程序中涉

3、及各个函数代码和功能分别进行阐明。1、 主函数某些:程序:void main() /*主函数*/ int n,w; menu(); do printf(ttPlease choice you number(1-5); scanf(%d,&n); if(n5) w=1,getchar(); else w=0; while(w=1); switch(n) case 1:regist();break; case 2:stati();break; case 3:search();break; case 4:modify();break; case 5:exit(0); void menu () /*菜

4、单函数*/ printf(ttt*客房管理系统*n); puts(nttt (1).登记 n); puts(ttt (2).记录 n); puts(ttt (3).查询 n); puts(ttt (4).修改 n); puts(ttt (5).退出 n); puts(nt*n); void return_confirm(void) printf(n按任意键返回n); getchar(); #include stdio.h #include string.h /在使用中要用到字符串都包括在本文献中#include stdlib.h #include math.h #define NUM 50 s

5、truct Client char Name20; int Sex;/famale 0,male 1; int Age; char ID_card20; /*居民身份证*/ int year; int month; int date; /*住店时间*/; struct Hotel char Room_ID10; /*房间号*/ char Tel10; int Price; /*住房单价*/ int Sign; struct Client Client_list; /*实现两个构造体嵌套*/RoomNUM; 注:menu函数能提供菜单方式选取功能,可以依照顾客需要进入到所想要操作模块中,此外把m

6、enu函数独立出来,可以以便随时对它进行调用,容易返回到系统界面。并用构造体来存储客户信息。2、各功能模块函数某些:(1)输入模块:需求分析 对信息进行输入程序:void regist() /*登记函数*/ void printf_one(int i); void save(int n); void printf_back(); int load(); void printf_face(); int i,n,c; n=load(); do for(i=0;in;i+) if(Roomi.Sign=1) printf(Room%s has been fulln,Roomi.Room_ID); e

7、lse puts(nregister new recordn); printf(n Room%s is empty,Roomi.Room_ID); printf(nplease enter Room%ss information,Roomi.Room_ID); puts(nplease enter customers Namen); scanf(%15s,&Roomi.Client_list.Name); printf(nplease enter Sex and Agen); scanf(%3d %3d,&Roomi.Client_list.Sex,&Room i.Client_list.Ag

8、e); puts(nplease enter customers ID_cardn); scanf(%20s,&Roomi.Client_list.ID_card); printf(nplease enter year and month and daten); scanf(%5d %5d %5d,&Room i.Client_list.year,&Roomi.Client_list.month,&Room i.Client_list.date); Roomi.Sign=1;/把房间标记为已满 printf_face(); printf_one(i); printf(nn Are you su

9、re?nnt1.suret2.cancle and againt3.Back without save bb); scanf(%d,&c); if(c=1) save(n); printf_back(); else if(c!=2) menu(); while(c=2);return_confirm(); int load() FILE *fp; int i; if(fp=fopen(Hotel.txt,r)=NULL) printf(nCannot open filen); exit(0); for(i=0;!feof(fp);i+) fscanf(fp,n%s%s%d%d%s%d%d%s%

10、d%d%dn,&Room i.Room_ID,&Roomi.Tel,&Roomi.Price, &Roomi.Sign,&Roomi.Client_list.Name,&Room i.Client_list.Sex, &Roomi.Client_list.Age,&Room i.Client_list.ID_card, &Roomi.Client_list.year,&Room i.Client_list.month,&Roomi.Client_list.date); fclose(fp); return(i); void printf_one(int i) printf(n%-5s %5s

11、%5d %d, Roomi.Room_ID,Roomi.Tel,Room i.Price,Roomi.Sign); printf(n%-s %5d %5d %10s,Roomi.Client_list.Name,Room i.Client_list.Sex,Roomi.Client_list.Age,Roomi.Client_list.ID_card); printf(n%-5d %5d %5dn, Roomi.Client_list.year,Room i.Client_list.month,Roomi.Client_list.date); void save(int n) FILE *fp

12、; int i; if(fp=fopen(Hotel.txt,w)=NULL) printf(nCannot open filen); exit(0); for(i=0;inn1).Time2).Room_ID 3) Price); printf(Which you need?: bb); scanf(%d,&c); if(c3|c3|c1); switch(c) case 1:Time_stati();break; case 2:Room_ID_stati();break; case 3:Price_stati();break; return_confirm(); void Time_sta

13、ti() /*记录入住时间*/ int n,i,k=0,w,w0=1,w2=0; struct Hotel s; n=load(); do do w=-1; puts(nplease enter the time that you want to statistic.n); puts(nplease enter the year:); scanf(%d,&s.Client_list.year); puts(nplease enter the month:); scanf(%d,&s.Client_list.month); puts(nplease enter the date:); scanf

14、(%d,&s.Client_list.date); for(i=0,k=0;in;i+) if(s.Client_list.year=Room i.Client_list.year&s.Client_list.month=Room i.Client_list.month&s.Client_list.date=Roomi.Client_list.date) w=i; printf_face(); printf_one(i); k+; printf(nThere are %d recorders this day!,k); if(w=-1) printf(nNO exist!please. Ent

15、er error!); printf(nThere are no recorders this day!); printf(nDo you want to retry another?nnt1).Yes 2).No and back 3).Back to menu bb); scanf(%d,&w0); if(w0=2) stati(); else if(w0!=1) menu(); else printf(nSuccessful!_ _.nEnter another time?nnt1).Yes 2).Back to menut bb); scanf(%d,&w2); if(w2!=1) m

16、enu(); while(w=-1&w0=1); while(w2=1); void Room_ID_stati() /*记录房间号*/ int n,i,k=0,w,w0=1,w2=0; struct Hotel s; n=load(); do do w=-1; puts(nplease enter the Room_ID that you want to statistic.n); scanf(%s,&s.Room_ID); for(i=0,k=0;in;i+) if(strcmp(s.Room_ID,Roomi.Room_ID)=0) w=i; printf_face(); printf_

17、one(i); k+; printf(nThere are %d recorders in this Room!,k); if(w=-1) printf(nNO exist!please. Enter error!); printf(nThere are no recorders in this Room!); printf(nDo you want to retry another?nnt1).Yes 2).No and back 3).Back to menu bb); scanf(%d,&w0); if(w0=2) stati(); else if(w0!=1) menu(); else

18、 printf(nSuccessful! _ _.nEnter another Room_ID?nnt1).Yes 2).Back to menut bb); scanf(%d,&w2); if(w2!=1) menu(); while(w=-1&w0=1); while(w2=1); void Price_stati() /*记录房间单价*/ int n,i,k=0,w,w0=1,w2=0; struct Hotel s; n=load(); do do w=-1; puts(nplease enter the Rooms price that you want to statistic.n

19、); scanf(%d,&s.Price); for(i=0,k=0;in;i+) if(s.Price=Roomi.Price) w=i; printf_face(); printf_one(i); k+; printf(nThere are %d recorders at this price!,k); if(w=-1) printf(nNO exist!please. Enter error!); printf(nThere are no recorders at this price!); printf(nDo you want to retry another?nnt1).Yes 2

20、).No and back 3).Back to menu bb); scanf(%d,&w0); if(w0=2) stati(); else if(w0!=1) menu(); else printf(nSuccessful!.nEnter another Roomprice?nnt1).Yes 2).Back to menut bb); scanf(%d,&w2); if(w2!=1) menu(); while(w=-1&w0=1); while(w2=1); 本函数功能为输出记录功能菜单选项,涉及依照按性别记录、依照年龄记录及依照入住时间记录。系统依照输入选项执行相应函数。(3)查找

21、模块程序: void search() /*查找函数*/ int i,n,k,w1=1,w2,w3; struct Hotel s; n=load(); do w2=-1; do k=-1; printf(nnEnter ID_card that you want to search!ID_card:); scanf(%s,&s.Client_list.ID_card); for(i=0;in;i+) if(strcmp(s.Client_list.ID_card,Room i.Client_list.ID_card)=0) k=i; w2=1; printf_one(k); break; i

22、f(k=-1) printf(nnNo exit!Please.); printf(nnAre you again ?nt1).again 2).No and back bb); scanf(%d,&w1); if(w1!=1) menu(); while(k=-1&w1=1); if(w2=1) printf(nnSuccessful._.n); printf(nWhat do you want to do?nt1).Search another 2).Back to menu bb); scanf(%d,&w3); if(w3!=1) menu(); while(w3=1); 本函数功能为

23、输出查询功能菜单选项,涉及依照房间号查询、依照姓名查询及依照性别查询。系统依照输入选项执行相应函数。(4)修改模块需求分析 该模块功能是插入客户记录信息并且不能覆盖原有客户信息。程序:void modify() /*修改函数*/ int modify_date(int i,int k); struct Hotel s; int i,n,k,w0=1,w1,w2=0; n=load(); do k=-1; printf_face(); for(i=0;in;i+) if(i!=0)&(i%4)=0) printf(nnRemember Room_ID that you need to modif

24、y!Pass any key to continue .); getchar(); puts(nn); printf_one(i); do printf(nnEnter Room_ID that you want to modify!Room_ID:); scanf(%s,s.Room_ID); for(i=0;inn 1).Name 2).Sex 3).Agen 4).ID_card 5).Time 6).All data 7).Cancle and back); printf(Which you need?: bb); scanf(%d,&c); if(c7|c7|c1); do swit

25、ch(c) case1:printf(Please enter new Name:);scanf(% s,&Roomi.Client_list.Name);break; case 2:printf(Please enter new Sex:);scanf(% d,&Roomi.Client_list.Sex);break; case 3:printf(Please enter new Age:);scanf(% d,&Roomi.Client_list.Age);break; case4:printf(PleaseenternewID_card:);scanf(%s,&Roomi.Client

26、_list.ID_card);break; case5:printf(Pleaseenternewyearmonthdate:);scanf(%d%d%d,&Roomi.Client_list.year,&Roomi.Client_list.month,&Room i.Client_list.date);break; case 6:printf(Please enter new All data:); puts(nplease enter customers new Namen); scanf(%15s,&Roomi.Client_list.Name); printf(nplease enter new Sex and Agen); scanf(%3d %3d,&Roomi.Client_list.Se

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服