java酒店管理毕业设计源代码.doc

上传人:李司机 文档编号:1165858 上传时间:2022-07-12 格式:DOC 页数:72 大小:395.50KB
返回 下载 相关 举报
java酒店管理毕业设计源代码.doc_第1页
第1页 / 共72页
java酒店管理毕业设计源代码.doc_第2页
第2页 / 共72页
java酒店管理毕业设计源代码.doc_第3页
第3页 / 共72页
java酒店管理毕业设计源代码.doc_第4页
第4页 / 共72页
java酒店管理毕业设计源代码.doc_第5页
第5页 / 共72页
点击查看更多>>
资源描述

《java酒店管理毕业设计源代码.doc》由会员分享,可在线阅读,更多相关《java酒店管理毕业设计源代码.doc(72页珍藏版)》请在三一办公上搜索。

1、酒店管理系统C+源代码-仅供参考学习,切勿用于任何商业用途# include # include # include # include # include # include # include # include # include /*/*/ CLASS NAME : MENU/ DETAILS 一 需求分析 (1)顾客 1 查看房间信息空房号,等级,床位数 2 入住房号,某某,某某 3 退房结账 (2) 管理员 1 查看房间信息空房号,房间状态,等级,床位数 2 入住房号,改变房间状态,登记人 3 退房结账,登记人 二 实体 1 房间: c_room 等级 c_dank 床数 c_nb

2、ed 状态 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 选择房间 6 给出每个人每天要付的费用dayrent 7 登记个人信息 8

3、改变房间状态 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 menu public : void main_menu(void); void startup(vo

4、id); 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 modify(void); void deletion(void); void display_list(voi

5、d); 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 : IT ACCEPTS THE ROWS AND COLUMNS AND/ DRAWS HORIZO

6、NTAL 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 VERTICAL LINE/*void menu : line_ver(int row1, int row2,

7、 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*A*G*E*M*E*N*T; for(i=0;i=79;i+) line_ver(1,25,i,179

8、);/ 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; for(i=0;i=79;i+) sound(s); s =s+10; gotoxy(i,10); cou

9、t=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=0;v7;v+) coutjklf1v; delay(80); char jklf2=; coutnt

10、ttttt; 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,219);/*/ CLASS NAME : MENU/ FUNCTION NAME : MAIN_M

11、ENU/ 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; gotoxy(12,11); cout 2 : Display customer Order; g

12、otoxy(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.display_list(); else if ( ch = 3) hkeep d; d.deletion();

13、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 = 0;/*/ CLASS NAME : HKEEP/ FUNCTION NAME : HKEEP (DE

14、STRUCTOR)/ 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 = NULL; gotoxy(3,5); cout Enter the character(s) for

15、 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 = 4; int found = 0; int pageno = 1; int flag = 1; ch

16、ar 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); put

17、s(name); gotoxy(27,row); cout Room no. :roomno; gotoxy(27,row+1); cout Order : ; puts(order); if( row = 22) flag = 0; row = 4; gotoxy(66,1); cout Page No. : pageno; pageno+; gotoxy(1,25); cout Press to exit or any key to continue. ; ch = getch(); if(ch = 27) return ; clrscr(); gotoxy(1,2); cout Orde

18、r Serial No.; m.line_hor(1,79,3,196); m.line_hor(1,79,24,196); else row = row + 2; if ( !found ) sound(500); delay(100); nosound(); gotoxy(1,5); coutRecords not found ; if (flag) gotoxy(66,1); coutage No. : pageno; gotoxy(1,25); coutress any key to continue.; getch(); file.close();/*/ CLASS NAME : H

19、KEEP/ FUNCTION NAME : DISPLAY_RECORD/ DETAILS : IT DISPLAYS SINGLE RECORD FOR THE/ GIVEN RECORD/*void hkeep : display_record(int t_code) fstream file; file.open(HKFILE.IMR,ios : binary | ios:in); file.seekg(0,ios:beg); while( file.read(char *) this, sizeof(hkeep) if(t_code = code) gotoxy(3,3); coutO

20、rder serial No.code; gotoxy(3,5); coutName : ; puts(name); gotoxy(3,6); coutRoom No. : roomno; gotoxy(3,7); gotoxy(3,7); coutOrder : ; puts(order); break; file.close();/*/ CLASS NAME : HKEEP/ FUNCTION NAME: LAST_CODE/ DETAILS : IT COUNTS THE RECORD IN THE FILE AND/ RETURNS THE LAST CODE/*int hkeep :

21、 last_code() fstream file; file.open(HKFILE.IMR,ios : binary | ios:in); file.seekg(0,ios:beg); int t=0; while(file.read(char*) this, sizeof(hkeep) t+; file.close(); return t;/*/ CLASS NAME : HKEEP/ FUNCTION NAME : FOUND_RECORD/ DETAILS : IT RETURNS THAT RECORD IS FOUND FOR THE/ GIVEN CODE NO. OR NOT

22、/*int hkeep : found_record(int t_code) fstream file; file.open(HKFILE.IMR, ios : binary | ios : in ); file.seekg(0,ios:beg); int found = 0; while(file.read(char *) this, sizeof(hkeep) if(t_code = code) found+; break; file.close(); return found;/*/ CLASS NAME : HKEEP/ FUNCTION NAME: ADD/ DETAILS : IT

23、 ADDS THE RECORD IN THE HKEEPS FILE/*void hkeep : add(void) menu m; int valid, saved=0 ; int t_code; t_code = last_code(); t_code+; if(t_code = 1) code = t_code; strcpy(name,abc); strcpy(roomno,-); strcpy(order,xyz); fstream file; file.open(HKFILE.IMR, ios : binary | ios : app); file.write(char *)th

24、is, sizeof(hkeep); file.close(); delete_record(t_code); char ch; do clrscr(); gotoxy(3,3); coutOrder serial No.t_code; gotoxy(3,5); coutName : ; gotoxy(3,6); coutRoom no. : ; gotoxy(3,7); gotoxy(3,7); coutOrder : ; m.line_hor(1,79,23,196); do valid = 1; gotoxy(1,25);clreol(); gotoxy(3,25); cout 19 | strlen(name) = 0)

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 毕业设计 > 幼儿教育


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号