You are on page 1of 63

COVER PAGE OF THE PROJECT REPORT

PROJECT REPORT
ON

HOTEL RESERVATION SYSTEM

TABLE OF CONTENTS
1. Introduction/Objectives............6
2. System Analysis
2.1 Identification of Need7-8
2.2 Preliminary Investigation............8
2.3 Feasibility Study..9-12
2.4 Project Scheduling13-16
2.5 SRS17-24
2.6 Software Engineering Paradigm25-26
2.7 Data Models.27-32
3. System Design
3.1 Modularisation..33-36
3.2 Database Design....37-40
3.3 User Interface Design....41-43
3.4 Test Cases (Unit Test Cases and System Test Cases)...44-45
4. Coding.46-48
4.1 Sample Project Coding..48-51
4.2 Comments and Description of Coding Segments.....52-53
4.3 Error Handling....54
4.4 Parameters Calling/passing54
4.5 Validation checks..55-56
5. Testing
5.1 Testing Techniques and Testing Strategies used...57-58
5.2 Test Reports (Unit Test Cases and System Test Cases)58-61
6. System Security Measures
6.1 Data Security.62-63
7. Reports64-65
8. Future Scope and Further Enhancement of the Project66
9. Bibliography.67
10.

Introduction
R&B HOTEL MANAGEMENT SYSTEM is developed following system development
stages for smooth running and management of the hotel. The system was carefully designed
to ensure maximum efficiency of the system at the hotel. The system canskilfully and
carefully coded to seal any possible loopholes in the system.
The system will indeed help the hotel management and the esteemed staff members to
manage and steer the hotels functionality and transactions to realize its maximum potential
in addition to its competence in the hotel business field.
The objective of R&B Online hotel management system project is to provide online room
booking process for hotel management.
Due to huge losses suffered by the hotel due to the existing manual system, the hotel
management opted for a computerized system, which would provide the following facilities:
1. Be friendlier to customers and the staff.
2. Improve customer care and service at the hotel.
3. Increase the hotel performance.
4. Reduce the operational costs of the hotel.

THE BASIC OBJECTIVES OF THE PROPOSED SYSTEM


1. To enable online booking via the internet.
2. To enable automated data entry methods.
3. Ensure efficient and reliable communication within the hotel.
4. Avoid data entry errors by use of input masks.
5. Enable easy authorized modification of data.
6. Enforce security measures to avoid unauthorized access to guest records.
7. Enable fast and easy retrieval of guest records and data for fast reference activities.

SYSTEM ANALYSIS
Identification of Need:
The current manual system uses paperwork and direct human language communication by
mouth to manage the hotel. This delays information transmission in the hotel.
Booking is done through phone calls or through visit to the hotel booking office. The guests
personal details such as Name, Age, Nationality, and Duration of stay, are input during
booking in. The booking office orders for preparation of the guests room before his/ her
check in date.
The documents are transferred manually to the filling department for compilation of the
guests file. On the reporting date the file is transferred to the reception. On checking in the
guest is given the key to his allocated room, he also specify if he needs room service.
The receptionist hands over the guests file to the accountant on the next table. Here the guest
pays accommodation and meals fee. The guests file is updated on daily basis of his
expenditure costs. The accounts department generates the bills on daily basis and delivered to
the guests in their rooms at desk by the service maids. The guest pays at the accounts desk,
where the receipts are generated.
During checking out of guests, their expenditure outlines are generated a day before check
out date. The guests receive their outlines at the accounts desk as they check out, where they
pay for bills balances if any.
PROBLEMS IN THE MANUAL SYSTEM
1. Difficulty in location of guest files: due to the large number of guests files, location of guest
files during checking in, updating of daily expenditures, receipt generation and checking out is
extremely difficult for the hotel employees.
2. Large storage space: the physical files occupy too much space of about two rooms full of
storage cabinets. This occupies the hotels space that could have otherwise been used for income
generation by the hotel.
3. Human and computational errors: many errors enabled by the system due to tedious
computations required during data processing cost the hotel management heavily. Modification
generates dirty and unpresentable reports
4. Poorly generated records: poorly generated records encourage omission of some important
data by the employees. Such data as the guests luggage is omitted. This leads to security
problems at the hotel such as armed robberies.
5. Complains from guests: due to poor management of documents encouraged by the manual
system, several cases were reported where guests complained of overcharging, charging of
services not used by the guests.
6. Poor communication: due to poor communication between the departments, guests are often
served with services they didnt order.
4

7. Difficulty in data analysis: The accountants usually found it difficult to analyse the guests data
during generation of expenditure bills due to missing of some records.
8. Data entry procedure is prone to errors.
THE ADVANTAGES OF THE PROPOSED SYSTYEM.

1. The system enables easy and fast access to the guest files.
2. The system provides better data management facilities.
3. The system enable online booking of guests into the hotel hence international guests can
easily book into the hotel.
4. The system provides performance evaluation of the employees to ensure maximum output
from the employees.
5. The system provides security measures to access to the hotels information lowering data
security threats.
6. The system help reduce the congestion of guests ensuring best service output for
customer satisfaction purposes.
7. Easy update of the guest records.
8. High customer service standards attract more guests to the hotel.
9. Reduction of data entry and processing errors.
10. Greatly reduce paper use at the hotel.

Preliminary Investigation

The project entitled Online Hotel Reservation is a web based system which facilitates online
reservation of hotel accommodations from anywhere in the world. If a person wants to
reserve his accommodation he would to know the list of hotels in the city he wants to visit,
different amenities provided in each hotel the different types of rooms available, the rates of
those rooms, the constraints of the hotel and finally the availability of the desired rooms on
the
desired
rate.
He may achieve all this through travel agencies, the guides available, by making enquiries in
person, by making enquiries through telephone. If he wants to make a choice between the
hotels he has to repeat the whole process for a number of hotels .After being satisfied with the
choice he has to confirm his reservation by paying the amount personally or through middle
persons.
This
process
is
laborious
and
his
choice
islimited.
So we found the necessity of providing all the information and the facility to reserve his
accommodation through the net so that maximum satisfaction is achieved by the customer
with least effort. The solution we are providing to this is to design a website that contains
information about various cities and the reputed hotels in each city along with the facilities,
types of rooms and their rates. The tourist can also choose the hotel of his interest

