Professional Documents
Culture Documents
FINAL
FINAL
FINAL
ABSTRACT:
The objective of the project is to design Hotel
Management application which enables the manager to keep the record
of the hotel and the customers. The project has been designed in
C#.NET technology and consists of a SQL server which acts as the
database for the project. My motivation for the project came from my
enthusiasm and strong urge to learn C# and .NET which is one of the
fastest growing technologies in today’s world. The Hotel Management
System project mainly consists of two types of users. The customers
who access the information provided by the website and the
administrator who modifies and updates the information. All the data
needed for the application is stored in the form of tables in the SQL
server 2000. The report contains the details of all the tasks carried out
during the entire software development life cycle of the Hotel
Management Project. This document depicts all the details of the
project.
1
CHAPTER 2:
SYSTEM REQUIREMENTS:
The hardware and software components
of a computer system that are required to install and use software
efficiently. The software manufacturer will list the system requirements
on the software package. If your computer system does not meet the
system requirements then the software may not work correctly after
installation. System requirements for operating systems will be hardware
components, while other application software will list both hardware
and operating system requirements.
HARDWARE REQUIREMENTS:
• RAM : 256mb
SOFTWARE REQUIREMENTS:
2
CHAPTER 3:
PROJECT DESCRIPTION:
Writing a Project Description.
When writing a project description for external funding always thinks of
your audience. All funding agencies have a pages being common. A
quality application is readable, feasible and interesting. Project
descriptions provide the following details to the applicants: the problem
the project will address, a set of goals for the project, the overall
objectives for the project, as well as a project plan that describes the
activities the members will undertake. The project description also
includes the location of the project, the length of the project, and any
benefits you will receive while serving on the project.
LIST OF MODULES :
CREATE RECORD
CHECK STATUS
TO BOOK A ROOM
DELETE CUSTOMER’S RECORD
SEARCH CUSTOMER’S RECORD
3
1. CREATE RECORD : This feature creates a new customer
records. For this the information to be provided are the date of
arrival , no. of person, name, age, address, nationality, days of
staying and choice for AC or NON-AC .
4
MODULES DESCRIPTION:
5
DATA FLOW DIAGRAM:
A Data Flow Diagram (DFD) is a
graphical representation of the “flow” of Student Information System. A
data flow diagram can also be used for the visualization of Data
Processing. It is common practice for a designer to draw a context-level
DFD first which shows the interaction between the system and outside.
6
DATA FLOW DIAGRAM :
7
DATABASE DESIGN:
8
tedr5.Exim
W
C2B1M
uYc4D
sPRntiO
oaA
bN
hpylk
CHAPTER 4:
CODING:
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
#include<stdio.h>
#include<dos.h>
class hotel
{
int room_no;
char name[30];
char address[50];
char phone[10];
public:
void main_menu(); //to dispay the main menu
void add(); //to book a room
void display(); //to display the customer record
void rooms(); //to display alloted rooms
void edit(); //to edit the customer record
9
int check(int); //to check room status
void modify(int); //to modify the record
void delete_rec(int); //to delete the record
};
void hotel::main_menu()
{
int choice;
while(choice!=5)
{
clrscr();
cout<<"\n\t\t\t\t*************";
cout<<"\n\t\t\t\t* MAIN MENU *";
cout<<"\n\t\t\t\t*************";
cout<<"\n\n\n\t\t\t1.Book A Room";
cout<<"\n\t\t\t2.Customer Record";
cout<<"\n\t\t\t3.Rooms Allotted";
cout<<"\n\t\t\t4.Edit Record";
cout<<"\n\t\t\t5.Exit";
cout<<"\n\n\t\t\tEnter Your Choice: ";
cin>>choice;
switch(choice)
10
{
case 1: add();
break;
case 2: display();
break;
case 3: rooms();
break;
case 4: edit();
break;
case 5: break;
default:
{
cout<<"\n\n\t\t\tWrong choice!!!";
cout<<"\n\t\t\tPress any key to continue!!";
getch();
}
}
}
}
void hotel::add()
{
clrscr();
11
int r,flag;
ofstream fout("Record.dat",ios::app);
cout<<"\n Enter Customer Detalis";
cout<<"\n **********************";
cout<<"\n\n Room no: ";
cin>>r;
flag=check(r);
if(flag)
cout<<"\n Sorry..!!!Room is already booked";
else
{
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!!";
12
getch();
fout.close();
}
void hotel::display()
{
clrscr();
ifstream fin("Record.dat",ios::in);
int r,flag;
cout<<"\n Enter room no: ";
cin>>r;
while(!fin.eof())
{
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;
13
flag=1;
break;
}
}
if(flag==0)
cout<<"\n Sorry Room no. not found or vacant!!";
cout<<"\n\n Press any key to continue!!";
getch();
fin.close();
}
void hotel::rooms()
{
clrscr();
ifstream fin("Record.dat",ios::in);
cout<<"\n\t\t\tList Of Rooms Allotted";
cout<<"\n\t\t\t*********************";
cout<<"\n\n Room No.\tName\t\tAddress\t\tPhone No.\n";
while(!fin.eof())
{
fin.read((char*)this,sizeof(hotel));
cout<<"\n\n "<<room_no<<"\t\t"<<name;
cout<<"\t\t"<<address<<"\t\t"<<phone;
14
}
cout<<"\n\n\n\t\t\tPress any key to continue!!";
getch();
fin.close();
}
void hotel::edit()
{
clrscr();
int choice,r;
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;
switch(choice)
{
case 1: modify(r);
break;
15
case 2: delete_rec(r);
break;
default: cout<<"\n Wrong Choice!!";
}
cout<<"\n Press any key to continue!!!";
getch();
}
nt hotel::check(int r)
{
int flag=0;
ifstream fin("Record.dat",ios::in);
while(!fin.eof())
{
fin.read((char*)this,sizeof(hotel));
if(room_no==r)
{
flag=1;
break;
}
}
fin.close();
return(flag);
16
}
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);
cout<<" Address: ";
gets(address);
cout<<" Phone no: ";
gets(phone);
file.seekg(pos);
file.write((char*)this,sizeof(hotel));
cout<<"\n Record is modified!!";
17
flag=1;
break;
}
}
if(flag==0)
cout<<"\n Sorry Room no. not found or vacant!!";
file.close();
}
void hotel::delete_rec(int r)
{
int flag=0;
char ch;
ifstream fin("Record.dat",ios::in);
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;
18
cout<<"\n\n Do you want to delete this record(y/n): ";
cin>>ch;
if(ch=='n')
fout.write((char*)this,sizeof(hotel));
flag=1;
}
else
fout.write((char*)this,sizeof(hotel));
}
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");
}
}
void main()
{
19
hotel h;
textmode(C80);
textbackground(BLACK);
textcolor(WHITE);
clrscr();
cout<<"\n\t\t\t****************************";
cout<<"\n\t\t\t* HOTEL MANAGEMENT PROJECT *";
cout<<"\n\t\t\t****************************";
sleep(2);
cout<<"\n\n\n\n\n\t\t\t\tPress any key to continue!!";
getch();
h.main_menu();
}
20
CHAPTER 5:
TESTING:
Unit Testing is a level of software testing where individual
units/ components of software are tested. The purpose is to validate that
each unit of the software performs as designed.
21
CHAPTER 6:
CONCLUSION:
22
CHAPTER 7:
FUTURE ENHANCEMENT:
23
CHAPTER 8:
SCREESHOTS :
24
25
26
CHAPTER 9:
BIBLIOGRAPHY:
27