You are on page 1of 64

A PROJECT REPORT ON

HOTEL MANAGEMENT SYSTEM


SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE AWARD OF
THE DEPLOMA IN COMPUTER SCIENCE & ENGINEERING

SESSION : 2023 - 2024

Project Guide Name :- Submitted BY


External Guide :-
Anuj Shukla Name of Student :- Suryabhan
Enrollment No. :- E2127213550055
Internal Guide :

(Diploma faculty) :- Suryabhan Study Institute code No.:- 2721

Submitted To :
GOVERNMENT POLYTECHNIC BIGHAPUR,
UNNAO
COLLEGE OF MANAGEMENT STUDIES

Project Certificate
This is to certify that the project report entitled HOTEL MANAGEMENT submitted to
Government Polytechnic Bighapur, Unnao, in partial fulfillment of the requirement for the award of
the degree of BACHELOR OF COMPUTER APPLICATIONS (BCA), is original work carried out by
myself Mr Suryabhan with enrolment no. E21272135500055 Under the Supervision of Prof. –
AVINASH VERMA.

The matter embodied in this project is genuine work done by myself and has not been submitted whether
to this University or to any other University / Institute for the fulfillment of the requirement of any
course of study.

Date:

Name & Signature of the Student

SURYABHAN

suryaaydv@gmail.com

9198293038

Dariyav Kheda, Sareni, Raebareli

Verified by the Supervisor

Name & Signature of the Supervisor

Mr. Avinash Verma

Date: ………………..
Self-Certificate
This is to certify that the Major Project report entitled “ HOTEL MANAGEMENT ” is done
by me, and it is authentic work carried out for the partial fulfillment of the requirements for the award
of the Diploma in Computer Science & Engineering under the guidance of Mr. ANUJ SHUKLA. The
matter and software embodies in this project has not been submitted earlier for award of any degree or
diploma to the best of my knowledge and believes.

Signature of Student
Suryabhan
(Enrollment No :- E21272135500055)
Certificate from Project Guide
This is certify that this Major Project entitled " HOTEL MANAGEMENT " submitted in
partial fulfillment of the requirements for the award of the DIPLOMA IN COMPUTER SCIENCE &
ENGINEERING in session (years 2023 to 2024) to the GOVERNMENT POLYTECHNIC
BIGHAPUR, UNNAO done by SURYABHAN is an authentic work carriedout by them.
The matter and software embodied in this project work has not been submitted earlier for the award of
any degree or diploma to the best of my knowledge and belief.

( Project Guide )
GOVERNMENT POLYTECHNI BIGHAPUR, UNNAO
Project Work Evaluation

1. Candidates Roll No ……………….


Name ………………………………………………….
Email …………………………………………………………………………….

2. Project Title ……………………………………………………………………


3. Software Base ………………………………………………………………………..
4. Sponsoring Institute Address
…………………………………………………………………..

5. Submitted For Course & Year


……………………………………………………………….

6. Study Center Code, Name, Address


…………………………………………………………………
……………………………………………………………………………………………
…….

7. Total Internet assessment and exam work evaluation


…………………………………………………
Marks out of …………………………………………..
Details of evaluation along
With name and sign teacher:

Particulars Mark out of Marks Awarded Internal


Examiner’s
Name &
Signature

8. Forwarding by Head of Study center


…………………………………………….
(Signature, Name & Study Centre Seal)
…………………………………………………..

9. Remarks of Study center ……………………………….

10.University Project Examiner’s Evaluation Total Marks awarded


……………….. out of …………..
Details Evaluation along with
Name & sign of University
Examiner

Particulars Mark out of Marks Awarded Internal


Examiner
‘s Name
&
Signature

Remarks of University Examiner …………………………


Index

Sl.No Contents Page No


01 Introduction

02 Objective

03 System Analysis

04 Identification of Need

05 Preliminary Investigation

06 Feasibility Study

07 Software Requirement Specification (SRS)

08 Software Engineering Paradigm Applied

09 Data model, class diagram, ERD, DFD

10 System Design

11 Data integrity and constraints

12 Technology Applied

13 User Interface Design

14 Reports

15 Coding

16 Complete project coding

17 Comments and description

18 Code efficiency

19 Error Handling

20 Validation Checks

21 Implementation and Maintainance

22 Testing

23 Testing techniques

24 Testing strategies

25 Modularization Details

26 System Security measures

27 Database/data security

28 Creation of user profile and access rights

29 Cost Estimation of the project


30 PERT chart, Gantt chart

31 Future scope of the project

32 Bibliography

33 Glossary

ACKNOWLEDGMENT

“Task successful” makes everyone happy. But the happiness will be gold without glitter if we didn’t
state the persons who have supported us to make it a success. Success will be crowned to people who
made it a reality but the people whose constant guidance and encouragement made it possible will be
crowned first on the eve of success.
This acknowledgement transcends the reality of formality when we would like to express
deep gratitude and respect to all those people behind the screen who guided, inspired and helped me for
the completion of our project work.
I consider myself lucky enough to get such a good project. This project would add as
an asset to my academic profile. I would like to express my thankfulness to my project guide, Mr.
ANUJ SHUKLA for hir constant motivation and valuable help through the project work, and I
express my gratitude to Prof. (Mr.) ANUJ SHUKLA, Course Coordinator of BCA (MCU)
DEPARTMENT, CMS, for his constant supervision, guidance and cooperation throughout the project.
I also extend my thanks to my Team Members for their co-operation during my project
work. Finally I would like to thanks my friends for their co-operation to complete this project.

SURYABHAN
ENROLLMENT NO. – E21272135500055
Introduction:
HOTEL Management System is the administration of airports and HOTELs. It includes the activities
of setting the strategy of airports to gather and provide information on HOTEL commercial and
operational priorities. It covers a broad overview of the HOTEL management. It is also studied as a
branch of study that teaches management of airport and HOTELs. This provides a broad overview of
the HOTEL industry and creates awareness of the underlying marketing, financial, operational, and
other factors influencing HOTEL management. This study provides information on HOTEL
commercial and operational priorities, along with teaching the key characteristics of aircraft selection
and the impact of airport decision making. It provides some amount of automation in HOTELs
management and helps HOTEL system in making their business more efficient. An added attraction
for their potential customers. It will also show the attitude of the management that they are aware to
the newly introduced technology and readyto adopt them.
1.1 Problem Definition

This project on Flight Management System is the automation of registration process of


HOTEL system. The system is able to provide much information like passenger’s details,
flight details and the booking details. The system allows us to add records when a passenger
reserves a ticket. It also allows to delete and update the records based on passenger’s
requirements. For data storage and retrieval we use the MySQL database. It enables us to add
any number of records in our database from the frontend which is Java core. Any changes
made in the frontend will be reflected at the backend.

1.2 Need
Electronically handling of flight’s record to enhance the accuracy, flexibility, reliability and to remove
the human’s error. An HOTEL provides air transport services for passengers, generally with a
recognizeoperating. To provide accurate information about the addition, deletion and modified record.
To provide, efficient, accurate, reliable, fast, and robust structure that can handle any number of
records. The global HOTEL industry continues to grow rapidly, but consistent and robust profitability
is elusive.Measured by revenue, the industry has doubled over the past decade, from US$369 billion in
2004 to a projected $746 billion in 2014, according to the International Air Transport Association
(IATA).Muchof that growth has been driven by low-cost carriers (LCCs), which now control some 25
percent of the worldwide market and which have been expanding rapidly in emerging markets; growth
also came from continued gains by carriers in developed markets, the IATA reported. Yet profit
margins are still low, less than 3 percent overall. In the commercial aviation sector, just about every
group in the aviation industry chain—airports, airplane manufacturers, jet engine makers, travel
agents, and service companies, to name a few—turns a profit. It is seemingly ironic that the HOTEL
companies that actually move passengers from one place to another, the most crucial link in the chain,
struggle to make a profit.
A few factors that directs us to develop a new system are given below -:
1) Faster System
2) Accuracy
3) Reliability
4) Informative

5) Reservations and cancellations from any where to any place

Objective:
This project on HOTEL Management System is the automation of registration process of HOTELs
system. The system provides information like passenger’s information, flight information, list of all
passengers, it allows storing and retrieving data related to the HOTEL industry and make transactions
related to air travel etc. The system also allows us to add records when a passenger reserves a ticket.
For data storage and retrieval we use MySQL Database. It enables us to add any number of records in
our database. The project “HOTEL Management System” comprises of a large number of flights
which belong to a particular HOTEL. The system we have implemented manages different objects
viz.

· HOTEL

· HOTEL Employees

· Customers/Traveller

Each of these accesses a database schema which has corresponding tables.

Functionalies provided by HOTEL Management System:


Some important modules are listed below:
User registration module:
This module is helpful for the registration of the new customer.
Login module:
This module performs the login of the registered customer. In this module Customer-id and password
is verified.
Reservation module:
This module performs the reservation of the ticket to the registered module.
Cancellation module:
This module performs the cancellation of the reserved ticket.
System Analysis:

Here requirements for both the system and the software are documented and reviewed
with the customer as well as companies. More focus is given on the software. The analyst
interacts and understands the different functionalities, performance of the software. During the
design phase requirements are translated into a representation of the software that can be coded.
Here focus is given on the different attributes of a program – Data structures, Software
Architecture, interface representation and Algorithm details. The design is documented. Then
a SRS – System Requirement Specification report is prepared and given to the company.
Systems analysis is an important phase of the System Development Life Cycle. Hence
we thoroughly observed the existing system, learn about their problems, define
customer’s\company’s needs & requirements and evaluated some alternative solution.

Identification of Need

HOTEL reservations system is an integrated passenger processing system, including inventory, fares,
ticket-less operations and credit card transactions. All communications are via TCP/IP network protocol
enabling the using of both intranet and internet communications world wide.
The solution includes several standard items, which are combined to provide an integrated solution with
interfaces to other business systeMr. The system is based on open architecture, using industry standard
equipment and software.

Preliminary Investigation

Preliminary Investigation of our system included collection of user needs, defining all
such areas to be computerized & suggesting some feasible solution towards fulfillment of user
requests. In our preliminary investigation we discussed many details of the functional parts and
the daily business activities of the client. We communicated with the concerned persons &
noted their requirements. In our initial observations we found the following areas that needed
to be computerized.
Getting the inventory of any particular company or product through manual method is time
consuming and some times becomes incorrect. Getting the statistics of receipt of item of any particular
company or as a whole is difficult. Getting the statistics of issue of item of any particular dealer or as a
whole is difficult. Getting the ageing of different dealer and products is difficult. To keep the track of
accounts details of different dealers and retailers .To keep the track of account details of companies the
company deals with.
While investigating the existing system, we found a lot of activities that needed to be
computerized / automated. All the paper work carried while investigating, showed the
complicacies and size of the project. Our very next step was to individualize their requirements
and put them into categories or groups. These categories / groups represented a department or
an activity or a set of activities that needed to be automated.
Feasibility Study

The project to be designed is actually beneficial or not from various angles is examined
here. For example if there are no technical persons to operate the project, whether the
development cost exceeds the budget allocated by the company, whether there are system
resources available or not to implement the solution.
For all such reasons a Feasibility study is performed to determination weather or not
the enterprise software solution is worth doing. The process followed in making this
documentation is called a feasibility study. Project specifications can only be finalized if
analysis confirms positive results from feasibility study. Thus since the feasibility study may
lead to the conferment of large resources, it become necessary that it should be conducted
completely and that no fundamental errors of judgments are made. In a quest to justify our
systems requirements specifications, we carried the following types of feasibility studies.

Technical Feasibility:
Technical Feasibility is defined as the availability of suitable technology and system
resources to support the enterprise software solution and adequate expertise to develop the
solution. Also it must be possible to implement the solution within a reasonable time. The
Client has already well-equipped systeMr. The existing PC’s comprised of efficient processors,
with appropriate size of RAM and Hard disk as well as printers. All these available hardware
met the hardware requirements of our proposed system. We were also provided with most of
the software required.

Economic Feasibility:

Economic Feasibility Analysis in the most frequently used technique for evaluating the
effectiveness of a proposed system. It is more commonly known as COST / BENEFIT
Analysis; the procedure to determine the benefits and savings that are expected from a proposed
system and compare them with costs.
If benefits outweigh costs, decision is taken to design and implement the system.
Otherwise, further justification or alternative in the proposed system will have to be made if it
is to have a chance of being approved. This is an ongoing effort that improves in accuracy at
each phase of the system life cycle. The existing system had everything except the network
between the individual stand-alone systeMr. The expenses needed to establish the network
would be worth spending, as it would in all means benefit the overall functioning of the
organization.
Operational Feasibility:

Operational Feasibility is defined as the suitability of the solution from the standpoint
of the people who will have to use that solution. In context of our proposed system we covered
the following issues under operational feasibility

What changes will be brought with the system?

The proposed system is targeted towards faster and secured data processing. Large sets
of records maintained manually and stored in files and folders would be replaced by convenient
and secured way of processing. Not only the proposed project will benefit the existing system,
but also it will make the system robust with higher degree of overall performance and
productivity.

What Organizational Structures are disturbed?

Basically there is least or approximately nil disturbances, needed to be brought about


in the existing organizational structure, for our proposed project to be fully operational.

Do we posses the technical expertise and is the schedule reasonable?

The technical persons available at the client site are well versed with general-purpose
software available. There would be less training effort required for the technical staff to operate
on our proposed system. Hence, little time would be wasted (after the implementation &
testing), for our project to be fully operational.
The company is having existing PC’s comprised of efficient processors, with
appropriate size of RAM and Hard disk as well as printers. All these available hardware met
the hardware requirements of our proposed system. It is also having a well-networked
infrastructure. Also the cost/benefit analysis determines the benefits and savings that are
expected from a proposed system and compare them with costs. And here the benefits outweigh
costs, in such situation decision is taken to design and implement the system. The company is
also having some skilled manpower having the operational knowledge of PCs. So the proposed
system is feasible in every angle.

Analysis:
Existing System
HOTEL Reservation System is a System including Inventory, Fares, Enquiries, and Reservations etc.
All user/agents are allocated a SINE code which is used during sine-on and then appended to all
transactions carried out by the agent for security purpose.
It has the following Dis-advantages:
1> Reservations does not support up to 1 year.
2> Accessing and updating the system is slow.
3> It is a file based processing.

Proposed System:
Using the distributed technology we can handle these problems easily. In general a distributed process
means that a program in execution makes use of resources in other machine. The two technologies for
distributed processing available are J2EE and .NET. In the “HOTEL reservation system” J2EE is used
for managing distributed systeMr. So that even if the HOTEL system has lot of branches and they are
located at different places, we can handle the management of service and guarantee.
The proposed system for the problem is “HOTEL reservation system”, a web based system that
allows online reservations. The system is divided into three layers namely presentation layer, business
layer and data layer. The presentation layer is at the client side. At server side, business layer and data
layerreside.

The system requires a server side technology for its implementation. J2EE platform is chosen for
implementing the system. At server side Servlet plays the role for business layer and JDBC for the
data layer.

It has the following advantages.


1> Reservations are supported up to 1 year.
2>Accessing and Updating the system is Fast.
3>It is Implemented using the concepts of RDBMR.

Problem Statement
The objective of the project is to design and implement the software which helps the HOTEL System
employees to issue reservation tickets for various Air flights and maintain the records of various
passengers and provide quick services to the passengers. It provides the following services
• Reservation and Cancellation of the HOTEL tickets.

• Maintains the passengers’ records.

• Reports about the daily transactions of the HOTEL System.

• Quick Response to the passengers.

• Automation and integration of HOTEL system functions.


• Higher productivity and effective management
• Security and protection of confidential data.

• Transaction management and routing.

Object Modeling:

The object model describes the structure of objects in a system. Their identity, their relationships to
other objects, their attributes, and their operations. The object model provides the essential framework
into which the dynamic and functional models can be placed.

Our goal in constructing an object model is to capture those concepts from the real world that are
important to an application.

The object model is represented graphically with object diagrams containing object classes. Classes
are arranged into hierarchies sharing common structure and behavior and are associated with other
classes. Classes define the attribute values carried by each object instance and the operations which
each object performs or undergoes.

Identification of Object classes

The first step in constructing an object model is to identify relevant object classes from the application
domain. Objects include physical entities, such as houses, employees, and machines, as well as
concepts, such as trajectories, seating assignments, and payment schedules. All classes must make sense
in the application domain; avoid computer implementation constructs, such as linked lists and
subroutines. Not all classes are explicit in the problem statement; some are implicit in the application
domain or general knowledge.

Identification of Associations:

Any dependencies between two or more classes is an association. A reference from one class to another
is association. Association often correspond to verb phrases. These include physical location, directed
actions, communication, ownership, or satisfaction of some condition. Extract all the candidates from
the problem statement.

Following are the Associations:

• Only the authorized customers are entered into the system.


• The system is responsible for controlling the operations and giving the confidential details to only
authorized customers.

Identification of Attributes:

Attributes are properties of individual objects. Attributes should not be objects. Use an association to
show any relationship between two objects. Attributes usually correspond to nouns to follow by
possessive phases. Adjectives often represent specific enumerated attribute values. Attributes are less
likely to be fully described in the statement of problem. The knowledge must be drawn from the
application domain and the real world to find out the attributes.
Class Attributes
Registration_info FirstName,LastName,Adress,
ContactNo,City,State,Country,
Gender,Email_Id,
Customer_id, password