Feasibility Study
According to this feasibility study this report is integrated with some important points. Those
points are,

Definition/purpose of a feasibility study.


Who conducts the feasibility study?
Components of a feasibility study for a Hotel Reservation system.

This report has written for a Hotel Reservation system. The main object of preparing this
document is to give the clear ideas about changes and modifications of their new system for
user.

Definition/Purpose of a Feasibility Study


A feasibility study is defined as an estimate or analysis of the possible impact of a proposed
system. In the other hand we can say that whether decision makers can implement the project
according to customers requirements or not. The feasibility study will include wide data
associated to financial and operational impact. It also consisted with advantages of new
system and drawbacks of current system.
The feasibility study is conducted to support the decision-makers in creating the decisions,
1. What will be the great importance of the hotel reservation system?
2. Whatever the decision that they take it should improve the quality of developing
system
Who Conducts the Feasibility Study?
According to the project feasibility study may be conducted by the Hotel reservation
Manager. The hotel reservation manager over and over again does not have the time required
to perform in detail analysis required to complete a feasibility study. Also, the director may
lack the knowledge essential for completing the study. Therefore, a specialist often is hired to
perform the feasibility study.
The individual conducting a feasibility study should have the following characteristics:

Experience in conducting feasibility studies.


Experience in Hotel reservation system operation.
Should have the ability make decisions whatever the most suitable.
6

Components of a Feasibility Study for a Hotel Reservation System


The feasibility study for a proposed reservation system will be widespread. There are several
components that should be included in the study, and each will be discussed.

Background Information
Some background or setting information is important to provide the circumstance of the
feasibility study. Included in the background information:

According to our investigation we have chosen one of the best business class hotels.

Totally it has 300 rooms with including 16 suites also.


According to the IT managers idea they having some doubts with their reservation

system. Its not a very user friendly one.


Make one of the best and effective reservation system for company is main goal of
make this system.

Proposed Online Hotel Reservation System

Description of the System


Basically this system has two interfaces. Those are front end and back end.

Front end

Check-in date

Check-out date

Rooms

These are the most basic functionalities that appear in front end.

Back end(Reservation
staff)

Arrival list

Availability

Follow up report

These are the basic functions that include in back end system.
.
FEASIBILITY STUDY
1.) ECONOMIC FEASIBILITY
Economic analysis is most frequently used for evaluation of theeffectiveness of the system.
More commonly known as cost/benefit analysisthe procedure is to determine the benefit and
saving that are expected from asystem and compare them with costs, decisions is made to
design andimplement the system.This part of feasibility study gives the top management the
economicjustification for the new system. This is an important input to themanagement the
management, because very often the top management doesnot like to get confounded by the
various technicalities that bound to beassociated with a project of this kind. A simple
economic analysis that givesthe actual comparison of costs and benefits is much more
meaningful in suchcases.
In the system, the organization is most satisfied by economic feasibility.Because, if the
organization implements this system, it need not require anyadditional hardware resources as
well as it will be saving lot of time.
2.) TECHNICAL FEASIBILITY
Technical feasibility centres on the existing manual system of the testmanagement process
and to what extent it can support the system.According to feasibility analysis procedure the
technical feasibility of thesystem is analysed and the technical requirements such as software
facilities,procedure, inputs are identified. It is also one of the important phases of the system
development activities.The system offers greater levels of user friendliness combined with
greaterprocessing speed. Therefore, the cost of maintenance can be reduced. Since,
processing speed is very high and the work is reduced in the maintenancepoint of view
management convince that the project is operationally feasible.
3) BEHAVIOURAL FEASIBILITY
People are inherently resistant to change and computer has been known tofacilitate changes.
An estimate should be made of how strong the user islikely to move towards the development
of computerized system. These arevarious levels of users in order to ensure proper
authentication andauthorization and security of sensitive data of the organization.

4) OPERATIONAL FEASIBILITY:
The purpose of this project is to develop a Web based system which facilitates on line
reservation of hotel accommodation from anywhere in the world. The activities of the system
such as data entry, information retrieval, updating and deletion of records from various tables
etc. are made easy .All the operators of this project are trained in this area. So this project is
operational feasible.

PROJECT SCHEDULING
PERT CHART
The Program (or Project) Evaluation and Review Technique, commonly
abbreviated PERT, is a model for project management designed to analyze and represent the
tasks involved in completing a given project. It is commonly used in conjunction with the
critical path method or CPM.
PERT is a method to analyze the involved tasks in completing a given project,
especially the time needed to complete each task, and identifying the minimum time needed
to complete the total project.
PERT was developed primarily to simplify the planning and scheduling of large and
complex projects. It was developed for the U.S. Navy Special Projects Office in 1957 to
support the U.S. Navy's Polaris nuclear submarine project. [1] It was able to incorporate
uncertainty by making it possible to schedule a project while not knowing precisely the
details and durations of all the activities. It is more of an event-oriented technique rather than
start- and completion-oriented, and is used more in projects where time, rather than cost, is
the major factor. It is applied to very large-scale, one-time, complex, non-routine
infrastructure and Research and Development projects. An example of this was for the 1968
Winter Olympics in Grenoble which applied PERT from 1965 until the opening of the 1968
Games.
This project model was the first of its kind, a revival for scientific management,
founded by Frederick Taylor and later refined by Henry Ford (Fordism). DuPont
corporation'scritical path method was invented at roughly the same time as PERT.

10

11

GANTT CHART:

