You are on page 1of 55

PROJECT REPORT

ON

CONTACT MANAGEMENT SYSTEM

IN PARTIAL FULFILLMENT OF THE REQUIREMENT


FOR THE AWARD OF

THE DEGREE IN BACHELOR OF ENGINEERING

(COMPUTER SCIENCE & ENGINEERING )

BATCH: 2006-2010

PRADEEP (CS06031)
RAVI PATHAK(CS06042)
ROHIT GOYAL (CS06044)

ADVANCED INSTITUTE OF TECHNOLOGY & MANAGEMENT


PALWAL

(MAHARISHI DAYANAND UNIVERSITY, ROHTAK)

1
ACKNOWLEDGEMENT

We take this opportunity to thank all those who have helped us in completing
the project successfully.

We sincerely thank Mr. R.S. Chaudhary ( Director) & Mr. G.P.Dubey


(Principal) of Advanced Institue of Technology and Management Palwal
for providing us a platform to build this project.

We would also like to show our gratitude to Mr. R. N. Rajotiya (H.O.D. of


the institute’s Computer and IT department) for providing us with well
trained faculty and giving us all the required resources and a healthy
environment for our carrying out our project work.

We are highly obliged to Mr.Ankur Sharma (Faculty and Project Guide)


for providing us continuous and invaluable guidance throughout the project.
His kind and elderly advice always inspired us in putting our best efforts to
develop an efficient project.

Student Name (Roll No.) (Registration No.)

PRADEEP (CS06031) (06-AITF-531)


RAVI PATHAK (CS06042) (06-AITF-542)
ROHIT GOYAL (CS06044) (06-AITF-544)

2
Advanced Institute of Technology &
Management

CERTIFICATE

This is to certify that the project work entitled, Contact Management


System , submitted by the students of ADVANCED INSTITUTE OF
TECHNOLOGY AND MANAGEMENT (2006-2010) in partial
fulfillment of the requirement for the degree B.E. of M.D. University
Rohtak , is a bonafide record of the work carried out by them under my
supervision and is their original work.

Mr. Ankur Sharma Mr.R.N.Rajotiya


(Project Guide) (H.O.D. CSE / IT)

3
INDEX
1.1.3 Client’s Requirement 6
According to the Objectives we can specifically analyze the client’s
requirements which are as under: 6
SYSTEM CONFIGRATION.......................................................................7
Feasibility Study:.........................................................................................10
Economic Feasibility ..................................................................................10
Technical Feasibility..................................................................................10
2.1 DATABASE DESIGN...........................................................................11
5.PROJECT TESTING AND DEBUGGING...........................................48
5.4 Testing Process......................................................................................50
5.4 Debugging 52
6.Conclusion and Further Scope Of Project.............................................53
BIBLIOGRAPHY & REFRENCES..........................................................55
8. Bibliography & References 55

1.Software Requirement and Specification

Introduction to Project

Title of Project : Hotel Management System


Client : Quality Hotels Pvt. Limited Fbd.
Status : Maintain the Hotel Information.
Duration : 6 Weeks Project
Maintenance : The software will be maintained by CMC Ltd.

4
Brief Description:
This software is acting as a hotel information. Manager can login to this
software and can have Information and the Monitoring and
Department.

1.1 Introduction to Hotel Management

Hotel Management is a system to fullfill the requirements of the


hotel. How to book a room, room cacellation, billing system, add or
delete rooms from database. It is also used for finding the
information about the guest.

1.1.2 About Client

The software is being made for “Quality Hotels P. Ltd. Faridabad”. The
Chairman of this company is Mr. R. K. Srivastava and Director is Mr. Lalit
Jha. Last year turn over is Rs. 170 Caror. It deals with a variety of Hotels ,
Motels & Resorts . This software is made to manage the room booking of

5
hotel. There requirement was to prepare a software which can manage all
bookings of hotels.

1.1.3 Client’s Requirement

According to the Objectives we can specifically analyze the client’s


requirements which are as under:

a. To receipt login at the click of mouse.


b. To book rooms for customer at the click of mouse.
c. To check available rooms of different category at any time .
d. To calculate the total bill at the click of mouse.
e. To search customer’s detail on click of mouse.

1.1.4 DRAWBACKS OF EXISTING SYSTEM

1. Existing system was manual.


2. Time consuming as guest entry which took lot of time.
3. Searching was very complex as there could be 100’s of entry every
day.

6
4. The proposed system is expected to be faster than the existing
system.

1.1.5 NEED OF COMPUTERIZATION

Computerization needed to remove the bottlenecks and limitations of


existing manual system. Some of the important merits of computerization
are:

1. HIGER RELIABILTY
2. FAST ACCESS OF INFORMATION.
3. BETTER CUSTOMER SERVICES.
4. INCREASED THROUGHPUT.
5. IMPROVED STAFF EFFICIENCY AND REDUCE WORKLOAD.
6. PROVIDE SECURITY ASPACTS.

SYSTEM CONFIGRATION

1.2.1 Software requirement


The Inventory Management System is developed using JAVA and SQL

Server. The system using this software is used must have proper software
platform.

7
Opening System

Win 98
Win XP
Win 2000

Database
SQL Server

Tomcat 5.5

Internet Explorer

1.2.2 Hardware requirement


Minimum Hardware requirements are

CPU: Pentium II
RAM: 128 MB
Hard Disk: minimum 40 GB
Resolution: 800*600 with support of 256 colors.

Validation Checks
Necessary validation check has to be implemented throughout the project.
Important care has to be taken in order to ensure that no mistakes happen while
entering data.

Proper relationship have to be defined among the tables in the database to


ensures that referential integrity has been maintained across the table.

1.3 System Analysis and Planning

Software project planning comprises of a set of activities of the software


project management process. The list given below includes all these
activities, which will then be taken up in detail.

8
1. Know the observations on estimating prior to commencing any
project.
2. Have clearly defined project planning objectives before commencing
the project.
3. Define the software scope of the project before commencing work on
the project.
4. Know the type of resources and the method of their estimation.
5. Learn the Software Project Estimation.
6. Learn Decomposition Techniques.
7. Study the means of carrying out Problem-Based Estimation.
8. Study the basics of Process-Based Estimation.
9  Learn the process of arriving at Make-Buy Decisions.

9
Feasibility Study:
All projects are feasible given unlimited resources and infinite time.
Unfortunately the development of the computer based system or product is
more likely to be plagued by a scarcity of resources and difficult delivery
dates. Thus it is both necessary and prudent to evaluate the feasibility of the
project at the earliest possible time.

During Feasibility analysis, our team took the opportunity and talked to the
respective client on various topics including the cost effectiveness, time
allotted for the completion of the project. We also consulted whether the
calculations made in the project are valid as per the guidelines set by the
requirements and the respective laws of the country.

The whole discussion was directed towards five primary areas of interest:

Economic Feasibility
This project is found to be economically feasible since an evaluation of
development cost was outweighed by the ultimate income or benefit derived
from the proposed system. As the

Technical Feasibility
The proposed system was assessed to be technically viable as the
technologies decide to be used in the project were available and were capable
of accomplishing the desired function and performance. The scope of
extensibility was also taken into Consideration as the IT industry is still on a
speedy highway and various new technologies come up with a blink of eye.

Behavioral Feasibility
A Project is said to be behavioral feasible if it is readily accepted by the end
user. The users should have the knowledge of computers already. In this we
determined that it would be widely accepted by all the end users as the
interface of game was user friendly and game controls were very simple.

10
2.Design Methodology Description:

2.1 DATABASE DESIGN

Input design is the process of converting user-originated inputs to a Computer-


based format. Input requirements for inventory categorized as follows:

1. LOGIN

Field Name Data Type


UserName varchar
Password varchar

2. BOOKING

Field Name Data Type


Room_number Int
Title varchar
Name varchar
Email varchar
Country varchar
County_Code Int
Area_Code Int
Phone_No Int
Room_Type varchar
Room_Category varchar
Date_In Int
Month_In Int
Year_In Int
Date_Out Int
Month_Out Int
Year_Out Int

11
3. ENTRY

Field Name Data Type


Room_number Int
Title varchar
Name varchar
Date_In Int
Month_In Int
Year_In Int
Date_Out Int
Month_Out Int
Year_Out Int

4. ROOM_INFO

Field Name Data Type


Room_No Int
Room_Type varchar
Room_Category varchar

5. PRICE

Field Name Data Type


Room_Type varchar
Room_Category varchar
Rate Int

6. NON_BUSY

Field Name Data Type


Room_No Int

12
2.2 DESIGN DIAGRAM

WELCOME FORM

HOME SERVICE CONTACT LOGIN ABOUT ROOM


US US INFORMATION

MDI FORM

CHECK ROOM ROOM ADD DELETE


AVAILIBI BOOKING CANCEL SEARCH BILL ROOM ROOM
LITY LATION

SEARCH SEARCH
USING USING
NAME ROOM
NUMBE
R

13
2.3 Data Flow Diagram:

3.CODING
14
3.1 Coding for forms

Welcome form
<%--
Document : WELCOME
Created on : Jul 18, 2009, 1:16:43 PM
Author : ROHIT GOYAL & PRADEEP
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv ="Content-Type" content ="text/html; charset
=UTF-8">
<title> WELCOME FORM </title>
</head>