Login_info Customer_id, password


Reservation_info Customer_id, flight_num,
Flight_name, derarture_time,
Arrival_time, origin,
Destination,Num_of_seats

Flight_info Flight_num, flight_name,


Departure_time, Arrival_time,
Origin,destination,num_of_seats,
Country_name
Price_info Class,customer_name, seat_num,price
Transactio_info Credit_num, Credit_type, Pin_num
Airport_info Country_name, Airport_name
Flight_cancellation Customer_id, Flight_id, origin, Destination,
Flight_name, departure, Arrival,seat_num

DFD:
Data flow diagrams (DFD) depict information flow and the transforms that are applied as data
move from input to output. It is the starting point of design phase that functionally
decomposes the requirement specifications down to the lowest level details. Thus a DFD
describes what data flows (Logically) rather than how they are processed. So, it does not
depend on hardware, software or data structures.

It is one of the most important tools used during system analysis. It is used to model the
system components such as the system process, data used by the process any external that
interact if the system and information flows in the system.

Portability:

DFD’s are made up of number of symbols, which represents system components. Data flow
modeling used four kinds of symbols. These symbols are used to represent four kinds of
system components process, data stores, data flows and external entities.

Process:

Processes show what system does. Each process has one or more data inputs and produces one
or more outputs. Circles in DFD represent processes.

Data stores:

A Data store is a repository of the data. Processes can enter data in to a store or retrieve data
from the data store. Parallel lines in the DFD represent each data store.
External Entities:

External entities are outside the system but they either supply input data in to the system or
use the system out. They are entities on which the designer has no control. They may be
organization’s customers or with which the system interacts. These are represented by
rectangles in the DFD.

Data flows:

Data flow model passage of data in the system and are represented by lines joining system
components. An arrow indicates the direction of flow and the line is labeled by the name of
the data flow. Flow of data system can takes place.

• Between two processes.


• From a data stores to a process.

• From a proce4ss to process.

• From an external entity to process.

• From a process to an external entity.

Gives to the

Customer

Enter Gets
HOTEL
New Reservation
Custome System

Selects the
operation

Reservation
ER Diagram:

An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships


between entities in a database. ER diagrams often use symbols to represent three different types of
information. Boxes are commonly used to represent entities. Diamonds are normally used to represent
relationships and ovals are used to represent attributes. If the application is primarily a database
application, the entity-relationship approach can be used effectively for modeling some parts of the
problem. The main focus in ER modeling is the Data Items in the system and the relationship between
them. It aims to create conceptual scheme for the Data from the user’s perspective. The model thus
created is independent of any database model. The ER models are frequently represented as ER
diagram. Here we present the ER diagram of the above mentioned project.
Login

Software Requirement Specification


Software Requirement Specifications
Operating System Front End Back End Server Documentation: Windows 10

Customer HOTEL
Reservationsystem

Performs
Gives
Response

Operations

Frontend Software: Java NetBeans 8.2: JDK 8


Backend Software: MySQL
Hardware Requirement Specifications
Computer Processor Core i3 Processor Speed 2.3 GHz Processor Hard Disk 400 GB or more RAM Min
2GB

Software Engineering Paradigm applied

Software process model is a road map or framework for the tasks that are required to
build high-quality software. Thus we can define this as the foundation for Software
Engineering. The software process defines a systematic disciplined quantifiable approach to
the development, operations and maintenance of the software. The key process areas form the
basis for management control of software projects and establish the contest in which technical
methods are applied, work products (modules, documents, data, reports, forms etc.) are
produced, milestones are established, quality is ensured, and changes is properly managed.
As selection of a software process depends mostly on the problem domain or the type
and size of the Project, it became a real tough task for us to select a particular path / process
out of a range of software processes modules available. In our Project, we had a range of tasks
and a varied set of objectives that spread over different domains viz, Stock Management,
Processing of Sales Orders & Purchase Orders, Raising and Managing Customer orders,
managing the Stock to avoid Stock out costs and the details of Finance requirement to meet all
the needs. Also generating information for the top-level management personals. Working out
a suitable process model for such a system was a difficult task.
Initially considering the size of the project and information availability we were
inclined to adopt RAD – Rapid Application Development Model, as it would have helped in
obtaining prototypes in increments. But as we started dividing the whole project into modules
and tasks, we learnt that using prototyping model (as Software Engineering Paradigm) would
be more complicating & time consuming. The reason behind it was the size of modules, which
would have consumed a lot more time using prototype model than other models.
The software design principle followed here is RAD Rapid Application Development
model with short development cycle.
As the requirements are well understood and project scope is constrained the RAD
process enables a development team to create a fully functional system within very short time
period. The requirements gathering process is intensified and focused specifically pm software
to understand the nature of the programs to built. The software engineer must be understand
the information domain for the software, as well as required function; behavior performance
and interfacing for both systems and software are documented and reviewed with the customer.
This system view is essential when software must interface with other documents such as
hardware, people & database. System engineering and analysis encompasses requirements
gathering at the system level with a small amount of top level of analysis business level and at
the business area level. The Phases of RAD models are:
1. Business Modeling:

The information and data flows among different business entities i.e. the different
modules of the application are modeled here. Also the business functions are identified and the
processes that are required to implement the business functions are defined. All the inputs,
outputs and information flow among different entities are also identified.
2. Data Modeling:

The various data objects required to support the information flow among different
models are modeled here. The relationships between data objects are also defined. Different
levels of data flow diagrams are designed.

3. Process Modeling:

The entire data objects models were transferred to achieve the information flow. The
different process required, for adding, modifying, deleting or retrieving to or from a data object
is defined. The relationships between the data objects are also defined. Input and Output data
objects are the indication for the application of process model to implement RAD.

4. Application Generation:

Here the actual coding of the business functionalities are designed by using fourth
generation techniques. To reuse existing programs, reuse components may also be created. We
have selected as per the client requirements PHP with MySQL as it is Object Oriented.

5. Testing:

As in RAD, more emphasis is given on the reuse of components, many of the program
components have already been tested which reduces the overall testing time. All other
components and their interfaced are tested.

System Design

The problem analysis is the most important phase in any project. Only after knowing precisely what the
problem is could we successfully eliminate it. The identification of the root problem is necessary.
We were able to discuss with the personnel of various departments and gather information and we got
a clear picture of what the existing problem were and what our jobs was to eliminate them by
redesigning a new design.

Design is a multi step process that focuses on data structure, software architecture, Procedural details
(algorithms etc) and interface between the modules. The design process also translates the requirements
into the representations of the software that can be assessed for quality before coding begins.

Computer software design changes continually as new methods, better analysis and border
understanding evolve. Software design is at a relatively early flexibility and quantitative nature that is
normally associated with more classical engineering design disciplines. However, techniques for
software design to exist criteria for design qualities are available and design notation can be applied.

Once the software requirements have been analyzed and specified, software design is the first of three
technical activities- Design code and test that are required to build and verify the software. Each activity
transforms information in a manner that ultimately results in validation of the computer software.

The importance of the software design can be started with a single word quality. Design is the place
where quality fostered in software development. Design provides us with representations of the
software that can be accessed for quality.
Design is the only way that we can accurately translate a customer’s requirements into a finished
software product or system. Without design, risk of building an unstable system exists one that will fail
when small changes are made. One that may be difficult to test.
Thus the system design includes following three types of design:

Data Design: The data design transforms the information domain model created during analysis into
the data structures that will be required to implement the software.

Architectural Design: The architectural design defines the relationship among the major structural
components of the program.

Procedural Design: The procedural design transforms structural components into a procedural
description of the software. Source code is generated and testing is conducted to integrate and validate
the software.
Thus, system design is a solution, a “how to” approach to the creation of the new system.
Features of Desktop Application Applied :
Client server architecture:

Client-server computing or networking is a distributed application architecture that


partitions tasks or work loads between service providers (servers) and service requesters, called
clients. Clients initiate communication sessions with servers which await (listen to) incoming
requests.

Client-server describes the relationship between two computer programs in which one
program, the client program, makes a service request to another, the server program. Standard
networked functions such as email exchange, web access and database access, are based on the
client-server model.

Specific types of clients software include web browsers. Specific types of servers
include web servers, ftp servers, application servers, database servers, mail servers, file servers,
print servers, and terminal servers.

Any network-based software system that uses client software to request a


specific service, and corresponding server software to provide the service from another computer
on the network.

The architecture of an application can be divided into following types:-

(1) 2-Tier Architecture

(2) 3-Tier Architecture

(3) N-Tier Architecture

(4) Enterprise Architecture

2- Tier Architecture

This approach makes a separation between application layer or application logic and data layer.
In the below fig. the 1st layer is known as application layer. This results in the structure shown in
figure 2:

Figure2, The 2-Tier Architecture