A Gantt chart is a type of bar chart that illustrates a project schedule. Gantt charts
illustrate the start and finish dates of the terminal elements and summary elements of a
project. Terminal elements and summary elements comprise the work breakdown structure of
the project. Some Gantt charts also show the dependency (i.e., precedence network)
relationships between activities. Gantt charts can be used to show current schedule status
using percent-complete shadings and a vertical "TODAY" line as shown here.
Although now regarded as a common charting technique, Gantt charts were
considered revolutionary when they were introduced. In recognition of Henry Gantt's
contributions, the Henry Laurence Gantt Medal is awarded for distinguished achievement in
management and in community service. This chart is used also in Information Technology to
represent data that have been collected.
A common error made by those who equate Gantt chart design with project design is
that they attempt to define the project work breakdown structure at the same time that they
define schedule activities. This practice makes it very difficult to follow the 100% Rule.
Instead the WBS should be fully defined to follow the 100% Rule, then the project schedule
can be designed.
Although a Gantt chart is useful and valuable for small projects that fit on a single
sheet or screen, they can become quite unwieldy for projects with more than about 30
activities. Larger Gantt charts may not be suitable for most computer displays. A related
criticism is that Gantt charts communicate relatively little information per unit area of
display. That is, projects are often considerably more complex than can be communicated
effectively with a Gantt chart. Gantt charts only represent part of the triple constraints (cost,
time and scope) of projects, because they focus primarily on schedule management.
Moreover, Gantt charts do not represent the size of a project or the relative size of work
elements, therefore the magnitude of a behind-schedule condition is easily miss
communicated. If two projects are the same number of days behind schedule, the larger
project has a larger impact on resource utilization, yet the Gantt does not represent this
difference.

12

1.Initial Investigation
(30 hrs)
2.Feasibility Study
(30 hrs)
3.System Analysis
(60 hrs)
4.System Design
(100 hrs)
5.Coding
(160 hrs)

6.Testing
(30 hrs)

7.Implementation
(20 hrs)
8.Post Implementation
(30 hrs)
9.Finish

13

SOFTWARE REQUIREMENTS SPECIFICATION

Online Hotel Reservation System


1. Introduction
The following subsections of the Software Requirements Specifications (SRS) document
provide an overview of the entire SRS.

1Purpose
The Software Requirements Specification (SRS) will provide a detailed
descriptionof the requirements for the Hotel Reservation System (HRS). This SRS
will allow for a complete understanding of what is to be expected of the HRS to be
constructed. The clear understanding of the HRS and its functionality will allow for
the correct software to be developed for the end user and will be used for the
development of the future stages of the project. This SRS will provide the foundation
for the project. From this SRS, the HRS can be designed, constructed, and finally
tested.
This SRS will be used by us for constructing the HRS and the hotel end users. We will use the SRS to
fully understand the expectations of this HRS to construct the appropriate software. The hotel end
users will be able to use this SRS as a test to see if the constructed system is up to their
expectations. If it is not to their expectations the end users can specify how it is not to their liking and
the SRS will be changed to fit the end users needs.

2Scope
The software product to be produced is a Hotel Reservation System which will automate the major
hotel operations. The first subsystem is a Reservation and Booking System to keep track of
reservations and room availability. The second subsystem is the Tracking and Selling Food System
that charges the current room. The third subsystem is a General Management Services and Automated
Tasks System which generates reports to audit all hotel operations and allows modification of
subsystem information. These three subsystems functionality will be described in detail in section 2Overall Description.
The end users are the hotel staff (customer service representative) and hotel managers. Both user
types can access the Reservation and Booking System and the Food Tracking and Selling System
The Hotel Reservation Systems objective is to provide a system to manage a hotel that has increased
in size to a total of 100 rooms. Without automation the management of the hotel has become an
unwieldy task. The end users day-to-day jobs of managing a hotel will be simplified by a
considerable amount through the automated system. The system will be able to handle many services
to take care of all customers in a quick manner. The system should be user appropriate, easy to use,
provide easy recovery of errors and have an overall end user high subjective satisfaction.

14

3Definitions, Acronyms, and Abbreviations


SRS Software Requirements Specification
HRS Hotel Management System
Subjective satisfaction The overall satisfaction of the system
End users The people who will be actually using the system

Overview

The SRS is organized into two main sections. The first is The Overall Description and the
second is the Specific Requirements. The Overall Description will describe the requirements
of the HRS from a general high level perspective. The Specific Requirements section will
describe in detail the requirements of the system.

1 The Overall Description


It describes the general factors that affect the product and its requirements. This section does
not state specific requirements. Instead it provides a background for those requirements,
which are defined in section 3, and makes them easier to understand.

5Product Perspective
The HRS is an independent standalone system. It is totally self-contained.

1.5.1Software Interfaces
All databases for the HRS will be configured using MySQL (ver: 5.2). These databases
include hotel rooms and customers information. These can be modified by the end users.
The room database will include the room numbers and if they are vacant or occupied. The
customers information database will contain all the information of the customer such as first
name, last name, number of occupants, assigned room, default room rate (may be changed),
phone number, whether or not the room is guaranteed, credit card number, confirmation
number, automatic cancellation date, expected check in date and time, actual check in date
and time, expected check out date and time, amount owed by customer, and abbreviated
customer feedback.

6Product Functions
Reservation and Booking System
Allows for typing in customer information
Has a default room rate that is adjustable
Includes a description field for the changed rate
When a customer checks in, the room number will be changed to occupied in the
database
Ability to modify a reservation
15

When no rooms are available and a customer would like to extend their
reservation their information will be placed in a database and when there are rooms
available the first customer on the list will have the room
When a customer checks out the amount owed is displayed
If the internal clock states that is a customers time to have checked out and
customer has not checked out, adds an extra night to amount owed and provides a
report
Records that room is vacant
Records payment
Allows for space to write customers feedback
Tracking and Selling Food System

Tracks all meals purchased


Charges the current room as necessary

General Management Services and Automated Tasks System

Reports generated to audit hotel occupancy, future occupancy, room revenue, and
food revenue
Exception reports listing exceptions to the normal cost
Allows addition, deletion and modification of information on rooms and rates,
menu items and prices, user profiles
Creation of users and assigning passwords