<body background = "image\back.jpg" height = "100%">


<TABLE border = "2" width= "100%">
<TR height = "50px">
<TD width = "10%">
<IMG SRC = "image\quality.jpg" width = "100%">
</TD>
<TD WIDTH = "70%" background = "image\abc.bmp">
<MARQUEE behavior = "alternate" direction = "right" >
<FONT SIZE="15" COLOR="WHITE"> THE QUALITY HOTEL WELCOMES YOU
</FONT> </MARQUEE>
</TD> </TR>
</TABLE>

<BR>

<TABLE WIDTH = "100%" HEIGHT = "8%" BGCOLOR = "pink">


<TR cell spacing = "10">
<TD> <CENTER>
<A HREF = "WELCOME.jsp"> <FONT SIZE = "5" color = "blue"> HOME
</FONT> </A> </CENTER> </TD>
<TD BGCOLOR = "black"> </TD>
<TD> <CENTER>
<A HREF = "SERVICE.jsp"> <FONT SIZE = "5" color = "blue">
SERVICES </FONT> </A> </CENTER> </TD>
<TD BGCOLOR="black"> </TD>
<TD> <CENTER>
<A HREF = "ABOUTUS.jsp"> <FONT SIZE = "5" color = "blue"> ABOUT
US

15
</FONT> </A> </CENTER> </TD>
<TD BGCOLOR="black"> </TD>
<TD><CENTER>
<A HREF = "LOGIN.jsp"> <FONT SIZE = "5" color = "blue"> LOGIN
</FONT> </A> </CENTER> </TD>
<TD BGCOLOR="black"> </TD>
<TD><CENTER>
<A HREF = "CONTACTUS.jsp"> <FONT SIZE = "5" color="blue"> CONTACT
US </FONT> </A> </CENTER> </TD>
<TD BGCOLOR="black"> </TD>
<TD > <CENTER>
<A HREF = "ROOMINFO.jsp"> <FONT SIZE = "5" color= "blue"> ROOM
INFORMATION </FONT> </A> </CENTER> </TD>
<TD BGCOLOR="black"> </TD>
<TD> <B> <CENTER>
<%

java.util.Date a = new java.util.Date();


int h = a.getHours();
int m = a.getMinutes();
int y = a.getYear();
int m1 = a.getMonth();
int d = a.getDate();
int d1 = a.getDay();
m1++;
int m2 = m1;
int y1 = y + 1900;
if (d1 == 0) {
out.println("Sunday");
} else if (d1 == 1) {
out.println("Monday");
} else if (d1 == 2) {
out.println("Tuesday");
} else if (d1 == 3) {
out.println("Wednesday");
} else if (d1 == 4) {
out.println("Thursday");
} else if (d1 == 5) {
out.println("Friday");
} else if (d1 == 6) {
out.println("Saturday");
}
out.print(" ");
if(h>12)
{
h=h-12;
out.print(h + ":" + m +" "+"PM"+ " " + d + "/" + m2 + "/" +
y1);
}
else if(h==12)
{

16
out.print(h + ":" + m +" "+"PM"+ " " + d + "/" + m2 + "/" +
y1);
}
else
{
out.print(h + ":" + m +" "+"AM"+ " " + d + "/" + m2 + "/" +
y1);
}

%>
</CENTER> </B> </TD> </TR>
</TABLE>

<TABLE border = "2" width = "100%" HEIGHT = "70%">


<TR>
<TD WIDTH = "60%" >
<IMG SRC = "image\LL.jpg" WIDTH="100%" HEIGHT="100%" >
</TD>
<TD WIDTH = "40%"> <CENTER> <H2>

<FONT COLOR = "RED"> FACILITIES </FONT> </H2> </CENTER>


<FONT COLOR="blue"> <CENTER> <B>
<marquee direction = "up" scrollamount = "3">
&loz; Grandest Hotel with 120 Centrally AirConditioned Rooms <br>
<br> <br>
&loz; Variety of Suites - ranging from Executive Suite to theme
Suites and Presidential Suite <br>
<br> <br>
&loz; Broad-band Internet access from all the rooms <br>
<br> <br>
&loz; Corporates and Confrences / Events <br>
<br> <br>
&loz; India's most magnificient Banquet venue <br>
<br> <br>
&loz; International and National cusine Speciality Restaurants
<br>
<br> <br>
&loz; World class state of the art Health SPA <br>
<br> <br>
</marquee> </B> </CENTER>
</FONT>
</TD> </TR>
</TABLE>

<TABLE width="100%" HEIGHT="8%">


<TR>
<TD ALIGN="RIGHT">
<FONT COLOR = "BLUE"> CREATED BY ROHIT GOYAL & PRADEEP</FONT>
</TD> </TR>
</TABLE>