The advantage with this architecture is that, because of two separation data can be stored on a
single host and can be shared by multiple application, i.e. the resource sharing becomes more
efficient. This also removes all the complexities of communicating with the database to a separate
layer.
The disadvantage with the 2-Tier architecture is its maintainability because, each client point
holds the complete application and the interface together, therefore even a single change in the
application needs to be updated at each client architecture.

3- Tier Architecture

This architecture overcomes the limitations of a 2-Tier system. Under this architecture, the
application is separated into three different layers with a set of well defined interfaces. This should
then enable components in one layer to be modified without requiring changes any changes to
components in other layers. For example, changing the file system from one DBMS to another, or
changing the user interface from one system to another (e.g. from client/server to the web).

Under this architecture the application broken into following:-

-Presentation/User Interface Layer

-Application/Business Layer

-Data Layer

Figure 3, The 3-Tier Structure

The Presentation Layer holds the user interface for interaction with the application.

The middle layer i.e. the business layer holds the application logic i.e. basically the code called
by the user through presentation layer to retrieve the desired data.

The Data Layer holds the data to be implemented by the application/business layer. The source
of data may be SQL Server, Oracle, Sybase or XML documents.

The main advantage of this structure over the 2-Tier system is that all business logic is
contained in its own layer and is shared by many components in the presentation layer. Any changes
to business rules can therefore be made in one place and be instantly available throughout the whole
application.
N-Tier Architecture

The name implies a structure which contains ‘N’ number of tiers where ‘N’ is a variable
number. This is usually achieved by taking a component in one of the standard layers of the 3-Tier
structure and breaking it down into subcomponents, each performing a specific low-level task.

More specifically under N-Tier architecture, the middle layer containing the application logic
is functionally divided into multiple components, each one carrying a particular operation.

For example, the designers of a project have broken down each of the initial three layers into
something which resembles the structure shown in figure 4:

Figure 4 - Splitting 3 layers into ‘N’ layers

Enterprise Architecture
This architecture is an N-Tier architecture, but the enterprise architecture is capable to manage
multiple application types whereas N-Tier is capable to deal with one application only.The
application under this architecture can handle applications of different architectures.

Advantages

• In most cases, client-server architecture enables the roles and responsibilities of a


computing system to be distributed among several independent computers that are known
to each other only through a network. This creates an additional advantage to this
architecture: greater ease of maintenance.
• All the data is stored on the servers, which generally have far greater security controls
than most clients. Servers can better control access and resources, to guarantee that only
those clients with the appropriate permissions may access and change data.
• Since data storage is centralized, updates to that data are easier to administer.
• It functions with multiple different clients of different capabilities.

Coding:

Comments & Descriptions


The coding the builds the complete project is purely object oriented. Traces have been
given to modularize the different functionalities of the system, such as connectivity with the data source
is carried out by defining a separate method, filling of combo boxes have been done using respective
methods with a target for better understanding, debugging and manageability.

Code Efficiency:

The task of coding is carried out once the analysis and design is over. It depends on how well
the analysis and design is done. Thus, the better the analysis and design, easier it becomes for the
programmer to code. But the code has to be judged for its efficiency and worthiness. Code efficiency
defines how efficient is the code generated and whether it satisfies the needs as expressed in the design,
or not. Thus, it reflects the overall quality of the software. Code efficiency comes in conjunction with
code optimization, total time spent on coding and validation specification. “Optimized code may not
always be efficient, but efficient code always satisfies the user requirements”

When an application is created it is expected to give the best results using minimal computer
resources, such as memory (RAM) and hard disk space. In order to ensure that the application uses the
minimum resources, it is needed to fine-tune the application for improving its performance. The steps
involved in fie-tuning an application are known as optimization. In the present system, the process of
optimization started from the designing stage and continued till the development and distribution stage.
The optimization was done for increasing
Execution speed,
Display speed and
Proper utility of available memory space
Error Handling

Error handling is the process to provide proper methodology to implement error


detection and correction as a continuous process during the development process. This process has been
applied at each phase of the software development process of the current system. Moreover to provide
run time error handling, the powerful exception handling has been applied at the points to minimize
runtime failure and preserve the consistency of the system.

Validation Checks
Validation is an important part of the application being designed. This ensures the data
consistency, protects accidentally deletion, modification of the data. In the system validation checking
is applied both at database level and program level. At database level, while designing the tables to
contain the information it has been maintained to implement validation by defining constraints for
different data items in the application.
At program level proper measures and attention has been given to prevent the entry of
invalid data in to the system.

Code:

MainFrame class:
package HOTEL.management.system;

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class Mainframe extends JFrame{

public static void main(String[] args) {


new Mainframe().setVisible(true);
}

public Mainframe() {
super("HOTEL RESERVATION MANAGEMENT SYSTEM");
initialize(); }

private void initialize() {

setForeground(Color.CYAN);
setLayout(null);

JLabel NewLabel = new JLabel("");


NewLabel.setIcon(new
ImageIcon(ClassLoader.getSystemResource("HOTEL/management/system/icon/front.jpg")));
NewLabel.setBounds(0, 0, 1920, 990); add(NewLabel);

JLabel HOTELManagementSystem = new JLabel("AIR INDIA WELCOMES YOU");


HOTELManagementSystem.setForeground(Color.BLUE);
HOTELManagementSystem.setFont(new Font("Tahoma", Font.PLAIN, 36));
HOTELManagementSystem.setBounds(700, 60, 1000, 55);
NewLabel.add(HOTELManagementSystem);
JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar);

JMenu HOTELSystem = new JMenu("HOTEL SYSTEM");


HOTELSystem.setForeground(Color.BLUE);
menuBar.add(HOTELSystem);

JMenuItem FlightDetails = new JMenuItem("FLIGHT_INFO");


HOTELSystem.add(FlightDetails);

JMenuItem ReservationDetails = new JMenuItem("ADD_CUSTOMER_DETAILS");


HOTELSystem.add(ReservationDetails);

JMenuItem PassengerDetails = new JMenuItem("JOURNEY_DETAILS");


HOTELSystem.add(PassengerDetails);

JMenuItem SectorDetails_1 = new JMenuItem("PAYMENT_DETAILS");


HOTELSystem.add(SectorDetails_1);

JMenuItem Cancellation = new JMenuItem("CANCELLATION");


HOTELSystem.add(Cancellation);

JMenu Ticket = new JMenu("TICKET");


Ticket.setForeground(Color.RED);
menuBar.add(Ticket);

JMenu List = new JMenu("LIST");


List.setForeground(Color.BLUE);
menuBar.add(List);

JMenu Misc = new JMenu("MISC");


Misc.setForeground(Color.RED);
menuBar.add(Misc);

FlightDetails.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
new Flight_Info();
}
});
ReservationDetails.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){ try
{
new Add_Customer();
} catch (Exception e) {
e.printStackTrace();
}
}
});

PassengerDetails.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
try {
new Journey_Details();
} catch (Exception e) {
e.printStackTrace();
}
}
});

SectorDetails_1.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
try {
new Payment_Details();
} catch (Exception e) {
e.printStackTrace();
}
}
});

Cancellation.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
new Cancel();
}
});

setSize(1950,1090);
setVisible(true);
}
}
Login.java:
package HOTEL.management.system;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;

public class Login extends JFrame implements ActionListener{


TextField t1,t2;
Label l1,l2;
Button b2,b3,b4;
GridBagLayout gbl;
GridBagConstraints gbc;
Font f1,f2;

public Login(){
super("Login");

setBackground(Color.WHITE); f1 = new
Font("TimesRoman",Font.BOLD,20); f2 = new
Font("TimesRoman",Font.BOLD,15);

gbl=new GridBagLayout();
gbc=new GridBagConstraints();
setLayout(gbl);

l1 = new Label("Username");
l1.setFont(f1);

l2 = new Label("Password");
l2.setFont(f1);

t1 = new TextField(15); t2
= new TextField(15);
t2.setEchoChar('*');

b2 = new Button("Reset");
b2.setFont(f2);

b3 = new Button("Submit");
b3.setFont(f2);

b4 = new Button("Close"); b4.setFont(f2);

gbc.gridx=0; gbc.gridy=0;
gbl.setConstraints(l1,gbc);
add(l1);

gbc.gridx=2;
gbc.gridy=0;
gbl.setConstraints(t1,gbc);
add(t1);

gbc.gridx=0;
gbc.gridy=2;
gbl.setConstraints(l2,gbc);
add(l2);
gbc.gridx=2;
gbc.gridy=2;
gbl.setConstraints(t2,gbc);
add(t2);

gbc.gridx=0;
gbc.gridy=8;
gbl.setConstraints(b2,gbc);
add(b2);

gbc.gridx=2;
gbc.gridy=8;
gbl.setConstraints(b3,gbc);
add(b3);

gbc.gridx=4;
gbc.gridy=8;
gbl.setConstraints(b4,gbc);
add(b4);

b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);

setVisible(true);
setSize(400,250);
setLocation(400,200);
}

