1 / 12
文档名称:

酒店管理系统代码.docx

格式:docx   大小:23KB   页数:12页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

酒店管理系统代码.docx

上传人:wz_198614 2019/7/7 文件大小:23 KB

下载得到文件列表

酒店管理系统代码.docx

相关文档

文档介绍

文档介绍:#include<>#include<>#include<>#include<>#include<>//--------------------------------------------------结构定义------------------------------------------typedefstructCheckinInformation{ charname[10];//姓名 intid;//证件号 introomType;//房型 intcountType;//计费方式}CheckinInfo;typedefstructHotelRoom{ introomType;//房型 introomNum;//房号 intchecked;//入住情况 intprice;//房价}Room;typedefstructRoomOrder{ CheckinInfo*checkinInfo;//入住信息 longdate;//入住时间 Room*room;//房间信息}Order;typedefstructHotelInfomation{ intcheckinAmount;//已入住房数 intsingleRemainAmount;//单人房剩余房数 intdoubleRemainAmount;//双人房剩余房数 intbigRemainAmount;//大床房剩余房数}HotelInfo;//--------------------------------枚举类型---------------------------enum{MainUI,HotelInfoUI,CheckinUI,CheckinResultUI,OrderUI,CheckOutUI,Exit};//GUIenum{Single,Double,Big};//RoomTypeenum{Hour,Day};//countType//--------------------------------全局变量--------------------------intGUI=MainUI;Order*orderList[100]; //订单数组Room*roomList[100]; //房间数组HotelInfo*hotelInfo=NULL;//酒店房间信息//-------------------------------函数声明----------------------------voidinitiallizeRoomList();voidinsertToOrderList(Order*order);Room*getRoomByType(introomType);Order*getOrderByRoomNum(introomNum);voidshowMainUI();voidshowHotelInfoUI();voidshowCheckinUI();voidshowCheckinResultUI();voidshowOrderUI();voidshowCheckOutUI();//-------------------------------Main函数----------------------------voidmain()//主函数{ //初始化酒店房间信息 hotelInfo=(HotelInfo*)malloc(sizeof(HotelInfo)); hotelInfo->singleRemainAmount=20; hotelInfo->doubleRemainAmount=40; hotelInfo->bigRemainAmount=40; hotelInfo->checkinAmount=0; //初始化房间列表 initiallizeRoomList(); //界面显示 while(GUI!=Exit) { switch(GUI) { caseMainUI: showMainUI(); break; caseHotelInfoUI: showHotelInfoUI(); break; caseCheckinUI: showCheckinUI(); break; caseCheckinResultUI: showCheckinResultUI(); break; caseOrderUI: showOrderUI(); break; caseCheckOutUI: showCheckOutUI(); break; default: break; } }}//-------------------------------函数定义---------------------------