You are on page 1of 48

HOTEL RESERVATION

SYSTEM
PROJECT REPORT

Team Member:Prabin Gupta

Santosh Kumar

Saurabh Gupta

131341

131366

131367

CSE( B4)

CSE(B4)

CSE(B4)

Project Guide:Mr. Dinesh kumar Verma


Asst. Professor
Department of Computer Science and Engineering

JAYPEE UNIVERSITY OF ENGINEERING & TECHNOLOGY


A-B Road , Raghogarh
Disst.- Guna (M.P) - 473226
INDIA
1

ACKNOWLEDGEMENT
We have taken efforts in this project. However, it would not have been
possible without the kind support and help of many individuals and
organizations. I would like to extend my sincere thanks to all of them.
We are highly indebted to Teachers for their guidance and constant
supervision as well as for providing necessary information regarding the
project & also for their support in completing the project.
We would like to express our gratitude towards our parents & members of
my Project Group for their kind co-operation and encouragement which
help me in completion of this project.
My thanks and appreciations also go to my colleague in developing the
project and people who have willingly helped me out with their abilities

CERTIFICATE
This is to certify that this report of Hotel Reservation System the original work
done by Prabin Gupta, Santosh Kumar and Saurabh Gupta during this project
submission as a partial fulfillment of the requirement for the Software Engineering
Project of B.Tech V Semester, of the Jaypee University Of engineering &
Technology, Guna.

Mr. Dinesh Kumar Verma


Mr. Amit Kumar Srivastava
Faculty
(CSE Department)
JUET, Guna

Table of Contents
Introduction

Software Development Life Cycle Model

Feasibility Study

Requirement Analysis

System Constraints

11

Design Phase

12

Data Flow Diagram

14

Entity-Relationship Diagram

15

Activity Diagram

16

Class Diagram

17

Database Schema

18

Coding and Snapshots

21

Testing

45

Conclusion

48

Bibliography

48

HOTEL RESERVATION SYSTEM 2015

Introduction :

This project on Hotel Reservation System aims to provide a

platform between the hotel and the customers.


With the help of this, customers will be able to directly make

reservations and book a room of their choice.


Customers will be provided with a GUI for the same.
Customers will be provided with a unique account too.
Also, there will be a separate panel for the admin ( i.e. Hotel

Manager, etc.) to change the database using a GUI.


Existing System :-

This existing system is not providing secure registration and profile management of all
the users properly.
This manual system gives us very less security for saving data and some data may be
lost due to mismanagement.

Proposed System :The development of this new system contains the following

activities, which try to automate the entire process keeping in the view of
database integration approach.
This system maintains users personal info, address, and contact details.
User friendliness is provided in the application with various controls provided by system
rich user interface.
This system makes the overall project management much easier and flexible.

HOTEL RESERVATION SYSTEM 2015


Various classes have been used for maintaining the details of all the users and catalog.
5

Authentication is provided for this application. Only registered users can access.
This system is providing accessibility control to data with respect to users.
Purpose :The purpose of this document is to present a detailed Hotel Reservation
System. It will explain the different functional as well as non functional
requirements of the system, the interfaces of the system, what the system will
do or how the system will interact with the external users, the constraints under
which it will operate. This Software Requirement Specification document will
provide a clear understanding of what is expected by the client in the proposed
Hotel Reservation System.

Software Development Life Cycle Model :Rapid Prototyping Life Cycle Model :Rapid prototyping is a revolutionary and powerful technology with wide range of
applications .The process of prototyping .The process of prototyping involves quick building up of a
prototype or working model for the purpose of testing the various design features, ideas, concepts,
functionality, Output and performance.

HOTEL RESERVATION SYSTEM 2015


Rapid prototyping refers to the creation of the model that will eventually be discarded rather than
becoming a part of the final delivered software.

Advantage of the Rapid Prototyping Model:

Increasing number of variants of products.

Increasing product complexity.

Decreasing product lifetime before obsolescence.

Decreasing delivery time.

To increase effective communication.


To minimize sustaining engineering changes

HOTEL RESERVATION SYSTEM 2015


Feasibility Study :-

Feasibility is a measure of how beneficial the development of the information system will be to
an organization. This is done by investigating the existing system in the area under investigation
or generally ideas about a new system. It is a test of a system proposal according to its
workability, impact on the organization, ability to meet user needs, and effective use of
7

resources.Three key considerations are involved in the feasibility analysis: economic,