public void actionPerformed(ActionEvent ae){


if(ae.getSource()==b2){

t1.setText("");
t2.setText("");
}
if(ae.getSource()==b4){
System.exit(0);
}
if(ae.getSource()==b3){
try{
conn c1 = new conn();

String s1 = t1.getText();
String s2 = t2.getText();
String str = "select * from login where username = '"+s1+"' and password = '"+s2+"'";
ResultSet rs = c1.s.executeQuery(str);

if(rs.next()){
new Mainframe();
setVisible(false);
}else{
JOptionPane.showMessageDialog(null,"Invalid Login");
setVisible(false);
}

}catch(Exception e){}

}
}

public static void main(String[] args){


new Login();
}
}
Add_Customer.java:
package

HOTEL.management.syste

m;import java.awt.EventQueue;

import java.awt.*; import java.awt.event.*; import


java.sql.*; import javax.swing.*; public class
Add_Customer extends JFrame{ //Third Frame

JTextField textField,textField_1,textField_2,textField_3,textField_4,textField_5,textField_6;

public Add_Customer(){
getContentPane().setForeground(Color.BLUE);
getContentPane().setBackground(Color.WHITE);
setTitle("ADD CUSTOMER DETAILS");

setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
setSize(778,486); getContentPane().setLayout(null);

JLabel Passportno = new JLabel("PASSPORT NO");


Passportno.setFont(new Font("Tahoma", Font.PLAIN, 17));
Passportno.setBounds(60, 80, 150, 27);
add(Passportno);

textField = new JTextField();


textField.setBounds(200, 80, 150, 27);
add(textField);
JButton Next = new JButton("SAVE");
Next.setBounds(200, 420, 150, 30);
Next.setBackground(Color.BLACK);
Next.setForeground(Color.WHITE);
add(Next);

JLabel Pnrno = new JLabel("PNR NO");


Pnrno.setFont(new Font("Tahoma", Font.PLAIN, 17));
Pnrno.setBounds(60, 120, 150, 27);
add(Pnrno);

textField_1 = new JTextField();


textField_1.setBounds(200, 120, 150, 27);
add(textField_1);

JLabel Address = new JLabel("ADDRESS");


Address.setFont(new Font("Tahoma", Font.PLAIN, 17));
Address.setBounds(60, 170, 150, 27);
add(Address);

textField_2 = new JTextField();


textField_2.setBounds(200, 170, 150, 27);
add(textField_2);

JLabel Nationality = new JLabel("NATIONALITY");


Nationality.setFont(new Font("Tahoma", Font.PLAIN, 17));
Nationality.setBounds(60, 220, 150, 27);
add(Nationality);

textField_3 = new JTextField();


textField_3.setBounds(200, 220, 150, 27);
add(textField_3);

JLabel Name = new JLabel("NAME");


Name.setFont(new Font("Tahoma", Font.PLAIN, 17));
Name.setBounds(60, 270, 150, 27);
add(Name);

textField_4 = new JTextField();


textField_4.setBounds(200, 270, 150, 27);
add(textField_4);

JLabel Gender = new JLabel("GENDER");


Gender.setFont(new Font("Tahoma", Font.PLAIN, 17));
Gender.setBounds(60, 320, 150, 27);
add(Gender);
JRadioButton NewRadioButton = new JRadioButton("MALE");
NewRadioButton.setBackground(Color.WHITE);
NewRadioButton.setBounds(200, 320, 70, 27);
add(NewRadioButton);
JRadioButton Female = new JRadioButton("FEMALE");
Female.setBackground(Color.WHITE);
Female.setBounds(280, 320, 70, 27);
add(Female);

JLabel Phno = new JLabel("PH NO");


Phno.setFont(new Font("Tahoma", Font.PLAIN, 17));
Phno.setBounds(60, 370, 150, 27);
add(Phno);

textField_5 = new JTextField();


textField_5.setBounds(200, 370, 150, 27);
add(textField_5); setVisible(true);

JLabel AddPassengers = new JLabel("ADD CUSTOMER DETAILS");


AddPassengers.setForeground(Color.BLUE);
AddPassengers.setFont(new Font("Tahoma", Font.PLAIN, 31));
AddPassengers.setBounds(420, 24, 442, 35);
add(AddPassengers);

JLabel Flightcode = new JLabel("FLIGHT CODE");


Flightcode.setFont(new Font("Tahoma", Font.PLAIN, 17));
Flightcode.setBounds(60, 30, 150, 27);
add(Flightcode);

textField_6 = new JTextField();


textField_6.setBounds(200, 30, 150, 27);
add(textField_6);

ImageIcon i1 = new
ImageIcon(ClassLoader.getSystemResource("HOTEL/management/system/icon/emp.png"));
JLabel image = new JLabel(i1);
image.setBounds(450,80,280,410);
add(image);

Next.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
String passport_No = textField.getText(); String
pnr_no = textField_1.getText();
String address = textField_2.getText();
String nationality = textField_3.getText();
String name = textField_4.getText();
String fl_code = textField_6.getText();

String gender = null;


String ph_no = textField_5.getText();
if(NewRadioButton.isSelected()){
gender = "male";

}else if(Female.isSelected()){
gender = "female";
}
try {
conn c = new conn();
String str = "INSERT INTO passenger values( '"+pnr_no+"', '"+address+"',
'"+nationality+"','"+name+"', '"+gender+"', '"+ph_no+"','"+passport_No+"', '"+fl_code+"')";

c.s.executeUpdate(str);
JOptionPane.showMessageDialog(null,"Customer Added");
setVisible(false);

} catch (Exception e) {
e.printStackTrace();
}
}
});

setSize(900,600);
setVisible(true);
setLocation(400,200);

public static void main(String[] args){


new Add_Customer();
}
}
Payment_Details: package
HOTEL.management.system;

import java.awt.*; import


java.awt.event.*; import
java.sql.*; import
javax.swing.*; import
net.proteanit.sql.DbUtils; public
class Payment_Details extends
JFrame{ //Fifth

JTextField textField;
JTable table;
JLabel Sector;
JLabel FlightCode, Capacity, Classcode, Classname, label;

public static void main(String[] args) {


new Payment_Details();
}

public Payment_Details(){
initialize();
}

private void initialize(){


setTitle("PAYMENT_DETAILS");
getContentPane().setBackground(Color.WHITE);
setSize(860,486);
setLayout(null);

JLabel Fcode = new JLabel("PNR NO");


Fcode.setFont(new Font("Tahoma", Font.PLAIN, 17));
Fcode.setBounds(60, 160, 150, 26); add(Fcode);

textField = new JTextField();


textField.setBounds(200, 160, 150, 26);
add(textField);

table = new JTable();


table.setBounds(45, 329, 766, 87);
add(table);

JButton Show = new JButton("SHOW");


Show.setFont(new Font("Tahoma", Font.PLAIN, 17));
Show.setBackground(Color.BLACK);
Show.setForeground(Color.WHITE);
Show.setBounds(200, 210, 150, 26);
add(Show);

Sector = new JLabel("PAYMENT DETAILS");


Sector.setForeground(Color.BLUE);
Sector.setFont(new Font("Tahoma", Font.PLAIN, 31));
Sector.setBounds(51, 17, 300, 39); add(Sector);

FlightCode = new JLabel("PNR_NO"); FlightCode.setFont(new Font("Tahoma", Font.PLAIN, 13));


FlightCode.setBounds(84, 292, 108, 26); add(FlightCode);

Capacity = new JLabel("PAID_AMOUNT");


Capacity.setFont(new Font("Tahoma", Font.PLAIN, 13));
Capacity.setBounds(183, 298, 92, 14); add(Capacity);

Classcode = new JLabel("PAY_DATE");


Classcode.setFont(new Font("Tahoma", Font.PLAIN, 13));
Classcode.setBounds(322, 294, 101, 24); add(Classcode);

Classname = new JLabel("CHEQUE_NO");


Classname.setFont(new Font("Tahoma", Font.PLAIN, 13));
Classname.setBounds(455, 298, 114, 14); add(Classname);
label = new JLabel(""); label.setIcon(new
ImageIcon(ClassLoader.getSystemResource("HOTEL/management/system/icon/payment.png")));
label.setBounds(425, 15, 239, 272); add(label);

JLabel Cardno = new JLabel("CARD_NO");


Cardno.setFont(new Font("Tahoma", Font.PLAIN, 13));
Cardno.setBounds(602, 299, 101, 19); add(Cardno);

JLabel Phoneno = new JLabel("PHONE_NO");


Phoneno.setFont(new Font("Tahoma", Font.PLAIN, 13));
Phoneno.setBounds(712, 294, 86, 24); add(Phoneno);

setVisible(true);

Show.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){

try {
String code = textField.getText();

conn c = new conn();


String str = "select pnr_no,paid_amt,pay_date,cheque_no,card_no,ph_no from payment
where pnr_no = '"+code+"'";

ResultSet rs = c.s.executeQuery(str);
table.setModel(DbUtils.resultSetToTableModel(rs));

}catch(SQLException e) {
e.printStackTrace();
}
}
});