7User Characteristics
Educational level of HRS computer software Low
Experience of HRS software None
Technical Expertise Little

8Assumptions and Dependencies


- The system is not required to save generated reports.
- Credit card payments are not included

16

2 Specific Requirements
This section contains all the software requirements at a level of detail, that when
combined with the system context diagram, use cases, and use case descriptions, is sufficient
to enable designers to design a system to satisfy those requirements, and testers to test that
the system satisfies those requirements.

9User Interfaces
The User Interface Screens are described in table 1.
Table 1: Hotel Management User Interface Screens

Screen Name

Description

Login

Log into the system as a CSR or Manager

Reservation

Retrieve button, update/save reservation, cancel reservation,


modify reservation, change reservation, adjust room rate, accept
payment type/credit card

Check-in

Modify room stay (e.g., new credit card), check-in customer (with
or without a reservation), adjust room rate, special requests, accept
payment type/credit card

Checkout

Checkout customer, generate bill

Hotel Payment

Accept payment for room and food

Room Service/Restaurant

Create order, modify order, view order, cancel order, generate meal
bill

Customer Record

Add or update customer records

Administer Rooms

Availability and rates

Administer User

Create, modify, and delete users; change password

Reports

Select, view, save, and delete reports

1.9.1Software Interfaces
The system shall interface with MySQL database.

1.9.2Hardware Interfaces
The system shall run on all platforms.
17

1.9.3Communication Interfaces
The system shall be a standalone product that does not require any communication interfaces.

10

Functional Requirements

Functional requirements define the fundamental actions that system must perform.
The functional requirements for the system are divided into three main categories,
Reservation/Booking, Food, and Management. For further details, refer to the use cases.

1. Reservation/Booking
1.1. The system shall record reservations.
1.2. The system shall record the customers first name.
1.3. The system shall record the customers last name.
1.4. The system shall record the number of occupants.
1.5. The system shall record the room number.
1.6. The system shall display the default room rate.
1.6.1. The system shall allow the default room rate to be changed.
1.6.2. The system shall require a comment to be entered, describing the
reason for changing the default room rate.
1.7. The system shall record the customers phone number.
1.8. The system shall display whether or not the room is guaranteed.
1.9. The system shall generate a unique confirmation number for each reservation.
1.10. The system shall automatically cancel non-guaranteed reservations if the
customer has not provided their credit card number by 6:00 pm on the checkin date.
1.11. The system shall record the expected check-in date and time.
1.12. The system shall record the expected checkout date and time.
1.13. The system shall check-in customers.
1.14. The system shall allow reservations to be modified without having to renter
all the customer information.
1.15. The system shall checkout customers.
1.15.1. The system shall display the amount owed by the customer.
1.15.2. To retrieve customer information the last name or room number shall
be used
1.15.3. The system shall record that the room is empty.
1.15.4. The system shall record the payment.
1.15.5. The system shall record the payment type.
1.16. The system shall charge the customer for an extra night if they checkout
after 11:00 a.m.
1.17. The system shall mark guaranteed rooms as must pay after 6:00 pm on the
check-in date.
1.18. The system shall record customer feedback.
2. Management
2.1. The system shall display the hotel occupancy for a specified period of time
(days; including past, present, and future dates).
18

2.2.
2.3.
2.4.
2.5.
2.6.
2.7.
2.8.
2.9.

The system shall display projected occupancy for a period of time (days).
The system shall display room revenue for a specified period of time (days).
The system shall display food revenue for a specified period of time (days).
The system shall display an exception report, showing where default room
and food prices have been overridden.
The system shall allow for the addition of information, regarding rooms,
rates, menu items, prices, and user profiles.
The system shall allow for the deletion of information, regarding rooms,
rates, menu items, prices, and user profiles.
The system shall allow for the modification of information, regarding rooms,
rates, menu items, prices, and user profiles.
The system shall allow managers to assign user passwords.

19

11

Nonfunctional Requirements

Functional requirements define the needs in terms of performance, logical database


requirements, design constraints, standards compliance, reliability, availability, security,
maintainability, and portability.

1.11.1 Performance Requirements


Performance requirements define acceptable response times for system functionality.

The load time for user interface screens shall take no longer than two seconds.
The log in information shall be verified within five seconds.
Queries shall return results within five seconds.

1.11.2 Logical Database Requirements


The logical database requirements include the retention of the following data elements. This
list is not a complete list and is designed as a starting point for development.

Booking/Reservation System

Customer first name


Customer last name
Customer address
Customer phone number
Number of occupants
Assigned room
Default room rate
Rate description
Guaranteed room (yes/no)
Credit card number
Confirmation number
Automatic cancellation date
Expected check-in date
Expected check-in time
Actual check-in date
Actual check-in time
Expected check-out date
Expected check-out time
Actual check-out date
Actual check-out time
Customer feedback
Payment received (yes/no)
Payment type
20

Total Bill

1.11.3 Standards Compliance


The graphical user interface shall have a consistent look and feel.
1.11.4 Reliability
Specify the factors required to establish the required reliability of the software system at time
of delivery.

1.11.5 Availability
The system shall be available during normal hotel operating hours.

1.11.6 Security
Customer Service Representatives and Managers will be able to log in to the Hotel
Management System. Customer Service Representatives will have access to the
Reservation/Booking and Food subsystems. Managers will have access to the Management
subsystem as well as the Reservation/Booking and Food subsystems. Access to the various
subsystems will be protected by a user log in screen that requires a user name and password.

1.11.7 Maintainability
The Hotel Management System is being developed in JSP-SERVLET.
1.11.8 Portability
The Hotel Reservation System shall run in any platform that contains Java Runtime.

21

SOFTWARE ENGINEERING PARADIGM