technical, and legal.
Cost: The cost required in the proposed system is comparatively less to the existingsystem.
Effort: Compared to the existing system the proposed system will provide a better working
environment in which there will be ease of work and the effort required will be comparatively
less than the existing system.
Time: Also the time required generating a report or for doing any other work will be
comparatively very less than in the existing system. Record finding and updating will take less
time than the existing system.
Labor: In the existing system the number of staff required for completing the work is more
while the new system will require quite less number of staff.
Requirement Analysis :-

Specific Requirements:Since the Administrator and the student/user are the main target group of our software, we will
only concern about some important functions for the admin and the user.

HOTEL RESERVATION SYSTEM 2015

Administrator: The administrator is the one who manipulates and maintains the system. He can enter into
the system by entering login name and password.
Again, he can add hotels to the database.
Add new user to the database and issue a valid ID for the user.
8

He is also responsible for sending the response to the email id provided by the user at the
start of his registration.

Customers/Users: Can do the member registration


After the registration, he will be issued with valid ID by the Administrator. The user can
log into the system with this ID.
After successfully login into the system, the user moves to the instruction web page where
he will get instruction about the booking process.
Then after clicking the booking button the reservation procedure starts. In this manner, the
user can take up the booking details immediately.
Software Requirements: Web Technologies : JSP & Servlet
Language: Java
Database: MySQL
Web Server: Apache Tomcat 7.0
IDE: Net beans 8.0.2
Operating System: Windows XP

HOTEL RESERVATION SYSTEM 2015


Hardware Requirements:

Multi-core 64 bit processor


Ram 512 MB.
One Physical network port.
Display- 1024x768

External Interface Requirements :It include the following interfaces


9

User Interfaces
Software Interfaces
Hardware Interfaces

User Interfaces:The interface must be easy to understand. The user interface includes: Screen formats/organization: The introductory screen will be the first to be displayed
which will allow the users to do the member registration.
Window format/organization: When the user chooses some other option, then the
information pertaining to that choice will be displayed in a new window which ensures
multiple windows to be visible on the screen and the users can switch between them.
Data format: The data entered by the users will be alpha numeric.
End messages: When there are some exceptions raising error like entering invalid
details, then error messages will be displayed prompting the users to re-enter the details.

HOTEL RESERVATION SYSTEM 2015


Hardware Interfaces: Server side hardware
Hardware recommended by all the software needed.
Communication hardware to serve client requests

Client side hardware


Hardware recommended by respective clients operating system
and web browser.
Communication hardware to communicate the server.
10

System Constraints :-

System Constraints restrict options of design, behavior, appearance or operation. They become
requirements due to factors outside the normal problem domain. System Constraints describe
how the product operates inside various circumstances and limit the options designers have if
building the product. This section specifies design constraints imposed by other standards,
hardware limitations, communication interface limitations, etc. There are a number of attributes
of software that can serve as requirements.
User Interface Constraints
Using this system is fairly simple and intuitive. A user familiar with basic navigation skills
should be able to understand all functionality provided by the system.
Hardware Constraints
The system should work on most home desktop and laptop computers.

HOTEL RESERVATION SYSTEM 2015


Software Constraints
The system is designed to run on Firefox 3 and Internet Explorer 7, google chrome etc.
Communications Constraints
System must have access to the included database.
Data Management Constraints
This is a detailed description of constraints for data flow to data management software and
equipment outside the scope of the project.
Design Phase:11

Designing: The purpose of the design phase is to plan a solution of the problem specified by the
requirement document. This phase is the first step in moving from problem domain to the
solution domain.

Data Flow Diagram:-

LEVEL 0 :-

HOTEL RESERVATION SYSTEM 2015


LEVEL 1 :-

12

HOTEL RESERVATION SYSTEM 2015


Entity-Relationship Diagram:-

13

HOTEL RESERVATION SYSTEM 2015


Activity Diagram:-

14

HOTEL RESERVATION SYSTEM 2015


Class Diagram:-

15

HOTEL RESERVATION SYSTEM 2015


Use Case Diagram:-

ADD HOTEL
16

SHOW DETAIL

ADMIN
LOGIN
AUTHENTICATE

GET
REGISTERE
D
RESERVE
ROOM

BOOKING
CONFIRM

USER
CHECK
ROOMS

HOTEL RESERVATION SYSTEM 2015


Database Schema:-

Description of Login Table :-

17

HOTEL RESERVATION SYSTEM 2015


Description of SignUp Table :-

18

HOTEL RESERVATION SYSTEM 2015


Description of Hotels & Booking Table :-

19

HOTEL RESERVATION SYSTEM 2015


Coding and Snapshot:-