setSize(960,590);
setLocation(400,200);
setVisible(true);

}
}
Flight_Info.java: package
HOTEL.management.system;

import net.proteanit.sql.DbUtils; import java.awt.*;


import java.awt.event.*; import java.sql.*; import
javax.swing.*; public class Flight_Info extends JFrame{
//Second Frame

private JTable table;


private JTextField textField;
public static void main(String[] args){
new Flight_Info().setVisible(true);
}

public Flight_Info(){

getContentPane().setBackground(Color.WHITE);
getContentPane().setFont(new Font("Tahoma", Font.PLAIN, 13));

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(860,523);
setLayout(null);
setVisible(true);

JLabel Fcode = new JLabel("FLIGHT CODE");


Fcode.setFont(new Font("Tahoma", Font.PLAIN, 17));
Fcode.setBounds(50, 100, 200, 30); add(Fcode);

JLabel FlightDetails = new JLabel("FLIGHT INFORMATION"); FlightDetails.setFont(new


Font("Tahoma", Font.PLAIN, 31));
FlightDetails.setForeground(new Color(100, 149, 237));
FlightDetails.setBounds(50, 20, 570, 35); add(FlightDetails);

JButton btnShow = new JButton("SHOW"); btnShow.setFont(new


Font("Tahoma", Font.PLAIN, 20));

btnShow.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {

String code = textField.getText();

try {
conn c = new conn();
String str = "select f_code,f_name,src,dst,capacity,class_code,class_name from flight
,sector where f_code = '"+code+"'";

ResultSet rs = c.s.executeQuery(str);
table.setModel(DbUtils.resultSetToTableModel(rs));

}catch(SQLException e){
e.printStackTrace();
}
}
});

btnShow.setBounds(220, 150, 120, 30);


add(btnShow);

table = new JTable();


table.setBackground(Color.WHITE);
table.setBounds(23, 250, 800, 300);

JScrollPane pane = new JScrollPane(table); pane.setBounds(23,


250, 800, 300);
pane.setBackground(Color.WHITE);
add(pane);

textField = new JTextField();


textField.setBounds(220, 100, 200, 30);
add(textField);

JLabel FlightCode = new JLabel("FLIGHT CODE");


FlightCode.setFont(new Font("Tahoma", Font.PLAIN, 13));
FlightCode.setBounds(23, 220, 126, 14); add(FlightCode);

JLabel FlightName = new JLabel("FLIGHT NAME");


FlightName.setFont(new Font("Tahoma", Font.PLAIN, 13));
FlightName.setBounds(145, 220, 120, 14); add(FlightName);

JLabel Source = new JLabel("SOURCE");


Source.setFont(new Font("Tahoma", Font.PLAIN, 13));
Source.setBounds(275, 220, 104, 14); add(Source);

JLabel Destination = new JLabel("DESTINATION");


Destination.setFont(new Font("Tahoma", Font.PLAIN, 13));
Destination.setBounds(367, 220, 120, 14); add(Destination);

JLabel Capacity = new JLabel("CAPACITY");


Capacity.setFont(new Font("Tahoma", Font.PLAIN, 13));
Capacity.setBounds(497, 220, 111, 14); add(Capacity);

JLabel ClassCode = new JLabel("CLASS CODE");


ClassCode.setFont(new Font("Tahoma", Font.PLAIN, 13));
ClassCode.setBounds(587, 220, 120, 14); add(ClassCode);

JLabel ClassName = new JLabel("CLASS NAME");


ClassName.setFont(new Font("Tahoma", Font.PLAIN, 13));
ClassName.setBounds(700, 220, 111, 14); add(ClassName);

setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
setSize(900,650);
setVisible(true);
setLocation(400,200);

}
}
Practice.java: import
java.awt.EventQueue;

import javax.swing.JFrame; import


