欢迎来到天天文库
浏览记录
ID:48667611
大小:43.50 KB
页数:12页
时间:2020-02-27
《酒店管理系统代码.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、#include#include#include#include#include//--------------------------------------------------结构定义------------------------------------------typedefstructCheckinInformation{charname[10];//姓名intid;//证件号introom
2、Type;//房型intcountType;//计费方式}CheckinInfo;typedefstructHotelRoom{introomType;//房型introomNum;//房号intchecked;//入住情况intprice;//房价}Room;typedefstructRoomOrder{CheckinInfo*checkinInfo;//入住信息longdate;//入住时间Room*room;//房间信息}Order;typedefstructHotelInfomation
3、{intcheckinAmount;//已入住房数intsingleRemainAmount;//单人房剩余房数intdoubleRemainAmount;//双人房剩余房数intbigRemainAmount;//大床房剩余房数}HotelInfo;//--------------------------------枚举类型---------------------------enum{MainUI,HotelInfoUI,CheckinUI,CheckinResultUI,OrderUI,C
4、heckOutUI,Exit};//GUIenum{Single,Double,Big};//RoomTypeenum{Hour,Day};//countType//--------------------------------全局变量--------------------------可编辑word,供参考版!intGUI=MainUI;Order*orderList[100];//订单数组Room*roomList[100];//房间数组HotelInfo*hotelInfo=NULL;/
5、/酒店房间信息//-------------------------------函数声明----------------------------voidinitiallizeRoomList();voidinsertToOrderList(Order*order);Room*getRoomByType(introomType);Order*getOrderByRoomNum(introomNum);voidshowMainUI();voidshowHotelInfoUI();voidshowCh
6、eckinUI();voidshowCheckinResultUI();voidshowOrderUI();voidshowCheckOutUI();//-------------------------------Main函数----------------------------voidmain()//主函数{//初始化酒店房间信息hotelInfo=(HotelInfo*)malloc(sizeof(HotelInfo));hotelInfo->singleRemainAmount=20;
7、hotelInfo->doubleRemainAmount=40;hotelInfo->bigRemainAmount=40;hotelInfo->checkinAmount=0;//初始化房间列表initiallizeRoomList();//界面显示while(GUI!=Exit){switch(GUI){caseMainUI:showMainUI();break;caseHotelInfoUI:showHotelInfoUI();break;可编辑word,供参考版!caseCheckin
8、UI:showCheckinUI();break;caseCheckinResultUI:showCheckinResultUI();break;caseOrderUI:showOrderUI();break;caseCheckOutUI:showCheckOutUI();break;default:break;}}}//-------------------------------函数定义----------------------------voidinitiallizeRoomList()
此文档下载收益归作者所有