Software process is the way in which we produce the software.
.A software life cycle is the series of identifiable stages that a software product
undergoes during its lifetime .A software lifecycle model is a descriptive and diagrammatic
representation of the software life cycle .A life cycle model represents all the activities
required to make a software product transit through its lifecycle phases .It also captures the
order in which these activities are to be taken .
Life Cycle Models
There are various life cycle models to improve the software processes.
1. WATERFALL MODEL
2. PROTOTYPE MODEL
3. ITERATIVE ENHANCEMENT MODEL
4. EVOLUTIONARY MODEL
5. SPIRAL MODEL
Here Waterfall model is used in developing the software:

Feasibility Study

Requirement
Analysis &
System Design

Coding

Testing

Implementation

This model contains 6 phases:


Feasibility study
The feasibility study activity involves the analysis of the problem and collection of
the relevant information relating to the product. The main aim of the feasibility
study is to determine whether it would be financially and technically feasible to
develop the product.
Requirement analysis and specification
22

The goal of this phase is to understand the exact requirements of the customer and
to document them properly. (SRS)
System Design
The goal of this phase is to transform the requirement specification into a structure that is
suitable for implementation in some programming language.
Testing
During this phase the design is tested in small modules in isolation from rest of the software
product. Then all the modules are integrated together and tested.
Implementation
Release of software inaugurates the operation and life cycle phase of the operation.
The phases always occur in this order and do not overlap.

DATA MODELS

23

Entity Relationship(ER) Diagram


The E-R modeling is a detailed logical representation of the entities, associations and data
element for an organization. This technique is used in database design that helps to describe
how entities in an enterprise are related to one another. The entity relationship model for data
uses there features to describe data. These are the following:

Entities:
An entity is a person, place, thing or event of interest to the organization and about which
data are capture, stored or processed for example and employee is an entity.

Attribute:
Various type of data item that describe an entity are known as attributes.

Relationship:
An association of several entities in a Entity-Relationship model is called relationship.
Three types of relationship exist among entitiesa) One-to-one(1:1)- A one-to-one relationship is an association only between two
entities.
b) One-to-many(1:M)- A one-to-many relationship exist when one entity is related to
more than one entity
c) Many-to-many(M:N)- A many-to-many relationship describes entities that have many
relationship among each other
While drawing the entity-relationship (E-R) diagram, entity names are represented by a
rectangle and oval shapes are used for representing attributes.

24

REPRESENT AN ENTITY

REPRESENT AN ATTRIBUTE

REPRESENT KEY ATTRIBUTE

REPRESENT RELATIONSHIP

REPRESENT CARDINALITY

LINKS ATTRIBUTE WITH ENTITY


AND ENTITY WITH RELATIONSHIP

ER DIAGRAM OF OHRS
25

DFD Symbols:26

1. External Entity:
The producer or the consumer of information that resides outsides the bound of the
system to be modelled. The following rectangular shape denotes it.

2. Process:
It is the agent that performs the transformation of information from one state to
another. The following shape denotes it.

3. The Data Flow


A data flow connects the output of an object or process to the input of another object
or process. The arrows denote flow of intermediate data value within a computation.
The arrowhead indicated the direction of flow of data.

4. Data Store
A repository of data is a passive object within a DFD for later access. A data store
does not generate any operations on its own but merely responds to requests to store
and access data. The following shape denotes it.

CONTEXT LEVEL DFD:

27

DATA FLOW DIAGRAM OPENING A NEW ROOM

DATA FLOW DIAGRAM CHECK-IN OF A NEW CUSTOMER

28

DATA FLOW DIAGRAM CHECK-IN OF A CUSTOMER

SYSTEM DESIGN
29

Modularisation Details:

Admin Module

The administrator has to enter the respective USER NAME and PASSWORD to sign
in. It manages, edit rooms, add new rooms, delete rooms, monitor reservation.

The operations are given in the snapshot below

30

User Module:
The user can register rooms by entering the particulars needed & can register or book
the rooms according to his need.

31

32

Database Design

33

34

35

USER INTERFACE DESIGN


The first step in the user interface design activity focuses on the preparation of input
and the design of output reports in a form acceptable to the user.
User interface design consists of two steps input design and output design.

36

5.3.1INPUT DESIGN

Input designing is a crucial part of any system design. Inaccurate input data are the
most common cause of error in data processing. Data entry can be control by input design.
Input design is the design phase; the expanded data flow diagram identifies logical data
flows, data stores, sources and destinations. The goal of designing input data is to make data
entry as easy as possible. In the case of Room Reservation and billing System
muchemphasis has been given to this phase. To reduce input errors, either the users are
provided with choices to choose from, or invalid inputs are restricted. Here the chances of
entering invalid data are minimal.
While entering data, the operators need to know the following:
The allocated space for each field
Field sequences, which most match that in the source document
The format in which data field is entered.
Keeping in view the user requirements, the inputs screens have been designed and
developed for easy and error free data entry. Based on the various types of inputs to be fed to
the computer in using the proposed system, all input screens have been designed in real mode
(GUI).

The details of all input screens are shown as follows:

37

38

39

Test Cases:
The test cases comprises of snapshots of both the unit test and system test cases.

40

41

CODING
Coding
The input to coding phase is the design document produced at the end of the design phase. During the
coding phase, different modules identified in the design document are coded according to their
respective module specifications.
The objective of the coding phase is to transform the design of a system into code in a high
level language, and then unit test this code.
The software development organizations formulate their own coding standard that suits them
most. The main advantages of adhering to a standard style of coding are as following:
(i)

A coding standard gives a uniform appearance to the code written by different


engineers.

(ii)

It facilitates code understanding.

(iii)

It promotes good programming practices.

3.2Coding standard and guidelines


Good software development organizations develop their own coding standards and guidelines
depending on what suits their organization best and based on the specific types of product they
develop.
Coding guidelines provide only general suggestions regarding the coding style to be followed.
Unlike coding standards, the use of these guidelines is not mandatory. However, the programmer is
encouraged to review them and attempt to incorporate them into his programming style.

Representative coding standards:


1. Rules for limiting the use of global:these rules list what types of data can be declared
global and what cannot.
2. Standard headers to precede the code of different module: the information contained
in the headers of different modules should be standard for an organization. The exact
format in which the header information is organized can also be specified.
3. Naming conventions for global variables, local variables and constant identifiers: a
popular naming convention is that variables are named using mixed case lettering.
4. Conventions regarding error return values and exceptions handling mechanism: the
way error conditions are reported by different functions in a program and the way
common exception conditions are handled should be standard within an organization.

42

Representative coding guidelines:


1. Do not use a coding style that is too clever or too difficult to understand: code should
be easy to understand. Clever coding can obscure meaning of the code and hamper
understanding.
2. Avoid obscure side effects: obscure side effects make it difficult to understand a piece
of code. For example if a global variable is changed or some file I/O performed
obscurely in a called module, it becomes difficult to infer from the functions name
and header information, making it difficult to understand the code.
3. The code should be well documented: at least one comment line on the average for
every three source lines of code.
4. The length of any function should not exceed 10 source lines: a lengthy function is
usually very difficult to understand as it probably has a large number of variables.
5. Do not use goto statements.

43

Sample Project Coding


Admin_home.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%
session=request.getSession();
if(session.getAttribute("username")==null)
{
response.sendRedirect("admin_index.jsp");
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script src="js/jquery-1.2.1.pack.js" type="text/javascript"></script>
<script src="js/jquery-easing.1.2.pack.js" type="text/javascript"></script>
<script src="js/jquery-easing-compatibility.1.2.pack.js" type="text/javascript"></script>
<script src="js/coda-slider.1.1.1.pack.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(window).bind("load", function() {
jQuery("div#slider1").codaSlider()
// jQuery("div#slider2").codaSlider()
// etc, etc. Beware of cross-linking difficulties if using multiple sliders on one page.
});
</script>
<style type="text/css">
#mytable {
padding: 0;
margin: 0 auto;
border-left-width: 2px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #0099FF;
border-right-color: #0099FF;
border-bottom-color: #0099FF;
border-left-color: #0099FF;
}
td {
background: #fff;
padding: 6px 6px6px6px;
color: #3399CC;
font-size: 16px;
text-align: center;
border: thin dotted #09F;

44

}
#label{
background-color: #3399CC;
}
#apDiv15 {
position: absolute;
width: 265px;
height: 29px;
z-index: 1;
left: 19px;
top: 30px;
}
#apDiv16 {
position: absolute;
width: 261px;
height: 24px;
z-index: 2;
left: 24px;
top: 80px;
}
#apDiv17 {
position: absolute;
width: 169px;
height: 24px;
z-index: 3;
left: 0px;
top: 21px;
}
#apDiv18 {
position: absolute;
width: 170px;
height: 24px;
z-index: 4;
left: 118px;
top: 130px;
}
#apDiv19 {
position: absolute;
width: 43px;
height: 24px;
z-index: 5;
left: 86px;
top: 180px;
}
#apDiv7 {
position: absolute;
width: 455px;
height: 175px;
z-index: 7;
top: 202px;
left: 623px;
}
#form {
width: auto;
height: auto;
}
</style>
<link href="style/admin_home.css"rel="stylesheet" type="text/css" />

45

<style type="text/css">
</style>
<link href="src/facebox.css" media="screen"rel="stylesheet" type="text/css" />
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
</head>
<body>
<jsp:include page="admin_header.jsp" />
<div id="nav">
<div id="apDiv3" style="text-align: center;">
<table width="1166" align="left"cellspacing="0" id="mytable">
<tr>
<td style="color: #fff;font-weight: bold;" width="201" id="label">Type</td>
<td style="color: #fff;font-weight: bold;" width="124" id="label">Rate</td>
<td style="color: #fff;font-weight: bold;" width="284" id="label">Descripton</td>
<td style="color: #fff;font-weight: bold;" width="196" id="label">Image</td>
<td style="color: #fff;font-weight: bold;" width="154" id="label">Quantity</td>
<td style="color: #fff;font-weight: bold;" width="192" id="label">Action</td>
</tr>
<%
String connectionURL3 = "jdbc:mysql://localhost:3306/hotel_reservation";
Connection connection3 = null;
Statement statement3 = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection3 = DriverManager.getConnection(connectionURL3, "root", "123456");
statement3 = connection3.createStatement();
String QueryString3 ="SELECT * FROM room";
ResultSet rs3 = statement3.executeQuery(QueryString3);
%>
<%
while (rs3.next()) {
%>
<tr>
<td height="85"><%=rs3.getString("type")%></td>
<td><%=rs3.getString("rate")%></td>
<td><%=rs3.getString("description")%></td>
<td><a rel="facebox"href=editpic.jsp?id=<%=rs3.getString("room_id")%>><img width=200
height=150 alt="Unable to View" src="photos/<%=rs3.getString("image") %>" /></a></td>
<td><%=rs3.getString("qty")%></td>
<td><a style="color: #f00;" rel="facebox"href=editroom.jsp?id=<%=rs3.getInt("room_id")
%>>Edit</a><a style="color: #f00;"> | </a><a style="color: #f00;" rel="facebox" href=deleteroom.jsp?
id=<%=rs3.getInt("room_id")%>>Delete</a></td>
</tr>
<% }%>
<%
// close all the connections.
rs3.close();
statement3.close();
connection3.close();
%>

46

</table>
<br>
<a style="color: #f00; text-align: center; font-weight: bold; font-size: 20px;"
rel="facebox"href="addroom.jsp">Add New Room</a>
</div>
</div>
</body>
</html>

47

Comments

<html> - The main container for HTML pages

<head> - The container for page header information

<title> - The title of the page

<body> - The main body of the page

<script>- The HTML script element is used to insert client side script code into a
document. This can be achieved in two ways: inserting the code directly as content of
this element or referring to an external file containing script code with the "src"
attribute. In the second case, user agents should ignore the content of the element.

<style>- tag is used to define style information for an HTML document.