17
</body>

</html>

LOGIN FORM

<%--
Document : LOGIN
Created on : Jul 17, 2009, 10:12:23 AM
Author : ROHIT GOYAL & PRADEEP
--%>

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


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LOGIN FORM</title>
</head>

<body background="image\back.jpg" height="100%" >


<form name="LOGIN" action="./SER" METHOD="POST" >

<TABLE width="100%">
<tr> <td>
<TABLE border="2" width="100%">
<TR>
<TD width="10% height=20%">
<IMG SRC="image\quality.jpg" width="100%" >
</TD>
<TD WIDTH="70%" background="image\abc.bmp">
<MARQUEE > <FONT SIZE="15" COLOR="WHITE"> THE QUALITY HOTEL WELCOMES YOU
</FONT> </MARQUEE>
</TD>
</TR>
</TABLE>
<BR>

<TABLE width="100%" HEIGHT="8%" BGCOLOR="pink" >


<TR cellspacing="10">
<TD> <CENTER>
<A HREF="WELCOME.jsp"> <FONT SIZE="5" color="blue"> HOME </FONT> </A>
</CENTER> </TD>
<TD BGCOLOR="black"> </TD>
<TD> <CENTER>
<A HREF="SERVICE.jsp"> <FONT SIZE="5" color="blue"> SERVICES </FONT>
</A> </CENTER> </TD>
<TD BGCOLOR="black"> </TD>
<TD> <CENTER>

18
<A HREF="ABOUTUS.jsp"> <FONT SIZE="5" color="blue"> ABOUT US </FONT>
</A> </CENTER> </TD>
<TD BGCOLOR="black> </TD>
<TD> <CENTER>
<A HREF="LOGIN.jsp"> <FONT SIZE="5" color="blue"> LOGIN </FONT> </A>
</CENTER> </TD>
<TD BGCOLOR="black"> </TD>
<TD> <CENTER>
<A HREF="CONTACTUS.jsp"> <FONT SIZE="5" color="blue"> CONTACT US </FONT>
</A> </CENTER></TD>
<TD BGCOLOR="black"> </TD>
<TD > <CENTER>
<A HREF="ROOMINFO.jsp"> <FONT SIZE="5" color="blue"> ROOM INFORMATION
</FONT> </A> </CENTER> </TD>
<TD BGCOLOR="black"> </TD>
<TD> <B> <CENTER>
<%
java.util.Date a = new java.util.Date();
int h = a.getHours();
int m = a.getMinutes();
int y = a.getYear();
int m1 = a.getMonth();
int d = a.getDate();
int d1 = a.getDay();
m1++;
int m2 = m1;
int y1 = y + 1900;
if (d1 == 0) {
out.println("Sunday");
} else if (d1 == 1) {
out.println("Monday");
} else if (d1 == 2) {
out.println("Tuesday");
} else if (d1 == 3) {
out.println("Wednesday");
} else if (d1 == 4) {
out.println("Thursday");
} else if (d1 == 5) {
out.println("Friday");
} else if (d1 == 6) {
out.println("Saturday");
}
out.print(" ");
if(h>12)
{
h=h-12;
out.print(h + ":" + m +" "+"PM"+ " " + d + "/" + m2 + "/" + y1);
}
else if(h==12)
{
out.print(h + ":" + m +" "+"PM"+ " " + d + "/" + m2 + "/" + y1);
}
else
{
out.print(h + ":" + m +" "+"AM"+ " " + d + "/" + m2 + "/" + y1);
}
%>

19
</CENTER> </B> </TD>
</TR>
</TABLE>

</td> </tr>

<tr> <td>
<CENTER> <TABLE BORDER="2" bgcolor="red" WIDTH="40%" HEIGHT="40PX">
<TR> <TH>
<CENTER> <FONT SIZE="10" COLOR="BLUE"> LOGIN SCREEN </FONT> </CENTER>
</TH> </TR>
<TR ROWSPAN="2">
<TD> <b>
ENTER USERNAME <input type="text" name="USERNAME" value=""/>
</b> </TD>
</TR> <BR>
<TR>
<TD> <b>
ENTER PASSWORD <input type="password" name="PASSWORD" value="" />
</b> </TD>
</TR>
<TR>
<TD>
<input type="submit" value="OK" name="button" />
<input type="submit" value="CANCEL" name="button" />
<input type="submit" value="BACK" name="button" />
</TD>
</TR>
</TABLE> </center>
</td> </tr>
</table>

<center>
<%

String s=(String) request.getAttribute("key");

