1、java酒店管理毕业设计源代码共101页酒店管理系统C+源代码-仅供参考学习,切勿用于任何商业用途# include # include # include # include # include # include # include # include # include /*/*/ CLASS NAME : MENU/ DETAILS 一 需求分析 (1)顾客 1 查看房间信息(空房号,等级,床位数) 2 入住(房号,姓名,身份证) 3 退房(结账) (2) 管理员 1 查看房间信息(空房号,房间状态,等级,床位数) 2 入住(房号,改变房间状态,登记人) 3 退房(结账,登记人) 二
2、实体 1 房间: 号码 c_room 等级 c_dank 床数 c_nbed 状态 c_statds 价格 c_rate 2 顾客: 身份证 id 人数 m 要求等级 r 入住房间 room /这个时候不知道是设计类还是功能模块三 程序流程1. 管理员登陆 2. 选择功能 1. 登记入住 void check_in();2. 退房 void check_out(); 3. 定房 void book();4. 订房 3. 管理员退出 四 功能模块 1 顾客模块 1)登记入住 1 输入人数m和房间等级要求r 2 按r搜索空房 再按m搜索 3 如果有符合条件的显示 4 如果没有则给出优化方案 5 选
3、择房间 6 给出每个人每天要付的费用dayrent 7 登记个人信息 8 改变房间状态 2)退房 1 计算每人应付费用和总共费用 2 改变房间状态 3)订房 1 输入人数m 房间等级要求r 2 按r搜索空房 再按m搜索 3 如果有符合条件的显示 4 如果没有则给出优化方案 5 选择房间 2 管理员模块 1)登录系统 1 输入用户名和密码 2 检验密码 3 通过重新输入 2)登记入住(同上) 3)退房(同上) 4)订房(同上) 5)房间信息管理 1 显示空房及对应的等级空房 2 显示已订房号码及开始入住日期 : IT CONTROLS OVER ALL THE FUNCTIONS/*class
4、menu public : void main_menu(void); void startup(void); void box(void); void line_hor(int, int, int, char); void line_ver(int, int, int, char);/*/ CLASS NAME : HKEEP/ DETAILS : IT CONTROLS OVER ALL FUNCTIONS/ RELATED TO HKEEP/*class hkeep public : hkeep(void); hkeep(void); void add(void); void modif
5、y(void); void deletion(void); void display_list(void); private : void display_record(int); int found_record(int); void delete_record(int); void modify_record(int); int recordno(int); int last_code(void); int code; char name20,roomno10,order99;/*/ CLASS NAME : MENU/ FUNCTION NAME : LINE_HOR/ DETAILS
6、: IT ACCEPTS THE ROWS AND COLUMNS AND/ DRAWS HORIZONTAL LINES/*void menu : line_hor(int column1, int column2, int row, char c) for(column1;column1=column2;column1+) /gotoxy(column1,row); coutc; /*/ CLASS NAME : MENU/ FUNCTION NAME : LINE_VER/ DETAILS : IT ACCEPTS ROWS AND COLUMNS AND/ DRAWS THE VERT
7、ICAL LINE/*void menu : line_ver(int row1, int row2, int column, char c) for(row1;row1=row2;row1+) gotoxy(column, row1); cout c; /*/ CLASS NAME :MENU/ FUNCTION NAME : STARTUP/ DETAILS : IT CREATES THE STARTING SCREEN/*void menu : startup(void)/ clrscr(); int i,j,s; char a = H*O*T*E*L; char b = M*A*N*
8、A*G*E*M*E*N*T; for(i=0;i=79;i+) line_ver(1,25,i,179);/ gotoxy(1,11);clreol(); gotoxy(1,13);clreol(); j = 63; s = 100; for(i=1;i=43;i+) sound(s); s = s+20; delay(50); gotoxy(1,12); clreol(); gotoxy(i,12); coutb; gotoxy(j,12); couta; j-; gotoxy(1,1); / nosound(); delay(100); char ch = 219; s = 500; fo
9、r(i=0;i=79;i+) sound(s); s =s+10; gotoxy(i,10); cout=1;i-) sound(s); s = s- 10; gotoxy(i,14); coutch; delay(5); nosound(); delay(1000); clrscr(); coutnnnnnnnnnnnttttProject made by :; char jklf=ABCDEF; coutnntttttt; for(int u=0;u7;u+) coutjklf; delay(80); char jklf1= GHIJK :; coutntttttt; for(int v=
10、0;v7;v+) coutjklf1v; delay(80); char jklf2=; coutntttttt; for(int w=0;w5;w+) coutjklf2w; delay(80); delay(1100); /*/ CLASS NAME : MENU/ FUNCTION NAME: BOX/ DETAILS : IT CREATS BOX FOR THE MENU/*void menu : box(void) /line_hor(2,39,1,219); line_hor(2,39,24,219); line_ver(1,24,2,219); line_ver(1,24,39
11、,219);/*/ CLASS NAME : MENU/ FUNCTION NAME : MAIN_MENU/ DETAILS : IT CREATES MENU AND CONTROLS OTHER/ FUNCTION/*void menu : main_menu(void) char ch; while (1) clrscr(); textmode(C40); clrscr(); box(); gotoxy(12,5); coutHouse Keeping ; gotoxy(12,6); cout-; gotoxy(12,10); cout 1 : Store Customer Order
12、; gotoxy(12,11); cout 2 : Display customer Order; gotoxy(12,12); cout 3 : Delete Order; gotoxy(12,13); cout 4 : Modify Order; gotoxy(12,14); cout 0 : Quit; gotoxy(11,18); cout Enter your choice; ch = getch(); textmode(C80); clrscr(); if ( ch = 1) hkeep d; d.add(); else if ( ch = 2) hkeep d; d.displa
13、y_list(); else if ( ch = 3) hkeep d; d.deletion(); else if( ch = 4) hkeep d; d.modify(); else if(ch = 0) break; /*/ CLASS NAME :HKEEP/ FUNCTION NAME : HKEEP (CONSTRUCTOR)/ DETAILS : IT IS A CONSTRUCTOR FUNCTION, GIVING/ DEFAULT VALUES/*hkeep : hkeep (void) code = 0; name0 = 0; roomno0 = 0; order0 =
14、0;/*/ CLASS NAME : HKEEP/ FUNCTION NAME : HKEEP (DESTRUCTOR)/ DETAILS : IT IS A DESTRUCTOR FUNCTION/*hkeep : hkeep (void)/*/ CLASS NAME : HKEEP/ FUNCTION NAME : DISPLAY_LIST/ DETAILS : IT DISPLAYS LIST OF THE PERSONS/ RECORDS/*void hkeep: display_list(void) clrscr(); menu m; char *t_name, *t1_name =
15、 NULL; gotoxy(3,5); cout Enter the character(s) for selective list ; gotoxy(3,6); cout or press for whole list or 0 to exit : ; gets(t_name); if (t_name0 = 0) return; int len = strlen(t_name); clrscr(); fstream file; file.open(HKFILE.IMR, ios : binary | ios : in); file.seekg(0, ios : beg); int row =
16、 4; int found = 0; int pageno = 1; int flag = 1; char ch; gotoxy(1,2); cout Order Serial No.; m.line_hor(1,79,3,196); m.line_hor(1,79,24,196); while (file.read(char *)this , sizeof (hkeep) flag = 1; for(int i=0;ilen;i+) t1_name = name; t1_namelen = 0; if(strcmpi(t_name, t1_name) = 0) delay(200); found = 1; gotoxy(1,row); coutcode; gotoxy(7,row);
copyright@ 2008-2023 冰点文库 网站版权所有
经营许可证编号:鄂ICP备19020893号-2