<div> -tag defines a division or a section in an HTML document.

The ScriptletA scriptlet can contain any number of JAVA language statements,
variable or method declarations, or expressions that are valid in the page scripting
language.
Following is the syntax of Scriptlet:

<% code fragment %>

JSP Declarations: A declaration declares one or more variables or methods that


you can use in Java code later in the JSP file. You must declare the variable or
method before you use it in the JSP file.
Following is the syntax of JSP Declarations:
<%! declaration;[ declaration;]+... %>

JSP Expression:
A JSP expression element contains a scripting language expression that is
evaluated, converted to a String, and inserted where the expression appears in the JSP
file.
Following is the syntax of JSP Expression:
<%= expression %>
48

JSP Comments:
JSP comment marks text or statements that the JSP container should ignore. A JSP
comment is useful when you want to hide or "comment out" part of your JSP page.
Following is the syntax of JSP comments:
<%--Thisis JSP comment --%>

JSP Directives:
A JSP directive affects the overall structure of the servlet class. It usually has the
following form:
<%@ directive attribute="value" %>

JSP Actions:
JSP actions use constructs in XML syntax to control the behavior of the servlet engine.
You can dynamically insert a file, reuse JavaBeans components, forward the user to
another page, or generate HTML for the Java plugin.
There is only one syntax for the Action element, as it conforms to the XML standard:
<jsp:action_nameattribute="value"/>

49

Error Handling
Error handling using try and catch statement.
Although the default exception handler provided by the Java run-time system is useful
for debugging, you will usually want to handle an exception yourself. Doing so provides
two benefits. First, it allows you to fix the error. Second, it prevents the program from
automatically terminating. Most users would be confused (to say the least) if your
program stopped running and printed a stack trace whenever an error occurred!
Fortunately, it is quite easy to prevent this.
To guard against and handle a run-time error, simply enclose the code that you want to
monitor inside a try block. Immediately following the try block, include a catch clause
that specifies the exception type that you wish to catch.

Parameter Calling/Passing
GET method:
The GET method sends the encoded user information appended to the page request. The
page and the encoded information are separated by the ? character.
<a href=editpic.jsp?id=<%=rs3.getString("room_id")%>>edit room</a>

POST method:

50

This method packages the information in exactly the same way as GET methods, but
instead of sending it as a text string after a ? in the URL it sends it as a separate message.
This message comes to the backend program in the form of the standard input which you
can parse and use for your processing.
JSP handles this type of requests using getParameter() method to read simple parameters.
<%=request.getParameter("first_name")%>

Validation Checks
JavaScript Form Validation
JavaScript can be used to validate data in HTML forms before sending off the content
to a server.
Form data that typically are checked by a JavaScript could be:

has the user left required fields empty?

has the user entered a valid e-mail address?

has the user entered a valid date?

has the user entered text in a numeric field?

Required Fields
The function below checks if a field has been left empty. If the field is blank, an alert
box alerts a message, the function returns false, and the form will not be submitted:

<script type="text/javascript">
functionvalidateForm()
{
var a=document.forms["form1"]["name"].value;
if (a==null || a=="")
{
alert("Pls. type your name");
returnfalse;
}
var c=document.forms["form1"]["message"].value;
if (c==null || c=="")
{

51

alert("Pls. type your message");


returnfalse;
}
varemailText = document.forms["form1"]["email"].value;
var pattern = /^[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+)*@[a-z0-9]+(\-[a-z0-9]+)*(\.[a-z0-9]+(\-[a-z09]+)*)*\.[a-z]{2,4}$/;
if (pattern.test(emailText)) {
returntrue;
} else {
alert('Invalid Email Address: ' + emailText);
returnfalse;
}
}
</script>

The function above could be called when a form is submitted:


<form name="form1" id="email_form" action="savecomment.jsp" method="post"onsubmit="return
validateForm()" name="contact">
<p>Name:<br />
<input name="name" type="text" class="ed" />
<br />
Email Address:<br />
<input name="email" id="email" class="ed" />
<br />
Messages:<br />
<textarea id="message" name="message" rows="8" cols="23" class="ed"></textarea>
<br />
<input name="Input" type="submit" value="Submit" id="button1"/>
</p>
</form>

52

TESTING
Testing techniques and Testing strategies
TESTING
Software testing is a critical element of software quality assurance and represents the
ultimate review of specification, design and coding. In fact, testing is the one step in the
software engineering process that could be viewed as destructive rather than
constructive.
A strategy for software testing integrates software test case design methods into a wellplanned series of steps that result in the successful construction of software. Testing is
the set of activities that can be planned in advance and conducted systematically. The
underlying motivation of program testing is to affirm software quality with methods
that can economically and effectively applied to both strategic to both large and smallscale systems
STRATEGIC APPROACH TO SOFTWARE TESTING
The software engineering process can be viewed as a spiral. Initially, system
engineering defines the role of software and leads to software requirement analysis
where the information domain, functions, behavior, performance, constraints and
validation criteria for software are established. Moving inward along the spiral, we
come to design and finally to coding. To develop computer software we spiral in along
streamlines that decrease the level of abstraction on each turn.
A strategy for software testing may also be viewed in the context of the spiral. Unit
testing begins at the vertex of the spiral and concentrates on each unit of the software as
implemented in source code. Testing progresses by moving outward along the spiral to
integration testing, where the focus is on the design and the construction of the software
architecture. Taking another turn on outward on the spiral we encounter validation
testing where requirements established as part of software requirements analysis are
53

validated against the software that has been constructed. Finally we arrive at system
testing, where the software and other system elements are tested as a whole.
Table Given below outlines the tests that were performed on the system to ensure
correctness and unearth errors, which were subsequently debugged.

Testing
Phase

Objectives

Unit
Testing

The various functions within each program and


the program blocks are tested for proper working.

Module
Testing

A module is composed of various programs


related to that module. Module testing is done to
check the module functionality and interaction
between units within a module

Integration
Testing