if(s==null)
{
out.println(" ");
}
else
{
out.println("<center><h2><font
color=red>"+s+"</font></h2><center>");
}

%>
</CENTER>

</form>

</body>

</html>

20
MDI FORM
<%--
Document : MDI
Created on : Jul 17, 2009, 12:04:23 PM
Author : ROHIT GOYAL & PRADEEP
--%>

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


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page session="false" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MDI FORM</title>
</head>

<body background="image\back.jpg" height="100%">


<CENTER> <FONT SIZE="15" COLOR="BLUE"> MAIN MENU </FONT> </CENTER>
<BR>
<form method="post" action="MyROOMBOOKING">
<CENTER> <TABLE BORDER="2" HEIGHT="500" WIDTH="200" >
<TR>
<TD ALIGN="CENTER">
<input type="submit" value="CHECKAVAILIBILITY" name="button" />
</TD> </TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR ALIGN="CENTER">
<TD>
<input type="submit" value="CANCELLATION" name="button"/>
</TD> </TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR ALIGN="CENTER">
<TD>
<input type="submit" value="SEARCH" name="button" />
</TD>
</TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR ALIGN="CENTER">
<TD>
<input type="submit" value="BILLING" name="button" />
</TD>

21
</TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR ALIGN="CENTER">
<TD>
<input type="submit" value="ADD ROOM" name="button" />
</TD>
</TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR ALIGN="CENTER">
<TD>
<input type="submit" value="DELETE ROOM" name="button" />
</TD>
</TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
<TR ALIGN="CENTER">
<TD>
<input type="submit" value="LOGOUT" name="button" />
</TD>
</TR>
<TR> <TD> </TD> </TR>
<TR> <TD> </TD> </TR>
</TABLE>
</CENTER>
</FORM>
</body>
</html>

CHECK AVAILIBILITY FORM

<%--
Document : ROOMBOOKING
Created on : Jul 17, 2009, 12:15:34 PM
Author : ROHIT GOYAL & PRADEEP
--%>

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


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CHECK AVAILIBILITY</title>
</head>

22
<body background="image\back.jpg" height="100%">
<form action="./SER2">
<CENTER>]
<TABLE border="2" BGCOLOR="blue">
<TR>
<TH ALIGN="center"colspan="2" >
<h1> <font clor="blue"> CHECK AVAILIBILITY </font> </h1>
</TH>
</TR>
<TR>
<TD> <B> CHECK IN DATE </B> </TD>
<TD>

<TABLE>
<TR>
<TD>
<select name="DATE">
<OPTION>DD</OPTION>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select>
</TD>
<TD>
<select name="MONTH">
<option>MM</option>
<option VALUE="1">JAN</option>
<option VALUE="2">FEB</option>
<option VALUE="3">MAR</option>

23
<option VALUE="4">APR</option>
<option VALUE="5">MAY</option>
<option VALUE="6">JUN</option>
<option VALUE="7">JUL</option>
<option VALUE="8">AUG</option>
<option VALUE="9">SEP</option>
<option VALUE="10">OCT</option>
<option VALUE="11">NOV</option>
<option VALUE="12">DEC</option>
</select>
</TD>
<TD>
<select name="YEAR">
<option>YY</option>
<option>2009</option>
<option>2010</option>
<option>2011</option>
<option>2012</option>
<option>2013</option>
<option>2014</option>
<option>2015</option>
<option>2016</option>
<option>2017</option>
<option>2018</option>
<option>2019</option>
</select>
</TD>
</TR>
</TABLE>

</TR>
<TR>
<TD>
<B> ROOM TYPE </B>
</TD>
<TD>
<select name="ROOMTYPE">
<option>STD NON A/C</option>
<option>REGULAR A/C</option>
<option>DELUXE A/C</option>
<option>EXECUTIVE A/C</option>
</select>
</TD>
</TR>
<TR>
<TD>
<B> ROOM CATEGORY </B>
</TD>
<TD>
<select name="ROOMCATEGORY">
<option> SINGLE</option>
<option> DOUBLE</option>
<option> TRIPLE</option>
</select>
</TD>
</TR>
<TR>

24
<TD ALIGN="CENTER"> <input type="submit" value="OK" name="button" />
</TD>
<TD ALIGN="CENTER"> <input type="submit" value="BACK" NAME="button" />
</TD>
</TR>
</TABLE>

</form>

</body>

</html>

SEARCH FORM
<%--
Document : SEARCH
Created on : Jul 18, 2009, 1:21:33 PM
Author : ROHIT GOYAL & PRADEEP
--%>

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


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> SEARCH FORM </title>
</head>

<body background="image\back.jpg" height="100%">

<form action="./SER11" METHOD = "POST">

<BR> <BR> <BR> <BR>