javax.swing.JLabel; import
java.awt.Font; import
java.awt.event.ActionEvent; import
java.awt.event.ActionListener; import
java.sql.Connection; import
java.sql.DriverManager; import
java.sql.PreparedStatement; import
java.sql.ResultSet; import
java.sql.SQLException; import
java.sql.Statement;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JTextField;
import java.awt.Color; public
class Practice {

static Connection mycon=null; static String


url="jdbc:mysql://localhost:3306"; static String
dbname="/HOTEL"; static String
driver="com.mysql.jdbc.Driver"; static String
userName="root"; static String
password="manju"; Connection con=null;

PreparedStatement pst=null;
private JFrame frame; private
JTextField textField; private
JTextField textField_1; private
JTextField textField_2; private
JTextField textField_3; private
JTextField textField_4;

/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable()
{ public void run() { try {
Practice window = new Practice(); window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

/**
* Create the application.
*/ public
Practice() {
initialize();
}

/**
* Initialize the contents of the frame.
*/
private void initialize() {
frame = new JFrame("CANCELLATION");
frame.getContentPane().setBackground(new Color(255, 153, 204)); frame.setBounds(100,
100, 801, 472);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);

JLabel lblCancellation = new JLabel("CANCELLATION");


lblCancellation.setFont(new Font("Tahoma", Font.PLAIN, 31));
lblCancellation.setBounds(195, 24, 259, 38);
frame.getContentPane().add(lblCancellation);

JLabel lblNewLabel = new JLabel("");


lblNewLabel.setIcon(new ImageIcon("C:\\Users\\Mithun\\Downloads\\images.jpg"));
lblNewLabel.setBounds(510, 80, 248, 266);
frame.getContentPane().add(lblNewLabel);

JLabel lblPassengerNo = new JLabel("PASSENGER NO");


lblPassengerNo.setFont(new Font("Tahoma", Font.PLAIN, 17));
lblPassengerNo.setBounds(60, 103, 132, 26);
frame.getContentPane().add(lblPassengerNo);

JLabel lblCancellationNo = new JLabel("CANCELLATION NO");


lblCancellationNo.setFont(new Font("Tahoma", Font.PLAIN, 17));
lblCancellationNo.setBounds(51, 151, 152, 31);
frame.getContentPane().add(lblCancellationNo);

JLabel lblCancellationDate = new JLabel("CANCELLATION DATE");


lblCancellationDate.setFont(new Font("Tahoma", Font.PLAIN, 17));
lblCancellationDate.setBounds(51, 206, 166, 26);
frame.getContentPane().add(lblCancellationDate);

JLabel lblTicketid = new JLabel("TICKET_ID");


lblTicketid.setFont(new Font("Tahoma", Font.PLAIN, 17));
lblTicketid.setBounds(79, 256, 126, 26);
frame.getContentPane().add(lblTicketid);
JLabel lblFlightcode = new JLabel("FLIGHT_CODE");
lblFlightcode.setFont(new Font("Tahoma", Font.PLAIN, 17));
lblFlightcode.setBounds(68, 300, 124, 38);
frame.getContentPane().add(lblFlightcode);

JButton btnCancel = new JButton("CANCEL");


btnCancel.setFont(new Font("Tahoma", Font.PLAIN, 14));
btnCancel.setBounds(209, 382, 139, 26);
frame.getContentPane().add(btnCancel);

textField = new JTextField();


textField.setBounds(236, 106, 152, 26);
frame.getContentPane().add(textField);
textField.setColumns(10);

textField_1 = new JTextField();


textField_1.setBounds(236, 159, 152, 23);
frame.getContentPane().add(textField_1);
textField_1.setColumns(10);

textField_2 = new JTextField();


textField_2.setBounds(236, 206, 157, 27);
frame.getContentPane().add(textField_2);
textField_2.setColumns(10);

textField_3 = new JTextField();


textField_3.setBounds(236, 262, 157, 23);
frame.getContentPane().add(textField_3);
textField_3.setColumns(10);

textField_4 = new JTextField();


textField_4.setBounds(236, 312, 157, 26);
frame.getContentPane().add(textField_4);
textField_4.setColumns(10); try{
Class.forName(driver);
mycon=DriverManager.getConnection(url+dbname,userName,password);
Statement stmt=mycon.createStatement();
}
catch (ClassNotFoundException | SQLException e1) { //
TODO Auto-generated catch block
e1.printStackTrace();
}

btnCancel.addActionListener(new ActionListener()
{ public void actionPerformed(ActionEvent ae)
{
String passenger_no=(String)textField.getText();
String cancellation_no=(String)textField_1.getText();
String cancellation_date=(String)textField_2.getText();
String ticket_id=(String)textField_3.getText();
String flight_code=(String)textField_4.getText();
try {
Class.forName(driver);

con=DriverManager.getConnection(url+dbname,userName,password);
} catch (ClassNotFoundException | SQLException e1) { //
TODO Auto-generated catch block
e1.printStackTrace();
}

try {
pst=con.prepareStatement("INSERT INTO
`HOTEL`.`cancellation` (`pnr_no`, `cancellation_no`, `cancellation_date`, `ticket_id`,
`fli_code`)VALUES (?, ?, ?, ?, ?);"); pst.setString(1,passenger_no); pst.setString(2,
cancellation_no); pst.setString(3,cancellation_date); pst.setString(4,ticket_id);
pst.setString(5,flight_code);

pst.executeUpdate();

} catch (Exception e) {
// TODO Auto-generated catch
block e.printStackTrace(); }

}
});

frame.setSize(960,586);
frame.setVisible(true);

}
Cancel.java: package
HOTEL.management.system;
importjavax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;

public class Cancel extends JFrame { //Sixth

private JTextField textField,textField_1,textField_2,textField_3,textField_4;

public static void main(String[] args) {


new Cancel();
}

public Cancel() {
initialize();
}

private void initialize() {


setTitle("CANCELLATION");
getContentPane().setBackground(Color.WHITE);
setBounds(100, 100, 801, 472); setLayout(null);

JLabel Cancellation = new JLabel("CANCELLATION");


Cancellation.setFont(new Font("Tahoma", Font.PLAIN, 31));
Cancellation.setBounds(185, 24, 259, 38); add(Cancellation);

ImageIcon i1 = new
ImageIcon(ClassLoader.getSystemResource("HOTEL/management/system/icon/cancel.png"));
Image i2 = i1.getImage().getScaledInstance(250, 250, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel NewLabel = new JLabel(i3);
NewLabel.setBounds(470, 100, 250, 250);
add(NewLabel);

JLabel PassengerNo = new JLabel("PASSENGER NO");


PassengerNo.setFont(new Font("Tahoma", Font.PLAIN, 17));
PassengerNo.setBounds(60, 100, 132, 26); add(PassengerNo);

JLabel CancellationNo = new JLabel("CANCELLATION NO");


CancellationNo.setFont(new Font("Tahoma", Font.PLAIN, 17));
CancellationNo.setBounds(60, 150, 150, 27); add(CancellationNo);

JLabel CancellationDate = new JLabel("CANCELLATION DATE");


CancellationDate.setFont(new Font("Tahoma", Font.PLAIN, 17));
CancellationDate.setBounds(60, 200, 180, 27); add(CancellationDate);

JLabel Ticketid = new JLabel("TICKET_ID");


Ticketid.setFont(new Font("Tahoma", Font.PLAIN, 17));
Ticketid.setBounds(60, 250, 150, 27); add(Ticketid);
JLabel Flightcode = new JLabel("FLIGHT_CODE");
Flightcode.setFont(new Font("Tahoma", Font.PLAIN, 17));
Flightcode.setBounds(60, 300, 150, 27); add(Flightcode);

JButton Cancel = new JButton("CANCEL");


Cancel.setFont(new Font("Tahoma", Font.PLAIN, 14));
Cancel.setBackground(Color.BLACK);
Cancel.setForeground(Color.WHITE);
Cancel.setBounds(250, 350, 150, 30);
add(Cancel);

textField = new JTextField();


textField.setBounds(250, 100, 150, 27);
add(textField);

textField_1 = new JTextField();


textField_1.setBounds(250, 150, 150, 27);
add(textField_1);

textField_2 = new JTextField();


textField_2.setBounds(250, 200, 150, 27);
add(textField_2);

textField_3 = new JTextField();


textField_3.setBounds(250, 250, 150, 27);
add(textField_3);

textField_4 = new JTextField();


textField_4.setBounds(250, 300, 150, 27);
add(textField_4);

Cancel.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){

String passenger_no = textField.getText(); String


cancellation_no = textField_1.getText();
String cancellation_date = textField_2.getText();
String ticket_id = textField_3.getText();
String flight_code = textField_4.getText();
try{
conn c = new conn();
String str = "INSERT INTO cancellation
values('"+passenger_no+"', '"+cancellation_no+"', '"+cancellation_date+"', '"+ticket_id+"',
'"+flight_code+"')"; c.s.executeUpdate(str);
JOptionPane.showMessageDialog(null,"Ticket Canceled");
setVisible(false);

}catch (Exception e) {
e.printStackTrace();
}
}
});

setSize(860,500);
setVisible(true);
setLocation(400,200);
}
}

Implementation and Maintainance:


Frontend Implementation

Java Core

Core Java is the part of Java programming language that is used for creating or developing a
generalpurpose application. It uses only one tier architecture that is why it is called as ‘stand alone’
application.Core java programming covers the swings, socket, awt, thread concept, collection object
and classess.

Swings

Swing is a GUI widget toolkit for Java. It is part of Oracle's Java Foundation Classes (JFC) – an API
for providing a graphical user interface (GUI) for Java prograMr.

Swing provides a look and feel that emulates the look and feel of several platforms, and also supports
a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying
platform. It has more powerful and flexible components than AWT. In addition to familiar components
such as buttons, check boxes and labels, Swing provides several advanced components such as tabbed
panel, scroll panes, trees, tables, and lists.

Backend Implementation

MYSQL
MySQL is an open-source relational database management system (RDBMS). A relational database
organizes data into one or more data tables in which data types may be related to each other; these
relations help structure the data. SQL is a language programmers use to create, modify and extract data
from the relational database, as well as control user access to the database. In addition to relational
databases and SQL, an RDBMS like MySQL works with an operating system to implement a relational
database in a computer's storage system, manages users, allows for network access and facilitates testing
database integrity and creation of backups.

Table cancellation:
create table cancellation(pnr_no varchar(10), cancellation_no varchar(10), cancellation_date DATE,
fli_code varchar(15));

Table flight:

create table flight(f_code varchar(10), f_name varchar(20), src varchar(30), dst varchar(30));

Table login: create table login(username varchar(20), password

varchar(20));

Table passenger:

create table passenger(pnr_no varchar(10), address varchar(30), nationality varchar(15), name


varchar(20), gender varchar(10), ph_no varchar(15), passport_no varchar(20), fl_code varchar(10));
Table payment:

create table payment(pnr_no varchar(10), ph_no varchar(15), cheque_no varchar(15), card_no


varchar(20), paid_amt varchar(10), pay_date DATE);

Table reservation:

create table reservation(pnr_no varchar(10), ticket_id varchar(10), f_code varchar(10), jny_date DATE,
jny_time varchar(10), src varchar(20), dst varchar(20));

Table sector:

create table sector(flight_code varchar(20), capacity varchar(10), class_code varchar(5), class_name


varchar(20));

Maintenance means restoring something to its original conditions. System maintenance confirms the system to
its original requirements and enhancement adds to system capability by incorporating new requirements.

Thus, maintenance changes the existing system, enhancement adds features to the existing system, and
development replaces the existing system. It is an important part of system development that includes the
activities which corrects errors in system design and implementation, updates the documents, and tests
the data.

Maintenance Types
System maintenance can be classified into three types −
• Corrective Maintenance − Enables user to carry out the repairing and correcting leftover
probleMr.
• Adaptive Maintenance − Enables user to replace the functions of the prograMr.
• Perfective Maintenance − Enables user to modify or enhance the programs according to the
users’ requirements and changing needs.

Managing Maintenance
• Number of people working in maintenance has surpassed number working in development
• Three possible organizational structures
 Separate
Maintenance group consists of different personnel than development group
 Combined
Developers also maintain systems
 Functional
Maintenance personnel work within the functional business unit

SNAPSHOTS

Fig 6.1: Login Operation


Fig 6.2: Mainframe

Fig 6.3: Drop-down Menu


Fig 6.4: Flight Information

Fig 6.5: Adding Customer


Fig 6.6: Payment Details

Fig 6.7: Journey Details


Fig 6.8: Cancellation

Backend Records
Testing

Testing Techniques
System Testing

System testing is the stage, which is aimed at ensuring that the system works accurately &
efficiently before live operation commences. To assure the quality of the system, the following are to
be considered

Scope of Testing

Once the system has been developed the system has to be tested and if no Bugs found it is to
be implemented. A good test cannot solve a bad program and testing can never prove a program is right.
A good test case design that detects many errors is alarming Testing requires skill and knowledge.

Testing Platforms

If the system is approved to be error free it can be implemented. Implementation includes


proper training to the end user. The implemented software should be maintained for prolonged running
of the software. For every dollars spend developing software we have spend at least two dollar to
maintaining it.

Methods Used

Various methods include in testing the system are.

1. Unit Testing

Unit tests are at program level where the programmer himself can test at the system for known
bugs. Unit testing are at involves the tests carried out on modules programs, which make up a system.
This is also called as Program Testing. The Units in the system are modules and the routines that are
assembled and integrated to perform a specific function. In a large System, many modules at different
levels are needed; unit testing focuses first on the modules, independently of one another, to locate
errors.
The Program to be tested for correctness of logic applied and should locate error in coding. For
example test cases are needed to determine how the system handles if an intruder try to enter the
application. User password will be encrypted and checks with the database. The Unauthorized user will
be warned with a message.
Valid and invalid data should be created and the programs should be made to the process this
data to catch errors. For example a student who has completed the course cannot access the lab resources
and he/she cannot appear for any other tests conducted by the institute.
2. Integration Testing

Integration testing begins with a software structure that has been defined using stubs (a dummy
module) that allows testing of super ordinate (calling Program) control and interface correctness. Stubs
are replaced by unit tested modules or builds integration testing proceeds. For Integration testing,
several factors should be considered:
Are routines to be integrated in a pure top-down manner or should build be developed to test
sub function first?
In what order should major software functions be incorporated?
Is the scheduling of modules code and test consistent with the order of integration?
Is special hardware required to test certain routines?
Developed a list of all modules. Associated with each module is its unit test completion date,
date of first integration, destination (e.g. build into which it will be incorporated or functional level)
and a reference to required test data/result for that module.
Another important consideration during integration test planning is the amount of test software
(e.g., drivers, test case generation) that must be developed to adequately test the required functionality.

3. System testing

The test plan is a product of software design. The test plan specifies the objectives of testing,
test completion criteria, system Integration Planed, methods to be used on modules and particular test
cases to be used.
Functional test – specify operation conditions, input values and expected results
Performance test –should be design to verify response time, throughput, primary and secondary
memory utilization and traffic rates on data channels and communication channels.
Stress test-is designed to overload a system in various ways.
Structural test- are concerned with examining the internal processing logic of a software
system.
Any software has to undergo robust test in each and every stage. Any shortcoming or bugs must
be rectified and tested. This software has undergone the tests thoroughly. A system is tested for online
responses, volume of transactions, stress, recovery from failure, and usability. Software testing is a
critical element of software quality assurance and represents the ultimate review of specification, design
and coding

System testing involves two types of testing, Integration testing and acceptance testing. In
integration testing all the modules are integrated the interfaces between the modules are tested. Bottom
up integration is the traditional strategy is to integrate the components of a software system into a
functioning whole. Top Down integration starts from the main module along one or two intermediate
subordinated routines in the system structure
Testing Strategies

Testing is a process of executing a program with the intent of finding an error.


A good test case is one that has a high probability of finding an as yet undiscovered error.
Successful test is one that uncovers as a yet undiscovered error.
A product can be tested in two ways,

Black box Testing:

Knowing the specified function that a product has been designed to perform, tests can be
conducted that demonstrate each function is fully operational.

White box Testing:

Knowing the internal working of a product, tests can be conducted to ensure that the internal
components have been adequately exercised. The tests of this software were conducted on the following
fashion.

1. Design time Data test

2. Runtime data test at module level

3. Test data runs after completion using dummy data

4. Crash test for testing data safety.

5. Demo runs with the data from the end user.

6. Performance test at the peak hours of work.

System Security Measures:

Database/data security:

Implementation of security at database level plays a major role in the implementation


of security for the application. It has properly been maintained by defining a separate user id and
password. This authentication prevents mal-intentional entry to the database.
User profiles & Access rights:

After a user gains access to the application, the user is ability to perform certain actions is
restricted. For example, users are allowed to add new records but not delete existing ones. Users are
restricted to view the data online, but not produce printed reports of critical data. Thus, permission
checking enabled to check the user’s security profile to see whether that user has permission to perform
a particular task.
The next step in security added in the application is an audit trial that logs all the significant
actions taken by user within the application. This included logging in and out and executing any
“secured object” within the application, field change auditing, that is, changes made to data records on
a field-by-field basis.

Cost Estimation of the Project:

The cost of a Project is estimated, keeping in account many factors like human efforts,
recourses required, security and reliability provisions, size in KLOC (Kilo Lines of Codes),
user interfaces, size of databases, integration, documentation and the types of reports or output
produced.

In our approach to cost estimation of the system, we followed Constructive Cost Model (COCOMO) to
estimate the total effort in terms of Programmers months or Persons-month. COCOMO model requires
sizing information as
 Objects Points