Integration testing is done to test the functionalityand


interfacing between the modules.

Acceptanc
e
Testing

Acceptance testing is done after implementation to


check if the system runs successfully in the
customer environment/site.

Table shows the Tests Conducted on the Hotel Reservation System

UNIT TESTING
Unit Testing will be done to test field validations, navigation, functionality of the
programs and its blocks. These tests are applied on various functions within each
program and other critical program blocks.
54

MODULE TESTING
Module testing will be done to test the interaction between the various programs within
one module. It checks the functionality of each program with relation to other programs
within the same module. It then tests the overall functionality of each module.
INTEGRATION TESTING
Integration testing is done to test the functionality and interfacing between the modules.
The system is built up of various modules, which work together to automate the
activities of the hotel management system. These modules should work together in a
seamless way to achieve the desired results. Integration testing will test for this
property of the modules. The modules display a cause and effect relationship, if data in
one module is changed, then it affects the data to change in some other module also.
Integration testing needs to check if the modifications do not adversely affect some
other modules.
ACCEPTANCE TESTING
Acceptance testing was done after the implementation of the system. The acceptance
testing will check if the system works correctly in the user environment and if the entire
user specified functionalities are present. It also tests if the system adheres to the
company policies and quality standard.

Test Reports
Admin Module

55

User Module:

56

57

SYSTEM SECURITY MEASURES


Data Security:
Data Security or Database Security is a very essential operation needed to be done in order to
provide security for data items in the database.Database security allows or disallows user
actions on the database and objects within it. It protects a database from unintended activity.
Unintended activity can be categorized as authenticated misuse, malicious attacks or
inadvertent mistakes made by authorized individuals.
The MD5 message-digest algorithm is a widely used cryptographic hash function producing a
128-bit (16-byte) hash value, typically expressed in text format as a 32 digit hexadecimal
number. MD5 has been utilized in a wide variety of cryptographic applications, and is also
commonly used to verify data integrity.
The following code is used in our project to encrypt the password:
<%@page import="java.sql.*,java.util.*"%>
<%@page import=" java.security.*"%>
<%@page import="javax.crypto.*"%>
<%@page import="java.security.MessageDigest"%>
<%try{
String username=request.getParameter("user");
String password=request.getParameter("pass");
String position=request.getParameter("posi");
String emailadd=request.getParameter("email");
String algorithm="";
byte[] unencodedPassword = password.getBytes();
MessageDigest md =null;
md = MessageDigest.getInstance("MD5");
md.reset();
md.update(unencodedPassword);

58

byte[] encodedPassword = md.digest();


StringBufferbuf = newStringBuffer();
for (int i = 0; i <encodedPassword.length; i++)
{
if(((int) encodedPassword[i] & 0xff) < 0x10)
{
buf.append("0");
}
buf.append(Long.toString((int) encodedPassword[i] & 0xff, 16));
}
String passw=buf.toString();
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/hotel_reservation",
"root", "123456");
Statement st=con.createStatement();
st.executeUpdate("insert into user(username,password,position,email)
values('"+username+"','"+passw+"','"+position+"','"+emailadd+"')");
}catch(Exception e){}
response.sendRedirect("adduser.jsp");
%>

59

REPORTS
In this function reports are generated for the following entities:
a) Customer Details.
b) Requirements of the Customers
c) Rooms Details
d) Bill Details
e) Checkin Reports
f) Booking Details
g) Online Bookings
h) Checkout Details

60

Reports generated by administrator:

The above report is generated by the administrator after the booking procedure of the room.

61

FUTURE SCOPE AND FURTHER ENHANCEMENT


OF THE PROJECT
The birth of internet made the process of booking a room more easy for your business trip,
vacation or weekend getaway. Online hotel bookings help you to plan your vacation or
business trip easier and more affordable. In olden days it was very difficult to find and select
a hotel far away from your home. The development of technology and internet simplified the
process and now-a-days it is very easy to book a room from you home computer. Online hotel
booking help you to find a hotel with the facilities you wish to have. Sometimes you need a
simple and affordable place to stay and sometimes you wish to stay in a luxurious room, it
doesn't matter. We can select and book any type of room you like via internet.
The internet has developed a revolution in the field of hotel booking services. It is now very
easy to find a hotel anywhere in the world within seconds. You can book your favourite room
any time of the day from anywhere in the world. The most important advantage of online
hotel booking is convenience, you can book your room by simply sitting in home. Internet
helps you to browse through the hotels around the world and compare the facilities and rates
easily. When you choose your favourite hotel for your accommodation, simply you can
complete your reservation when required. Some of the hotels also offer same day hotel
booking online. It is very helpful for those who plan their weekend getaway in last minute.
Most of the hotels offers competitive pricing because it is very easy to compare the prices of
one hotel to another. Some online booking service provider's websites even allow you to
compare the prices of multiple hotel when selecting your online hotel bookings. By this way
it is very easy to find well-equipped hotel rooms in cheap price. It is better to find a larger
62

online hotel booking service provider, if you are looking for a cheap hotel room. Some of the
service providers won't allow you to choose your hotel, they only allow you to select location
and quality of the hotel. Considerable discounts on hotels may be available in off-seasons.
Some may give great discount in season also due to the competition in the field. You will get
much greater discount, if you allow the online hotel booking service provider to select your
hotel and flight. You can save much by selecting the services of online hotel booking service
providers. You can definitely save on airline flights, car services, and even entertainment. You
will get considerable discounts if you allow them to select all services you need. It is sure that
you can save a considerable amount and have extra funds to enjoy on your trip. There is no
administrative cost for hotels to provide this service. The booking software can be connected
regularly through aggregators.
Customers can compare the prices and facilities from one hotel to another by utilizing this
facility. Planning a vacation has never been easier and more reasonable than now. Easiness,
affordable pricing, and simple comparison shopping make online hotel bookings accepted to
all.

BIBLIOGRAPHY

1. Wikipedia
2. Software Engineering book by Rajib Mall

63

You might also like