<CENTER>
<TABLE border="2" BGCOLOR="blue">
<TR>
<TH ALIGN="center"colspan="2" >
<h1> <font clor="blue">SEARCH </font> </h1>
</TH>
</TR>
<TR>
<TD ALIGN="CENTER">
<input type="submit" value="SEARCH USING ROOM NO" name="button" />
</TD>
</TR>
<TR>
<TD>

25
<input type="submit" value="SEARCH USING NAME" name="button" />
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
<input type="submit" value="BACK" name="button" />
</TD>
</TR>
</TABLE>

</CENTER>

</form>

</body>>

</html>
</html>

BILLING FORM
<%--
Document : BILLING
Created on : Jul 17, 2009, 1:04:16 PM
Author : ROHIT GOYAL & PRADEEP
--%>

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


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> BILL FORM </title>
</head>

<body background="image\back.jpg" height="100%">

<form action="./SER7" method="POST">

<CENTER>
<TABLE border="2" BGCOLOR="blue">
<TR>
<TH ALIGN="center"colspan="2" >
<h1><font clor="blue"> BILL FORM </font> </h1>
</TH>
</TR>
<TR>
<TD>

26
<b> ROOM NUMBER </b>
</TD>
<TD>
<input type="text" name="ROOM_NO" value="" />
</TD>
</TR>
<TR>
<TD>
<input type="submit" value="BILL" NAME="button" />
</TD>
<TD>
<input type="submit" value="CANCEL" NAME="button" />
</TD>
</TR>
</TABLE>
</CENTER>

</form>

</body>

</html>

3.2 Coding for servlets

SER.JAVA

package PACK;
import java.io.*;
import java.net.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
*
* @author ROHIT GOYAL & PRADEEP
*/
public class SER extends HttpServlet {
protected void service(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");

27
PrintWriter out = response.getWriter();
try
{
String w = request.getParameter("button");
if (w.equals("BACK")) {
RequestDispatcher rd = request.getRequestDispatcher("/WELCOME.jsp");
rd.forward(request, response);
}
if (w.equals("CANCEL")) {
RequestDispatcher rd = request.getRequestDispatcher("/LOGIN.jsp");
rd.forward(request, response);
}

String s = request.getParameter("USERNAME");
String s1 = request.getParameter("PASSWORD");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:hotel1",
"hotel", "management");
String q = "select * from login where username='"+s+"' and
password='"+s1+"'";
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(q);

if(rs.next())
{
RequestDispatcher rd = request.getRequestDispatcher("/MAINMENU.jsp");
rd.forward(request, response);
}
else
{
request.setAttribute("key", "plz enter valid userid and password !");
RequestDispatcher rd = request.getRequestDispatcher("/LOGIN.jsp");
rd.forward(request, response);
}
}
catch(Exception ex)
{
out.println(ex);

28
}
}
}

SER9.JAVA
package PACK;