Home Page :<%@page contentType="text/html" pageEncoding="UTF-8"%>


<html>
<head>
20

<title>Home</title>
<link href="Style.css" type="text/stylesheet" rel="stylesheet"/>
<script type="text/javascript">
var v=new Array("hotels1.jpg","hotels2.jpg","hotels3.jpg","hotels4.jpg");
var i=0;
function change Image()
{
if(i<4)
{
document.images[0].src=v[i];
i++;
}
else
i=0;
}
function Start()
{
setInterval("changeImage()",1000);
}
</script>
</head>
<body onload="Start()">
<div align="center">
<center><font size="7" face="chiller" color="red"><h1>Hotel Reservation
System</h1></font></center>
<table class="search" border="3" bordercolor="black">
<tr>
<form action="Searchservlet" method="get">
<td><input type="text" placeholder="Type your City" style="height: 30;"
name="search"/></td>
<td><input type="submit" style="height: 30;" name="Search"
value="Search"></td>
</form>
</tr>
</table>

HOTEL RESERVATION SYSTEM 2015


<ul>
<li style="border: none;"><a href="Home.jsp">Home</a></li>
<li><a href="Aboutus.jsp">About Us</a></li>
<li><a href="Contactus.jsp">Contact Us</a></li>
</ul>
<%
if(session.getAttribute("user")!=null)
{
out.print("<b>");
//out.print(session.getAttribute("user"));
out.print("</b>");
%>
21

<b>

<h2 align="right"><font color="white" >Welcome <a style="color: red"


href="userdetails?username=<%=session.getAttribute("user")%>"><
%=session.getAttribute("user")%></font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a
style="text-decoration: none"; href="Logoutservlet"><font
color="black">Logout</font></a></h2></b>
<h3 align="center"><font size='5' color="yellow"><Marquee
onmouseover="stop();" onmouseout="start();"><a href="Viewbook">!!! View Your
Booking !!!</a></marquee> </h3>
<%
} else{
if(request.getAttribute("msg")!=null)
{
%>
<center><font size='5'><%=request.getAttribute("msg")%></font></center>
<%
%>

<b><h2 align="right"><a href="Login.jsp"><font


color="white">Login</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="SignUp.jsp"><font
color="white">Sign Up</font></a></h2></b>
<Marquee onmouseover="stop();" onmouseout="start();"><a href="Login.jsp"><font
size="6" color="blue"><b>!!!BOOKING!!!</b></font></a></Marquee>
<%
%>

<table cellspacing="1">
<tr>
<td><img src="hotels1.jpg" height="330" width="330"/></td>
<td><img src="hotels5.jpg" alt="Rumor Boutique Hotel" height="330"
width="330"/></td>

HOTEL RESERVATION SYSTEM 2015


<td><img src="hotels6.jpg" height="330" width="330"/></td>
<td><img src="hotels7.jpg" height="330" width="330"/></td>
</tr>
</table>
</div>
</body>
</html>

22

SignUp Page :<%@page contentType="text/html" pageEncoding="UTF-8"%>


<html>
<head>
<title>Sign Up</title>
<link href="Style1.css" type="text/stylesheet" rel="stylesheet"/>
<script type="text/javascript">
function fun()
{
var valid=0;

HOTEL RESERVATION SYSTEM 2015


var v=document.frm.user.value;
if(v=="")
{
document.getElementById('a').innerHTML="*";
valid=1;
}
else
document.getElementById('a').innerHTML="";
v=document.frm.fnm.value;
23

if(v=="")
{
document.getElementById('b').innerHTML="*";
valid=1;
}
else
document.getElementById('b').innerHTML="";
v=document.frm.lnm.value;
if(v=="")
{
document.getElementById('c').innerHTML="*";
valid=1;
}
else
document.getElementById('c').innerHTML="";
v=document.frm.pwd.value;
if(v=="")
{
document.getElementById('d').innerHTML="*";
valid=1;
}
else
document.getElementById('d').innerHTML="";
v=document.frm.dob.value;
if(v=="")
{
document.getElementById('e').innerHTML="*";
valid=1;
}
else
document.getElementById('e').innerHTML="";
v=document.frm.mob.value;
var pwd_reg=/[0-9]$/;
if(pwd_reg.Test(v))

HOTEL RESERVATION SYSTEM 2015


{
}
else
{
}

document.getElementById('f').innerHTML="";

document.getElementById('f').innerHTML="*";
valid=1;

if(!document.frm.r1[0].checked && !document.frm.r1[1].checked)


24

document.getElementById('g').innerHTML="*";
valid=1;

}
else
document.getElementById('g').innerHTML="";
if(valid==1)
return false;
else
return true;

}
</script>
</head>
<body background="N2.jpg">
<form name="frm" action="SignUpservlet">
<center><font size="7" face="chiller" color="red"><h1>Hotel Reservation
System</h1></font></center>
<ul>
<li style="border: none;"><a href="Home.jsp">Home</a></li>
<li><a href="Aboutus.jsp">About Us</a></li>
<li><a href="Contactus.jsp">Contact Us</a></li>
</ul>
<b><h2 align="right"><a href="Login.jsp"><font
color="orange">Login</font></a></h2></b>
<%
if(request.getAttribute("msg")!=null)
{
out.print("<b>");
out.print("<center><font size='5'>"+request.getAttribute("msg")
+"</font></center>");
out.print("</b>");
}
%>
<table cellspacing=5 cellpadding=5 align=center>
<tr>

HOTEL RESERVATION SYSTEM 2015


<th colspan=2><b><font size="5">REGISTRATION FORM</font></b></th>
</tr>
<tr>
<td><b>User Name</b></td><td><input type=text style="height: 25; width: 173;"
name="user" placeholder="Enter User Name" maxlength="25" required><font id="a"
color="red"></font></td>
</tr>
<tr>

25

<td><b>First Name</b></td><td><input type=text style="height: 25; width:


173;" name="fnm" placeholder="Enter Your First Name" maxlength="25"
required><font id="b" color="red"></font></td>
</tr>
<tr>
<td><b>Last Name</b></td><td><input type="text" style="height: 25; width:
173;" name="lnm" placeholder="Enter Your Last Name" maxlength="25" required><font
id="c" color="red"></font></td>
</tr>
<tr>
<td><b>Password</b></td><td><input type="password" style="height: 25;
width: 173;" name="pwd" placeholder="**************" maxlength="25"
required><font id="d" color="red"></font></td>
</tr>
<tr>
<td><b>D O B</b></td><td><input type="date" style="height: 25; width: 173;"
name="dob" required><font id="e" color="red"></font></td>
</tr>
<tr>

<td><b>Address</b></td><td><input type="text" row=5 style="height: 45;


width: 173;" name="addr" placeholder="Enter Your Address" maxlength="60"
required></textarea></td>
</tr>
<tr>
<td><b>Email</b></td><td><input type="text" style="height: 25; width: 173;"
name="email" placeholder="Enter Email_id" maxlength="30" required></td>
</tr>
<center>
<font style="position:relative; left:300px; bottom:-340px" size=5 color=red>
</font>
</center>
<tr>
<td><b>Mobile No.</b></td><td><input type=text style="height: 25; width:
173;" name="mob" placeholder="Enter 10 Digit Mobile No." maxlength="10"
required><font id="f" color="red"></font></td>
</tr>
<tr>
<td><b>Gender</b></td>
<td>
<input type=radio name=r1 value="Male" required>Male<font id="g"
color="red"></font><br>
<input type=radio name=r1 value="Female" required>Female
</td>
</tr>
<tr>
<td colspan=2 align=center><input type=submit style="height: 30;">
&nbsp&nbsp&nbsp&nbsp
26

</form>
<input type=reset style="height: 30;" name="res">
&nbsp&nbsp&nbsp&nbsp</td>
</tr>
<tr>
<td colspan=2 align=center>&copy <b>HRS</b></td>
</tr>
</table>
</body>
</html>

HOTEL RESERVATION SYSTEM 2015


Login Page :<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
<head>
<title>Login</title>
<link href="Style1.css" type="text/stylesheet" rel="stylesheet"/>
</head>
<body background="N4.jpg">
<form name="frm" action="Loginservlet">
<center><font size="7" face="chiller" color="red"><h1>Hotel Reservation System</h1></font></center>
27

<ul>
<li style="border: none;"><a href="Home.jsp">Home</a></li>
<li><a href="Aboutus.jsp">About Us</a></li>
<li><a href="Contactus.jsp">Contact Us</a></li>
</ul>
<b><h2 align="right"><a href="SignUp.jsp"><font color="black">Sign Up</font></a></h2></b>
<br /><% out.print("<font size=5 color=black><b>");
if(request.getAttribute("msg1")!=null){
out.println(request.getAttribute("msg1"));
out.print("</font></b>");
}%>
<center>
<% out.print("<font size=5 color=black><b>");
if(request.getAttribute("msg")!=null){
out.println(request.getAttribute("msg"));
out.print("</font></b>");
}%></center>
<table align="center">
<tr>
<td colspan="2"><h2>LOGIN</h2></td></tr>
<tr>
<td><b><font size="5">User Type</font></b></td>
<td>
<select style="height: 30; width: 173;" name=Utype>
<option>Admin</option>
<option>Hotel</option>
<option selected>Customer</option>
</select>
</td>
</tr>
<tr>

HOTEL RESERVATION SYSTEM 2015


<td><b><font size="5">User Name</font></b></td>
<td><input type="text" style="height: 30;" name="username" required></td>
</tr>
<tr>
<td><b><font size="5">Password</font></b></td>
<td><input type="password" style="height: 30;" name="password" required></td>
</tr>
<tr style="height: 50;">
<td colspan="2" align="right"><input type="submit" style="height: 30;" name="login" value="LOGIN"></td>
</tr>
28

</table>
</form>
</body>
</html>

HOTEL RESERVATION SYSTEM 2015

29

Detail of Customer :-

HOTEL RESERVATION SYSTEM 2015


30

AboutUs Page :<%@page contentType="text/html" pageEncoding="UTF-8"%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>About Us</title>
<link href="Style2.css" type="text/stylesheet" rel="stylesheet"/>
</head>
<body bgcolor="lime">
<center><font size="7" face="chiller" color="red"><h1>Hotel Reservation
System</h1></font></center>
<ul>
<li style="border: none;"><a href="Home.jsp">Home</a></li>
<li><a href="Aboutus.jsp">About Us</a></li>
<li><a href="Contactus.jsp">Contact Us</a></li>
</ul>
<%
if(session.getAttribute("user")!=null)
{
out.print("<b>");
//out.print(session.getAttribute("user"));
out.print("</b>");
%>
<b>
<h2 align="right"><font color="white" >Welcome <a style="color: red"
href="userdetails?username=<%=session.getAttribute("user")%>"><
%=session.getAttribute("user")%></font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a
style="text-decoration: none"; href="Logoutservlet"><font
color="black">Logout</font></a></h2></b>
<h3 align="center"><font size='5' color="yellow"><Marquee onmouseover="stop();"
onmouseout="start();"><a href="Viewbook">!!! View Your Booking !!!</a></marquee>
</h3>
<%
}else{
%>
<b><h2 align="right"><a href="Login.jsp"><font
color="white">Login</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="SignUp.jsp"><font
color="white">Sign Up</font></a></h2></b>
<%
}
%>
<br />

HOTEL RESERVATION SYSTEM 2015


31

<br />
<table border="0" cellspacing="0" cellpadding="1">
<tr id="id1"><td><font color="red" size="5" face="arial">About <font
face="italic" color="yellow" size="7"> HRS</font></font></td></tr>
</table>
<br />
<font color="teal" face="Cooper Black" size="5">
Positioned as a brand that believes in "Creating Happy Booking",
HRS.com provides information, pricing, availibility and booking facility for a
few very popular Hotels in India.
<br />
<br />
The Hotels are highly facilitated with Air-Conditioned, Wi-Fi services,Swimming
pool, Mineral Water and with some other Basic Facilities.
The most important thing is the Security, world class security with Cameras
providing clear vision during bad weather.
<br />
<br />
Through continued excellence in providing booking solutions, responses to booking
hotel online through HRS.com have also reached in new heights.
</font>
</body>
</html>

HOTEL RESERVATION SYSTEM 2015

32

ContactUs Page :<%@page contentType="text/html" pageEncoding="UTF-8"%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Contact Us</title>
<link href="Style2.css" type="text/stylesheet" rel="stylesheet"/>
</head>
<body background="N8.jpg">
<div align="center">
<center><font size="7" face="chiller" color="red"><h2>Hotel Reservation
System</h2></font></center>
<ul>
<li style="border: none;"><a href="Home.jsp">Home</a></li>
<li><a href="Aboutus.jsp">About Us</a></li>
<li><a href="Contactus.jsp">Contact Us</a></li>
</ul>
<b> <%
if(session.getAttribute("user")!=null)
{
out.print("<b>");
//out.print(session.getAttribute("user"));
out.print("</b>");
%>
<b>
<h2 align="right"><font color="white" >Welcome <a style="color: red"
href="userdetails?username=<%=session.getAttribute("user")%>"><
%=session.getAttribute("user")%></font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a
style="text-decoration: none"; href="Logoutservlet"><font
color="black">Logout</font></a></h2></b>
<h3 align="center"><font size='5' color="yellow"><Marquee
onmouseover="stop();" onmouseout="start();"><a href="Viewbook">!!! View Your
Booking !!!</a></marquee> </h3>
<%
}else{
%>
<b><h2 align="right"><a href="Login.jsp"><font
color="white">Login</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="SignUp.jsp"><font
color="white">Sign Up</font></a></h2></b>
<%
%>

}
</div>
<br>

HOTEL RESERVATION SYSTEM 2015


<hr size="2" color="#8080FF"><center>
33

<table border="0" cellspacing="0" cellpadding="1">


<tr id="id1"><td><font color="purple" size="5" face="arial">Customer
Support</font></td></tr>
</table>
<br /><br />
<table align='center' width="35%" align="left" cellspacing="3" border="2"
cellpadding="5" bordercolor=lightgrey>
<tr align="left"><td bgcolor="purple"><font color="white" size="5">Contact
Us</font></td></tr>
<tr><td>
<ul><li style="border: none;"><b>Call Us</b>
<ul><li style="border: none;"><font size="4">8963995777 &nbsp;&nbsp;(Prabin
Gupta);<br /> 8986594708&nbsp;&nbsp;(Santosh Kumar); <br /
>7746991459&nbsp;&nbsp;(Saurabh Gupta)</font><br /> <font
color="#7B1604">(*charges applicable)</font><br /><br />
<font face="italic" color="navy">Happy to Help You, 24 hrs a Day!!!
</font></li></ul>
</li></ul></td></tr>
<tr><td><ul><li style="border: none;"><b>Email Us</b><br />
<ul><li style="border: none;"><font>Mail us </font><br /><br /><font
color="green" face="MS Serif" size="5">prabin2111@gmail.com</font></li></ul>
</li></ul></td></tr>
</table>
</center>
</body>
</html>

HOTEL RESERVATION SYSTEM 2015

34

Search Hotels Page (On the basis of Cities):<%@page import="java.util.Iterator"%>


<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Hotel result</title>
<link href="Style.css" type="text/stylesheet" rel="stylesheet"/>
</head>
<body>
<div align="center">
<center><font size="7" face="chiller" color="red">
<h1>Hotel Reservation System</h1></font></center>
<ul>
<li style="border: none;"><a href="Home.jsp">Home</a></li>
<li><a href="Aboutus.jsp">About Us</a></li>
<li><a href="Contactus.jsp">Contact Us</a></li>
</ul>
<br>
<br>
<%
int i=0;
String color;
if(request.getAttribute("pid_list")!=null){
out.print("<table align='center' cellspacing='0'><tr><th></th><th
colspan='4'><font size='7'>Hotels in "+request.getAttribute("hname")
+"</font></th><th></th></tr>");
ArrayList al= (ArrayList)(request.getAttribute("pid_list"));
Iterator itr=al.iterator();
while(itr.hasNext()){
if(i%2==0)
color="#99CC99";
else
color="#f9b569";
i++;
ArrayList plist=(ArrayList)itr.next();
%>
<tr style="background-color: <%=color%>;">
<td>
<img src="<%= plist.get(7)%>" height="200" width="300"/>
</td>

HOTEL RESERVATION SYSTEM 2015


<td width="300">
<%= plist.get(1)%>
35

</td>
<td width="300">
<%= plist.get(3)%>
</td>
<td width="300">
<%= plist.get(4)%>
</td>
<td width="300">
<%= plist.get(5)%>
</td>
<td width="300">
<%= plist.get(6)%>
</td>
<%
if(session.getAttribute("user")!=null)
{
%>
<td width="300">
<a href="Bookform.jsp?hotelid=<%= plist.get(0)%>">BOOK NOW</a>
</td>
<%
}else{
%>
<td width="300">
<a href="Login.jsp?hotelid=<%= plist.get(0)%>">BOOK NOW</a>
</td>
<%

}
}
}
if(i==0){
<tr>

%>

<td colspan=3 align="center" style="background-color: #66ff66"<b>No


Record Found</b>
</tr>
<%}%>
</table>
</div>
</body>
</html>

HOTEL RESERVATION SYSTEM 2015

36

After Clicking On Search(We can select hotel for booking.) :-

HOTEL RESERVATION SYSTEM 2015


37

Booking Page :<%@page contentType="text/html" pageEncoding="UTF-8"%>


<html>
<head>
<title>Booking</title>
<link href="Style1.css" type="text/stylesheet" rel="stylesheet"/>
</head>
<body background="N11.jpg">
<form action="Bookservlet">
<center><font size="7" face="chiller" color="red"><h2>Hotel Reservation
System</h2></font></center>
<%
String s=request.getParameter("hotelid");
if(s!=null){
%>
<input type='hidden' name='hotelid' value=<%=s %> />
<%
}
%>
<table align="center" cellspacing="5">
<b><h3 align="right"><a style="text-decoration: none"; href="Home.jsp"><font
color="black">Back</font></a></h3></b>
<tr>
<td colspan="2"><center><hr size="10" color="green"><font size="5"
color="red"><h2>BOOKING</h2></font><hr size="10"
color="green"></center></td></tr>
<tr>
<td><b><font size="5">Name</font></b></td>
<td>
<input type="text" style="height: 30; width: 250;" name="name" placeholder="Enter
Name" required>
</td>
</tr>
<tr>
<td><b><font size="5">Check in</font></b></td>
<td><input type=date style="height: 30; width: 250;" name="checkin"
placeholder="Enter Arrival Date" required></td>
</tr>
<tr>
<td><b><font size="5">Check out</font></b></td>
<td><input type=date style="height: 30; width: 250;" name="checkout"
placeholder="Enter Departure Date" required></td>

HOTEL RESERVATION SYSTEM 2015


</tr>
38

<tr>
<td colspan="1"><b><font size="5">Room</font></b></td>
<td>
<select style="height: 30; width: 250;" name=room>
<option selected>Single Bed</option>
<option>Double Bed</option>
</select>
</td>
</tr>
<br>
<tr>
<td colspan="1"><b><font size="5">Category</font></b></td>
<td>
<select style="height: 30; width: 250;" name=category>
<option selected>Non Deluxe</option>
<option>Deluxe</option>
</select>
</td>
</tr>
<tr>
<td><b><font size="5">No. of Rooms</font></b></td>
<td><input type="text" style="height: 30; width: 250;" name="nor"
placeholder="Enter no of Room" required></td>
</tr>
<tr style="height: 50;">
<td colspan="2" align="right"><input type="submit" style="height: 30;"
name="booking" value="BOOKING"></td>
</tr>
</table>
</form>
</body>
</html>

HOTEL RESERVATION SYSTEM 2015

39

Confirmation Page(After clicking on BOOKING):-

HOTEL RESERVATION SYSTEM 2015

40

View Booking Detail Page :<%@page import="java.util.Iterator"%>


<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cancel</title>
<link href="Style1.css" type="text/stylesheet" rel="stylesheet"/>
</head>
<body background="N8.jpg">
<div align="center">
<center><font size="7" face="chiller" color="red"><h2>Hotel Reservation
System</h2></font></center>
<ul>
<li style="border: none;"><a href="Home.jsp">Home</a></li>
<li><a href="Aboutus.jsp">About Us</a></li>
<li><a href="Contactus.jsp">Contact Us</a></li>
</ul>
<%
if(session.getAttribute("user")!=null)
{
out.print("<b>");
//out.print(session.getAttribute("user"));
out.print("</b>");
%>
<b>
<h2 align="right"><font color="white" >Welcome <a style="color: red"
href="userdetails?username=<%=session.getAttribute("user")%>"><
%=session.getAttribute("user")%></a></font>&nbsp;&nbsp;&nbsp;&nbsp;<a
style="text-decoration: none" href="Logoutservlet"><font
color="black">Logout</font></a></h2></b>
<table>
<%
if(request.getAttribute("pid_list")!=null){
out.print("<tr align='left'><th width='300'>Booking id</th><th
width='300'>Name</th><th width='300'>Hotel</th><th width='300'>Check In</th><th
width='300'>Check Out</th><th width='300'>Room Type</th><th
width='300'>Category</th><th width='300'>No of Rooms</th></tr>");
ArrayList al= (ArrayList)(request.getAttribute("pid_list"));
Iterator itr=al.iterator();
while(itr.hasNext()){
ArrayList plist=(ArrayList)itr.next();

HOTEL RESERVATION SYSTEM 2015


%>
41

<tr>
<td width='300'>
<h3><%= plist.get(0)%></h3>
</td>
<td width='300'>
<h3><%= plist.get(1)%></h3>
</td>
<td width='300'>
<h3><%= plist.get(2)%></h3>
</td>
<td width='300'>
<h3><%= plist.get(3)%></h3>
</td>
<td width='300'>
<h3><%= plist.get(4)%></h3>
</td>
<td width='300'>
<h3><%= plist.get(5)%></h3>
</td>
<td width='300'>
<h3><%= plist.get(6)%></h3>
</td>
<td width='300'>
<h3><%= plist.get(7)%></h3>
</td>
<td width='300'>

</tr>

<h3><a href="Cancelbook?id=<%= plist.get(0)%>">Cancel</a></h3>


</td>

<%}
}
else{
%>

<tr>
<td colspan=3 align="center" style="background-color: #66ff66"<b><
%=request.getAttribute("msg")%> </b>

HOTEL RESERVATION SYSTEM 2015


</tr>
<%}%>
42

</table>
<%
}else{
%>
<b><h2 align="right"><a href="Login.jsp"><font
color="white">Login</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="SignUp.jsp"><font
color="white">Sign Up</font></a></h2></b>
<%
}
%>
</body>
</html>

Cancellation Page(After clicking on cancel) :-

HOTEL RESERVATION SYSTEM 2015

43

Logout Page :-

HOTEL RESERVATION SYSTEM 2015


Testing:44

INTRODUCTION: Testing is a set of activities that can be planned in advance and conducted
systematically testing requires that the developer discard preconceived notations of the
correctness of the software just developed and overcome a conflict of interest that occurs when
errors are encountered. Testing also provides the main objective of our project and understand
the risk of implementation. Testing is a process of technical investigation, performed on behalf
of stakeholder that is intended to reveal
quantity related information about the product with respect to the context in which it is intended
to operate. Testing is the process of executing a program or an application with an intent of
finding an error or bugs. Testing can be stated as the process of validating and verifying that a
software program/application/product:
TEST PLAN: Test plan will describe about the scope and activities of our modules in the
project .We must plan the test plans in the starting of our project. It will provide a unique
identifier for our document. Testing should begin in small and proceeds in the large.
Exhaustive testing is not possible. Provides an overview of our test plan. Specify the
goals/objectives/constraints.
Our project has eight modules. So, we will do testing from the starting phase itself .The main
aim of test plan is to produce a correct code with all users requirements satisfied.
UNIT TESTING:
Unit testing is used to test or verify the functionality of specific section of code. This is written
by the developers to ensure that specific function is working or not. A unit is the smallest part of
an application. Unit tests are created by programmers or Occasionally by white box testers
during the development process.
INTEGRATION TESTING:
Integration testing (sometimes called Integration and Testing, abbreviated "I&T") is the phase in
software testing in which individual software modules are combined and tested as a group. It occurs
after unit testing and before validation testing. Integration testing takes as

HOTEL RESERVATION SYSTEM 2015


its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in
an integration test plan to those aggregates, and delivers as its output the integrated system ready for
45

system testing. Integration testing is a type of software that seeks to verify the interface between
components.
The components are integrated in an iterative way. Integration testing will allow the interface to find
the issues more quickly and fixed. It works to expose defects in the interfaces and interaction between
integrated components (Modules).

TEST CASE FOR END USER:


If the user has just opened our website then he /she can access all pages except Booking page.
Only registered user can book room.
TEST CASE FOR LOGIN,SIGNUP:
If a user wants to book room, he has to first login ie. only registered user can book the room.
Screenshot for Signup test:

HOTEL RESERVATION SYSTEM 2015


Screenshot for Login test:

46

ALPHA TESTING:
Alpha testing is carried out by the test team within the developing organization.
BETA TESTING:
Beta testing is performed by a selected group of friendly customers.
VALIDATION TESTING:
While verification is a quality control process, quality assurance process carried out before the
software is ready for release is known as validation testing. The validation testing goals is to
validate and be confident about the software product or system, That it fulfills the requirements
given by the customer. The acceptance of the software from the end customer

HOTEL RESERVATION SYSTEM 2015


is also a part of Validation testing. Validation testing answers the question, "Are you building
the right software system". Another question, which the entire process of validation testing in
47

software engineering. Answers is, "Is the deliverable fit for purpose". In other words, does the
software system provide the right solution to the problem? Therefore, often the testing activities
are introduced early in the software development life cycle. The two major areas, when
validation testing should take place are in the early stages of software development and towards
the end, when the product is ready for release. In other words, it is acceptance testing which is a
part of validation testing.
Conclusion:-

Our project provides facility to conduct Hotel Reservation. It saves time as it allows number of
customer to register for different rooms and to get room booked at any time and the booking
detail is displayed as the confirm booking gets over.It is automatically generated by the server.
Administrator has a privilege to create, modify and delete the customer detail and its particular
booking. User can register, login and give the test with his specific id, and can see the results as
well.
Bibliography: Stackoverflow.com
JavaTutorials.com
Apache.org
Youtube.com

W3Schools.com

48

You might also like