 Function Points

 Lines of Source Code

We used Objects Points to estimate the total effort required in our project. The Object Point is an indirect

software measure that is computed using counts of the number of

 Screens (at the user interface)

 Reports and

 Components likely to be required to build the application

Each Object instance (e.g. a screen or report) is classified into one of three complexity levels, i.e.,
Simple, Medium or Difficult, based on the number and source of the client and server data tables that
are required to generate the screen or report and the number of views or report.

Future Scope of the Project

The software package “HOTEL Reservation System” provides convenient online uploading the
reportfrom executive and viewing that report by the managing director in an online fashion.
To input the data in a highly validated manner and generating the different reports, this involves
complex process that was being done on based manner.
This package is designed and developed in a compact manner, which is ready to meet the user’s
specification and to serve them in an effective as well as in an enhanced manner. The actual problem
has been observed with keen interest and it has been defined and analyzed in such a way that it never
causes choice to the user. More ever the limitation that has been prevailing in the existing system had
been overcome to suit the need of the user.

High precision and care has been taken to design the data base , input forms an output reports since they
should be given due importance which could otherwise to serious consequences thus affecting the whole
system . The system thus developed has been implemented successfully which has been performed to
scrutinized the validation of each data and errors were spotted out and then finally cleared in a
sophisticated manner.

The added feature of this system is that it has been provided with many provisions for future
enhancement in order to maintain the system in such a way that the future requirement of the user could
also be satisfied and upgrated.

Conclusion:

This project on HOTEL Management System is the automation of registration process of


HOTEL system. The system is able to provide much information like passenger’s details,
flightdetails and the booking details. The system allows us to add records when a passenger
reserves
a ticket. It also allows to delete and update the records based on passenger’s requirements. This
project has guided our path through various aspects of computer science where developing
online application plays a major role.

Bibliography

[1] https://developers.openshift.com/database/mysql.html

[2] Web References- https://youtu.be/UbIIFLsEeiM


Glossary
Code efficiency How efficient is the code generated and whether it satisfies the needs as
expressed in the design, or not. Thus, it reflects the overall quality of the
software.

OPC It is determined by multiplying the original no. Of object instances by the


weighting factor in table given above and summing to obtain a total object
point count.

Software Metrics These are the quantitative measure of the degree to which a system
component or process possesses a given attribute. In other words software
metrics helps in assessing a process or product thereby checking in
validity, worthiness, risks, errors, and defects, work-flows or tasks etc.
The project is assessed while it is in development phase.
Feasibility Is the determination of weather or not a project is worth doing. The
process followed in making this documentation is called a feasibility
study.

Technical Feasibility Is defined as the availability of suitable technology to support the solution
and adequate expertise to develop the solution.

Economic Feasibility

It is more commonly known as COST / BENEFIT Analysis; the procedure


to determine the benefits and savings that are expected from a proposed
system and compare them with costs.
Operational Feasibility Is defined as the suitability of the solution from the standpoint of the
people who will have to use that solution.

System Testing
Is the stage, which is aimed at ensuring that the system works accurately
& efficiently before live operation commences.

Unit Tests

Are at program level where the programmer himself can test at the system
for known bugs. Unit testing are at involves the tests carried out on
modules programs, which make up a system. This is also called as
Program Testing.
Integration Testing It begins with a software structure that has been defined using stubs (a
dummy module) that allows testing of super ordinate (calling Program)
control and interface correctness.

Black Box Testing Knowing the specified function that a product has been designed to
perform, tests can be conducted that demonstrate each function is fully operational.

White Box Testing Knowing the internal working of a product, tests can be conducted to
ensure that the internal components have been adequately exercised.
Optimization

In order to ensure that the application uses the minimum resources, it is


needed to fine-tune the application for improving its performance. The
steps involved in fie-tuning an application are known as optimization.
Database A database server is the key to solving the problems of information
management.

Portability

Oracle software works under different operating systeMr. Applications


developed for Oracle can be ported to any operating system with little or
no modification.
Distributed Systems Distributed systems have the same degree of user transparency and data
consistency as non-distributed systems; yet receive the advantages of
local database management.

Tablespace A tablespace is a logical area of storage

Schema

A schema is a collection of objects. Schema objects are the logical


structures that directly refer to the database's data. Schema objects include
such structures as tables, views, sequences, stored procedures, synonyms,
indexes, clusters, and database links.
Segments A segment is a set of extents allocated for a certain logical structure.

Control File A control file contains entries that specify the physical structure of the
database.

You might also like