import java.io.*;
import java.net.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
*
* @author ROHIT GOYAL & PRADEEP
*/
public class SER9 extends HttpServlet {

protected void service (HttpServletRequest req, HttpServletResponse res)


throws ServletException, IOException {

PrintWriter out = res.getWriter();

try {

String s1 = req.getParameter("button");

if (s1.equals("BACK")) {
RequestDispatcher rd = req.getRequestDispatcher("/SEARCH.jsp");
rd.forward(req, res);
}

String s=req.getParameter("ROOM_NO");
int a=Integer.parseInt(s);

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection
("jdbc:odbc:hotel1","hotel", "management");
Statement stmt=con.createStatement();

String q="select * from entry where room_no="+a;


ResultSet r2 = stmt.executeQuery(q);

boolean b=r2.next();

if(b==false) {
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet SER7</title>");
out.println("</head>");
out.println("<body>");

29
out.println("<center>");
out.println("<H2>"+"<FONT COLOR='RED'>"+ "!ROOM IS NOT
BOOKED"+"</FONT>"+"</H2>");

out.println("<form action='./SEARCHINGROOMNO.jsp' method='Post'>");


out.println("<input type='submit' value='Back'>");
out.println("</form>");

out.println("</center>");
out.println("</body>");
out.println("</html>");

}
else {

String w1 = r2.getString("room_no");
String w2 = r2.getString("title");
String w3 = r2.getString("name");
String w4 = r2.getString("date_in");
String w5 = r2.getString("month_in");
String w6 = r2.getString("year_in");
String w7 = r2.getString("date_out");
String w8 = r2.getString("month_out");
String w9 = r2.getString("year_out");

out.println("<html>");
out.println("<head>");
out.println("<title></title>");
out.println("</head>");
out.println("<body>");
out.println("<center>");
out.println("<table border='2'>");

out.println("<tr>");
out.println("<th COLSPAN='2'>");
out.println("<h2>");
out.println("CUSTOMER INFORMATION");
out.println("</h2>");
out.println("</th>");
out.println("</tr>");

out.println("<tr>");
out.println("<td>");
out.println("ROOM NUMBER");
out.println("</td>");
out.println("<td>");
out.println(w1);
out.println("</td>");
out.println("</tr>");

out.println("<tr>");
out.println("<td>");
out.println("NAME");
out.println("</td>");
out.println("<td>");
out.println(w2+" "+w3);
out.println("</td>");

30
out.println("</tr>");
out.println("<tr>");

out.println("<tr>");
out.println("<td>");
out.println("DATE_IN");
out.println("</td>");
out.println("<td>");
out.println(w4+"/"+w5+"/"+w6);
out.println("</td>");
out.println("</tr>");

out.println("<tr>");
out.println("<td>");
out.println("DATE_OUT");
out.println("</td>");
out.println("<td>");
out.println(w7+"/"+w8+"/"+w9);
out.println("</td>");
out.println("</tr>");

out.println("</table>");

out.println("<form action='./SEARCH.jsp' method='Post'>");


out.println("<input type='submit' value='Back'>");
out.println("</form>");

out.println("</center>");
out.println("</body>");
out.println("</html>");

}
catch(Exception ex) {
out.println(ex);
}
}
}

MYSELECTROOM.JAVA
package PACK;

import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;

31
/**
*
* @author ROHIT GOYAL & PRADEEP
*/

public class MySelectRoom extends HttpServlet {

protected void service(HttpServletRequest req, HttpServletResponse res)


throws ServletException, IOException {

String roomno= req.getParameter("room");


String s= req.getParameter("t1");
String s1= req.getParameter("t2");
String s2= req.getParameter("t3");
String s3= req.getParameter("t4");
String s4= req.getParameter("t5");

req.setAttribute("keyroomno", roomno);
req.setAttribute("key1", s);
req.setAttribute("key2", s1);
req.setAttribute("key3", s2);
req.setAttribute("key4", s3);
req.setAttribute("key5", s4);

req.getRequestDispatcher("/BOOKING.jsp").forward(req, res);
}
}

32
3.3 WEB.XML

<?xml version="1.0" encoding="UTF-8"?>


<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<servlet>
<servlet-name>SER5</servlet-name>
<servlet-class>PACK.SER5</servlet-class>
</servlet>

<servlet>
<servlet-name>SER2</servlet-name>
<servlet-class>PACK.SER2</servlet-class>
</servlet>

<servlet>
<servlet-name>SER6</servlet-name>
<servlet-class>PACK.SER6</servlet-class>
</servlet>

<servlet>
<servlet-name>SER8</servlet-name>
<servlet-class>PACK.SER8</servlet-class>
</servlet>

<servlet>
<servlet-name>SER9</servlet-name>
<servlet-class>PACK.SER9</servlet-class>
</servlet>

<servlet>
<servlet-name>SER4</servlet-name>
<servlet-class>PACK.SER4</servlet-class>
</servlet>

<servlet>
<servlet-name>MyROOMBOOKING</servlet-name>
<servlet-class>PACK.MyROOMBOOKING</servlet-class>
</servlet>

<servlet>
<servlet-name>SER7</servlet-name>
<servlet-class>PACK.SER7</servlet-class>
</servlet>

33
<servlet>
<servlet-name>SER11</servlet-name>
<servlet-class>PACK.SER11</servlet-class>
</servlet>

<servlet>
<servlet-name>SER12</servlet-name>
<servlet-class>PACK.SER12</servlet-class>
</servlet>

<servlet>
<servlet-name>MySelectRoom</servlet-name>
<servlet-class>PACK.MySelectRoom</servlet-class>
</servlet>

<servlet>
<servlet-name>SER</servlet-name>
<servlet-class>PACK.SER</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SER</servlet-name>
<url-pattern>/SER</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SER5</servlet-name>
<url-pattern>/SER5</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SER2</servlet-name>
<url-pattern>/SER2</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SER6</servlet-name>
<url-pattern>/SER6</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SER8</servlet-name>
<url-pattern>/SER8</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SER9</servlet-name>
<url-pattern>/SER9</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SER4</servlet-name>
<url-pattern>/SER4</url-pattern>
</servlet-mapping>

34
<servlet-mapping>
<servlet-name>MyROOMBOOKING</servlet-name>
<url-pattern>/MyROOMBOOKING</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SER7</servlet-name>
<url-pattern>/SER7</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SER11</servlet-name>
<url-pattern>/SER11</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SER12</servlet-name>
<url-pattern>/SER12</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>MySelectRoom</servlet-name>
<url-pattern>/myroom</url-pattern>
</servlet-mapping>

<session-config>
<session-timeout>
30
</session-timeout>
</session-config>

<welcome-file-list>
<welcome-file>WELCOME.jsp</welcome-file>
</welcome-file-list>

</web-app>

35
4. Result:Screen Shots

Welcome Form

36
Service Form

37
About us Form

Contact us Form

38
Room Information Form

39
Login Form

40
MDI Form

41
Booking Form

42
43
Cancellation Form

44
Search Form

45
Add Room Form

46
Delete Room Form

47
5.PROJECT TESTING AND DEBUGGING

Software testing is a critical element of the ultimate review of specification


design and coding. Testing of software leads to the uncovering of errors in
the software functional and performance requirements are met .Testing also
provides a good indication of software reliability and software quality as a
whole. The result of different phases of testing are evaluated and then
compared with the expected results. If the errors are uncovered they are
debugged and corrected. A strategy approach to software testing has the
generic characteristics:
 Testing begins at the module level and works “outwards” towards the
integration of the entire computer based system.
 Different testing techniques are appropriate at different points of time.
 Testing and debugging are different activities, but debugging must be
accommodated in the testing strategy

Any engineered product can be tested in one of the two ways:

 Knowing specified function that a product has been designed to perform;


tests can be conducted that demonstrates that each function is fully
operational while at the same time searching for errors in each function.
This is called Black Box testing.

 Knowing internal working of the project, test can be conducted to ensure


that all internal operations are performed according to specification and all
internal components have been adequately exercised. This is called White
Box testing.

In both the case, the intent is to find maximum no. of errors with the minimum
amount of effort & time
.

48
5.1 Testing objective

 Testing is the objective of executing a program with the intent of finding an


error.
 A good test case is one that has a high probability of finding as an-yet-
undiscovered error.
 A successful test is one that uncovers as an- yet-undiscovered error.

5.2 Testing principle

 All tests should be traceable to customer requirement.


 Tests should be long planned long before testing begins.
 Testing should begin “in small” & progress towards testing “in the large”.
 Exhaustive testing is not possible.
 To be more effective, testing should be conducted by an independent.

5.3 Unit Testing

Unit testing focuses verification effort on the smallest unit of the software design
the software component and module. The unit testing is white box oriented & the
step can be conduct in parallel for multiple components. The test that occur as
part of unit tests: The module interface is tested to ensure that information
properly flow into and out of the program unit under test. The local data structure
is examined to ensure that data stored temporarily maintains its integrity during all
steps in an algorithm’s execution. Boundary conditions are tested to ensure that
the module operates properly at boundaries established to limit or restrict

49
processing. All independent paths through the control structure are execution to
ensure that all statement in a module have been executed at least once. And
finally all error-handling paths are tested.

5.4 Testing Process

Levels of testing Test Test


Plan Procedures

Test Case
Specification

Yes
Test Case
Execution
Is Error
Uncovered Test Case
? Analysis

No

Test Report

50
51
5.4 Debugging
Debugging occurs as a consequence of successful testing i.e. when a test case
uncovers an error, debugging is the process that results in identifying the location
of error ad the removal of error. The poorly understood mental process that
connects a symptom to cause is debugging. This process will always have one of
the two outcomes:
u The cause will be found, corrected and then removed or
u The cause will not be found. In the latter case the person performing
debugging may suspect a cause, design a test case to help validate his
suspicion, and then work towards the correction of errors in the interactive
fashion.
Following three approaches of debugging were used:
u Debugging by Induction
u Debugging by Deduction
u Backtracking

52
6.Conclusion and Further Scope Of Project

Software development is an unlimited perspective. There is no end in


its development process. However sophisticated the project there is
always room for new additions. Hence this project can also be
integrated to a very large scale. This project can be further expanded
to the complete system of inventory.

Goal achieved: The System is able provide the interface to the user so that he
can replicate his desired data. .

User friendliness: Though the most part of the system is supposed to act in the
background, efforts have been made to make the foreground interaction with user
as smooth as possible. Also the integration of the system with Hotel Management
project has been kept in mind throughout the development phase.

53
7.Methodology

 Start Tomcat server 5.5


 Create a datasource in SQL Server to make connectivity with specified
name & password.
 Copy the Project folder in C:\Tomcat5.5\work\catelina\localhost
 Go to Internet Explorer → insert address in address bar →
http://localhost:8080\ProjectName
 Click on GO button

54
BIBLIOGRAPHY & REFRENCES

Books References

• Java 2 :The Complete Reference, Patrick Naughton &


Herbert Schildt, Tata McGraw Hill,1999
• Programming With Java, 2nd Edition, E. Balagurusamy,
Tata McGraw Hill,1998

Web References
• www.ask.com
• www.google.com
• www.sunmicrosystem.com

55

You might also like