Professional Documents
Culture Documents
Dev Shukla
Dev Shukla
GHAZIABAD
PROJECT FILE
SESSION 2013-14
HOTEL MANAGEMENT
GURUKUL-THE SCHOOL PROJECT FILE 2013-14 [HOTEL MANAGEMENT] 1
COMPUTER PROJECT
CERTIFICATE
THIS IS TO CERTIFY THAT Dev Shukla And Shubham Mehta.. , CLASS 12th ., GURUKUL THE SCHOOL HAVE COMPLETED THIS PROJECT UNDER THE GUIDANCE OF Mrs. Geetika Pant AND MAYBE CONSIDERED AS A PART OF THE PRACTICAL EXAM CONDUCTED BY CBSE BOARD.
_________________
___________________
GURUKUL-THE SCHOOL PROJECT FILE 2013-14 [HOTEL MANAGEMENT] 2
INTERNAL EXAMINAR
EXTERNAL EXAMINER
ACKNOWLEDGEMENT
THIS PROJECT WOULD NOT HAVE BEEN SUCCESSFULLY COMPLETED WITHOUT THE UNENDING AND CONTINUOUS SUPPORT AND HELP FROM ALL MY TEACHERS, ESPECIALLY GEETIKA MAM. I WOULD ALSO LIKE TO THANK MY PARENTS FOR THEIR LOVE AND ENCOURAGEMENT THROUGHOUT THE MAKING OF THIS PROJECT.
FLOW CHART
MAIN MENU
1 BOOK A ROOM 2
CUSTOMER RECORD
Functions:
FUNCTION
void main_menu(); void add(); void display(); void rooms(); void edit(); int check(int); void modify(int); void delete_rec(int);
FUNCTIONALITY
//to dispay the main menu //to book a room //to display the customer record //to display alloted rooms //to edit the customer record //to check room status //to modify the record //to delete the record
Project code:
class hotel { int room_no; char name[30]; char address[50]; char phone[10];
public: void main_menu(); void add(); void display(); void rooms(); void edit(); int check(int); void modify(int); void delete_rec(int); }; // //Function:1 // //to dispay the main menu //to book a room //to display the customer record //to display alloted rooms //to edit the customer record //to check room status //to modify the record //to delete the record
{ int choice=0; while(choice!=5) { clrscr(); cout<<"\n *************"; cout<<"\n * MAIN MENU *"; cout<<"\n *************"; cout<<"\n1.Book A Room"; cout<<"\n2.Customer Record"; cout<<"\n3.Rooms Allotted"; cout<<"\n4.Edit Record"; cout<<"\n5.Exit"; cout<<"\nEnter Your Choice: "; cin>>choice;
switch(choice) { case 1: break; case 2: display(); break; case 3: rooms(); break; case 4: break; case 5: break; default: GURUKUL-THE SCHOOL PROJECT FILE 2013-14 [HOTEL MANAGEMENT] 9 edit(); add();
{ cout<<"\nWrong choice.....!!!"; cout<<"\nPress any key to continue....!!"; getch(); } } } } // //Function:2 // void hotel::add() { clrscr(); int r,flag; ofstream fout("Record.dat",ios::app);
cout<<"\n Enter Customer Detalis"; cout<<"\n ----------------------"; cout<<"\nRoom no: "; cin>>r; flag=check(r);
room_no=r; cout<<" Name: "; gets(name); cout<<" Address: "; gets(address); cout<<" Phone No: "; gets(phone); fout.write((char*)this,sizeof(hotel)); cout<<"\n Room is booked...!!!"; }
cout<<"\n Press any key to continue.....!!"; getch(); fout.close(); } // //Function:3 // void hotel::display() { clrscr(); ifstream fin("Record.dat",ios::in); int r,flag; cout<<"\n Enter room no: "; cin>>r;
fin.read((char*)this,sizeof(hotel)); if(room_no==r) { clrscr(); cout<<"\n Cusromer Details"; cout<<"\n ----------------"; cout<<"\n\n Room no: "<<room_no; cout<<"\n Name: "<<name; cout<<"\n Address: "<<address; cout<<"\n Phone no: "<<phone; flag=1; break; } }
// //Function:4 // void hotel::rooms() GURUKUL-THE SCHOOL PROJECT FILE 2013-14 [HOTEL MANAGEMENT] 12
while(!fin.eof()) { fin.read((char*)this,sizeof(hotel)); cout<<"\n\n "<<room_no<<"\t\t"<<name; cout<<"\t\t"<<address<<"\t\t"<<phone; } cout<<"\n\n\nPress any key to continue.....!!"; getch(); fin.close(); }
cout<<"\n EDIT MENU"; cout<<"\n ---------"; cout<<"\n\n 1.Modify Customer Record"; cout<<"\n 2.Delete Customer Record";
cout<<"\n Enter your choice: "; cin>>choice; clrscr(); cout<<"\n Enter room no: " ; cin>>r;
break; default: cout<<"\n Wrong Choice.....!!"; } cout<<"\n Press any key to continue....!!!"; getch(); }
// //Function:5 // int hotel::check(int r) { int flag=0; ifstream fin("Record.dat",ios::in); while(!fin.eof()) { fin.read((char*)this,sizeof(hotel)); GURUKUL-THE SCHOOL PROJECT FILE 2013-14 [HOTEL MANAGEMENT] 14
fin.close(); return(flag); }
// //Function:6 // void hotel::modify(int r) { long pos,flag=0; fstream file("Record.dat",ios::in|ios::out|ios::binary); while(!file.eof()) { pos=file.tellg(); file.read((char*)this,sizeof(hotel)); if(room_no==r) { cout<<"\n Enter New Details"; cout<<"\n -----------------"; cout<<"\n Name: "; gets(name); GURUKUL-THE SCHOOL PROJECT FILE 2013-14 [HOTEL MANAGEMENT] 15
if(flag==0) cout<<"\n Sorry Room no. not found or vacant...!!"; file.close(); } // //Function:7 // void hotel::delete_rec(int r) { int flag=0; ifstream fin; fin.seekg(0,ios::beg); fin.tellg(); char ch; fin.read("Record.dat",ios::in); GURUKUL-THE SCHOOL PROJECT FILE 2013-14 [HOTEL MANAGEMENT] 16
ofstream fout("temp.dat",ios::out); while(!fin.eof()) { fin.read((char*)this,sizeof(hotel)); if(room_no==r) { cout<<"\n Name: "<<name; cout<<"\n Address: "<<address; cout<<"\n Pone No: "<<phone; cout<<"\n\n Do you want to delete this record(y/n): "; cin>>ch;
fin.close(); fout.close(); if(flag==0) cout<<"\n Sorry room no. not found or vacant...!!"; else { remove("Record.dat"); rename("temp.dat","Record.dat"); GURUKUL-THE SCHOOL PROJECT FILE 2013-14 [HOTEL MANAGEMENT] 17
} }
// //..Main Function:1.... //
cout<<"\n\n\n\nMade By:"; cout<<"\t DEV SHUKLA & SHUBHAM MEHTA "; cout<<"\n\nSubmitted To:"; cout<<"\tMrs. Geetika Pant"; cout<<"\n\n\n\n\n\n\nPress any key to continue....!!"; getch(); h.main_menu(); }
OUTPUT
ADMIN MENU
MAIN MENU
Book a Room
Customer Record
Room Alloted
Edit Menu
The set of the objectives that the software caters to, are as stated below:
Electronic handling of admission details to enhance the accuracy, flexibility, reliability and to remove the human errors. To permit user to enter in a disciplined, organized and user-interactive environment at random and to permit easy retrieval of any information To provide the accurate information about the room, no of guest ,modified details, on the basis of check in or out to provide online information and deletion of records To provide an efficient, accurate, reliable, fast, and robust structure that can handle any number of new entries.
BIBLIOGRAPHY..
BOOKS:
COMPUTER SCIENCE WITH C++ Class 12 (Saraswati Corp.) TOGETHER WITH COMPUTER SCIENCE WITH C++ Class 12.
HARDWARE REQUIREMENTS:
PROCESSOR HARD DISK DRIVE RAM CACHE Pentium III 500 MHz. 10.2GB 64 MB 512 KB
SOFTWARE:TURBO C++.
REMARKS:.