Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

GT INSTITUTE OF MANAGEMENT STUDIES & RESEARCH

PROJECT REPORT
ON
“HOTEL MANAGEMENT SYSTEM”

SUBMITTED BY THE REQUIREMENT FOR THE AWARD OF THE


DEGREE OF

BACHELOR OF COMPUTER APPLICATIONS


OF
BANGALORE UNIVERSITY

SUBMITTED BY

KAVYA N : 191NSB7008

UNDER THE ESTIMATED GUIDANCE OF


“Prof.Shruthi G”
GT INSTITUTE OF MANAGEMENT STUDIES & RESEARCH

CERTIFICATE
This is to certify that Kavya N
Register Number [191NSB7008] of V SEM BCA (Bachelor of Computer
Applications), GT Institute of Management Studies and Research, has submitted the Project
Report as per the syllabus prescribed by Bangalore University for Academic Year 2022-
2023under the guidance and supervision of “Prof.Shruthi G”.

Signature of Lecturer Signature of HOD

Signature of the Principal

Centre of Examination:

Internal Examiner

External Examiner
ACKNOWLEDGEMENT

It is not exaggeration to say that the emergence of this book was outcome
of observing project. It not only involved number of days of efforts but also
extensive consultation, case study, analysis, programming and much more. In
fact, this project work enjoyed the creation and innovative support from the
concerned guide.

I take this opportunity to express our sincere thanks to DR Manjunath ,


Principal for providing necessary facilities and guidance of the project.

My sincere thanks to our Internal Guide Prof. Shruthi


Head of Department (BCA), G.T Institute of Management Studies & Research,
for his valuable suggestions, spontaneous encouragement and constant help in
improving the presentation of this project

I also like to thank our Principal, Lecturers, my parents and all our
classmates, who have contributed directly or indirectly in our efforts to complete
this project successfully.

With Gratitude
Kavya N [191NSB7008]
Table of Contents
Sl.No NAME OF THE CHAPTERS Page No

1 Project Synopsis 1-2


1.1 Project abstract
1.2 Project introduction
1.3 Scope of project
1.4 List of the project module
1.5 Hardware Requirement

2 Project Introduction 3-5


2.1 Project Objective
2.2 Details of Project Modules
2.3 Need for Computerization

3 Hardware & Software Configuration 6


3.1 Hardware Requirement
3.2 Software Requirement

4 Software requirement specification 7-9

5 Introduction to Java 10-12


5.1 Introduction to Java
5.2 Introduction to JFrame
5.3 Components used in JFrame
5.3 Packages used in JFrame

6 Introduction to MySQL 8.0 13-19


6.1 Database Schema

7 Data flow diagram & ER diagram 20-23


7.1 Data Flow Analysis
7.2 ER Diagram
8 Introduction to Apache NetBeans IDE 12.6 24-34
8.1 About NetBeans IDE
8.2 Working with NetBeans IDE
8.3 NetBeans Start Page
8.4 Connecting to MySQL Database

9 Input/output Screens 35-41


9.1 Login Page
9.2 Signup Page
9.3 Forgot Password Page
9.4 Admin Login Page
9.5 Admin Home Page
9.6 Home Page
9.7 Manage Rooms Page
9.8 Customer Check In Page
9.9 Customer Check Out Page
9.10 Customer Details Bill Page
9.11 Connection Provider for MySQL page
9.12 Database Table creation page
9.13 Database Data Accessing page

10 Sample Coding 42-46


10.1 Login Page Coding
10.2 Signup Page Coding
10.3 Forgot Password Page Coding
10.4 Admin Login Page Coding
10.5 Admin Home Page Coding
10.6 Home Page Coding
10.7 Manage Rooms Page Coding
10.8 Customer Check In Page Coding
10.9 Customer Check Out Page Coding
10.10 Customer Details Bill Page Coding
11 Testing and Results 47-50
11.1 Software Testing
11.2 MySQL Connection Testing
11.3 Database Testing
11.4 Database Table Creation Testing
11.5 Database Table Details Updating & Deleting Testing
11.6 System Testing
11.7 Test Case for Hotel Management System

12 Future Enhancements 51-52

13 Conclusions
53

14 Bibliography 54
HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER : 1 PROJECT SYNOPSIS

1.1 PROJECT ABSTRACT:

The hotel management project is an excellent software tool for the related industries
that can be used in hostels for booking rooms & and there is admin for verify and validate the
employees who are recruited. After validated by the admin the employees can start their
work.

1.2 PROJECT INTRODUCTION:

The hotel management system tool is a complete set of software programs, along with
various integrated modules foe various aspects of hotel control. This software program
consists of all the necessary capabilities in an Inn control software. In which the admin can
know the activities or work done by employees.

This software is designed for luxury full-service lodge, beds and Hotels. It
emphasizes the best stage of services for character visitors through our full capabilities that
integrate rooms which are very clean, and the customer can get their generated bill as a pdf,
The generated bills are stored in local devices in which we can give the copy of bill for
customer again in case if they lost their bills.

1.3 SCOPE OF PROJECT:

The project is system-based software, it cannot be accessed by online, and it is


completely accessed by offline, which deals with hotel management system. The main motto
of the project is to give the user-friendly a/c or non-a/c rooms for customers with satisfy able
price, the user interference is easy to read and understand by the employees and operate the
software. As it is a user-friendly software the small hotels can use this software in their
hotels.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 1


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

1.4 LIST OF THE PROJECT MODULES:

❖ Sign up
❖ Employee Login
❖ Admin Login ❖ Admin Home
❖ Home Page
❖ Manage Rooms
❖ Customer Check-In
❖ Customer Check-Out ❖ Customer Details Bill

1.5 HARDWARE REQUIREMENTS:

Processor Intel Core 2 Duo or Higher


RAM 2GB DDR RAM
Hard Disk 40 GB Hard Disk or More
Input Devices Standard Keyboard and
Mouse
Output Devices 15’ LED Monitor

1.6 SOFTWARE REQUIRENTS:

Operating System Windows 10 Professional

Front end tool Apache NetBeans IDE(12.6) JFrame


Back end tool MySQL 8.0

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 2


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER : 2 PROJECT INTRODUCTION

Our project on “Hotel Management System” gives idea about the management in hotels. The
package gives all the information regarding the check in or check out facilities of the
customer. The customer can get his or her room details. It gives details of the customer and
the time of arrival and departure of customer. It gives a detailed report of the customer and
the room occupied by him/her. It gives the information about the employees working in
hotels. This software is very useful to the departments for managing their activities. It can
generate bills as a pdf and give it to customer. Later if the customer lost their bill they can get
the copy of their bill.

2.1 PROJECT OBJECTIVE:


Although, hotels are already having well-developed software for information
management, we just want to study how this is done. So, we selected hotel management
system as our project. We visited various hotels and gone through their software. In most of
the hotels the back-end used only MS-ACCESS. We have included SQL as well in our
project since it is pure relational database. In one of the hotel, we found that they have the
problem that their software does not show the room vacant as soon as it being vacant. The
status of room is updated only after 12 hours or 24 hours depending upon the time period
they have taken. They were facing problem in providing rooms to customers. In our project
we have tried to solve this problem and at any moment of time the status of room that
whether it is vacant or occupied is shown correctly.

Developing software on a topic like “Hotel Management System” has much scope. It
can be made more attractive and many more modules can be attached to provide various
services to customers. Our project provides various services to the customers like booking,
enquiring about any customer (by name/customer Id) or about room availability. The project
has Scope in hotels since the routine activities of managing departments become easy.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 3


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

2.2 DETAILS OF PROJECT MODULES

2.2.1 Sign Up:

This Module contains the details of the Employee such as Name, Email, Password,
Security Question and Security Question Answer, Address. The above Details of Employee
are stored in this module.

2.2.2 Login Page:

This Module consist the details of the Employee Details like Employee email ID &
Employee Password. Before that the Admin should approve the employee details.

2.2.3 Admin Login Page:

This Module consist the login details of Admin. Which is already stored in coding.
The admin login ID and Password can be change in coding.

2.2.4 Forgot Password:

This Module is used to change the password only for employee, it consist the details
of Email, Security Question & Security Question Answer, New Password

2.2.5 Admin Home:

This Module is known as Admin Home page in which it consist of all Employee
Details, In order to approve or disapprove the new Employee in the form of True or False.
2.2.6 Home:

This Module is known as Home page in which it consist of Manage Room page, Customer
Check-In page, Customer Check-Out page, Customer Details Bill page, Logout and Exit
Button.

2.2.7 Manage Room:

This Module is used to add or remove the room, which are in under maintenance and
Booked and Not Booked room are shown in this page.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 4


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

2.2.8 Customer Check-In:

This Module is used to fill the Customer Details before checking in to the hotel,
It contains the details like Name, Mobile Number, Nationality, Gender, Email, ID Proof,
Address, Check-In Date, Bed, Bed type, Room Number, Price.

2.2.9 Customer Check-Out:

This Module is used to show the registered Customer Details before Checking out the
Hotel, It Contains the details like Customer Name, check-In Date, Check-Out Date, Contact
Number, Price per day, Total Amount, Customer Email.

2.2.10 Customer Details Bill:

This Module is used to store the generated customer bill in the device storage in
which it can be accessed later by Employees and give the pdf to customers.

2.3 Need for Computerization

The increasing complexity of services and hence the large quantities of information necessary
to be maintained by modern technology has made the computerization of the front office
system a necessity, and this system is specially designed for the owner in mind as the end
user.

➢ Easy to use.
➢ Provides more functionality.
➢ Provides more information about cases.
➢ Quick access to information.
➢ More versatile.
The advantages of the proposed system as follows:
➢ To reduce the workload.
➢ To reduce the processing time.
➢ To view the bed arrangement to maintain reliable and update information.
➢ Easy accessibility to.
➢ Computerized quick report for every database.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 5


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER: 3 HARDWARE & SOFTWARE COFIGURATION


This software is a modern and latest technology system specifications used for development
and inserted well graphic images, navigations, tools, object components in Apache NetBeans
IDE 12.6 application software as a frontend in this project work and also current market
hardware configurations used in this version of the software. The minimum hardware
configured used 2GB RAM is required. But all these records are stored in a database package
is MySQL 8.0 as a backend tool in this software. Here there is no problem for software and
hardware configuration another 5 years definitely, So that we are preferable this software
and hardware configurations.

3.1 HARDWARE REQUIREMENTS:

Processor Intel Core 2 Duo or Higher

RAM 2GB DDR RAM

Hard Disk 40 GB Hard Disk or More

Input Devices Standard Keyboard and


Mouse
Output Devices 15’ LED Monitor

3.2 SOFTWARE REQUIREMENTS:

Operating System Windows 10 Professional

Front end tool Apache NetBeans IDE(12.6) JFrame

Back end tool MySQL 8.0

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 6


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER : 4 SOFTWARE REQUIREMENT


SPECIFICATION
A Software Requirements Specification (SRS) is a document that describes the nature of a
project, software or application. In simple words, SRS document is a manual of a project
provided it is prepared before you kick-start a project/application. This document is also
known by the names SRS report, software document. A software document is primarily
prepared for a project, software or any kind of application.
There are a set of guidelines to be followed while preparing the software requirement
specification document. This includes the purpose, scope, functional and non-functional
requirements, software and hardware requirements of the project. In addition to this, it also
contains the information about environmental conditions required, safety and security
requirements, software quality attributes of the project etc.

➢ Correct
➢ Complete
➢ Consistent
➢ Unambiguous
➢ Functional
➢ Verifiable
➢ Traceable
➢ Easily changed
An incorrect or incomplete set of requirements can result in a software product that satisfies
but does not satisfy customer needs. SRS should be functional in nature; i.e., they should
describe what is required without implying how the system will need its requirements. The
purpose of this document is to prescribe the software requirements for "TV Channel Guide"
to be developed. In this software we analyse the essence of maintaining, modifying, and
removing the account and its data.

The software requirement specification is completely done by the following project modules.
Each and every module designed in Apache NetBeans IDE 12.6 Front end tool and Data base
records stored in MySQL 8.0.

Sign Up:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 7


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

This Module contains the details of the Employee such as Name, Email, Password,
Security Question and Security Question Answer, Address. The above Details of Employee
are stored in this module.

Login Page:

This Module consist the details of the Employee Details like Employee email ID &
Employee Password. Before that the Admin should approve the employee details.

Admin Login Page:

This Module consist the login details of Admin. Which is already stored in coding.
The admin login ID and Password can be change in coding.

Forgot Password:

This Module is used to change the password only for employee, it consist the details
of Email, Security Question & Security Question Answer, New Password.

Admin Home:

This Module is known as Admin Home page in which it consist of all Employee
Details, In order to approve or disapprove the new Employee in the form of True or False.
Home:

This Module is known as Home page in which it consist of Manage Room page, Customer
Check-In page, Customer Check-Out page, Customer Details Bill page, Logout and Exit
Button.

Manage Room:

This Module is used to add or remove the room, which are in under maintenance and
Booked and Not Booked room are shown in this page.

Customer Check-In:

This Module is used to fill the Customer Details before checking in to the hotel,
It contains the details like Name, Mobile Number, Nationality, Gender, Email, ID Proof,
Address, Check-In Date, Bed, Bed type, Room Number, Price.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 8


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

Customer Check-Out:

This Module is used to show the registered Customer Details before Checking out the
Hotel, It Contains the details like Customer Name, check-In Date, Check-Out Date, Contact
Number, Price per day, Total Amount, Customer Email.

Customer Details Bill:

This Module is used to store the generated customer bill in the device storage in
which it can be accessed later by Employees and give the pdf to customers.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 9


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER : 5 INTRODUCTION TO JAVA

5.1 Introduction to JAVA:

Java is one of the most popular programming languages out there. Released in
1995 and still widely used today, Java has many applications, including software
development, mobile applications, and large systems development. Knowing Java opens a lot
of possibilities for you as a developer.

5.2 Introduction to JFrame:

JFrame Constructor. JFrame Constructor & its descriptions are given below. JFrame () –
JFrame () is a JFrame class. JFrame Methods. JFrame class provides some methods which
play an important role in working with JFrame. Examples of JFrame in Java. Here are the
following examples mentioned below. In the above-given example, the swing. Conclusion.
JFrame is the class of the swing package which mainly used to create the JFrame. We can
say that the JFrame.
5.3 Components Used In NetBeans IDE 12.6:

➢ NetBeans manages the following platform features and components:

• User settings
• Windows (placement, appearance, etc.)
• NetBeans Visual Library
• Storage

• Framework wizard

• 5.4 Packages used in JFrame:

➢ Java Lang Package (java. Lang.*) java. Lang package is imported


automatically, i.e. we can use the classes of this package directly in our program.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 10


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

You do not need to import this package because it contains the classes that are
fundamental to the design of the Java programming language.

This package contains important classes like String, String Builder, Math,
Integer, System, etc.

➢ Java Util Package (java.util.*) java.util package contains the collections


framework, legacy collection classes like Vector, internationalization and utility
classes like a random-number generator or a string tokenizer.
This package contains important classes like Array List, Hash Map, HashSet, etc.

➢ Java IO Package (java.io.*)


Java.io package provides serialization, system input/output through data
streams, and the file system.
This package contains important classes like Buffered Reader, Buffered
Writer, File, Input Stream, Output Stream, etc.

➢ Java SQL Package (java.sql.*)


Java.sql package provides the API for accessing and processing the data stored
in a data source.
This package contains important interfaces like Connection, Prepared
Statement, Result Set, and classes like Driver Manager, etc.

➢ Javax Swing Package (javax.swing.*)


Javax.swing package provides a set of "lightweight" components that almost
work the same on all the platforms.
This package contains important classes like Box Layout, Image Icon,
JButton, JCheckBox, JComponent, JFrame, JLabel, JList, JPanel, etc.

➢ Abstract Window Toolkit (AWT)


It is a set of application program interfaces (API s) used by Java programmers to
create graphical user interface (GUI) objects, such as buttons, scroll bars, and windows.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 11


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

AWT is part of the Java Foundation Classes (JFC) from Sun Microsystems, the company that
originated Java.

➢ JPanel

JPanel is a Swing's lightweight container which is used to group a set of


components together. JPanel is a pretty simple component which, normally, does not
have a GUI (except when it is being set an opaque background or has a visual border).

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 12


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER: 6 INTRODUCTION TO MySQL 8.0


This document describes what you need to know when working on the MySQL

8.0 code. To track or contribute to MySQL development, follow the instructions in Installing
MySQL Using a Development Source Tree. If you are interested in MySQL internals, you
should also join the MySQL Community Slack. Feel free to ask questions about the code and
to send patches that you would like to contribute to the MySQL project.

The MySQL server creates the following threads:

➢ Connection manager threads handle client connection requests on the network


interfaces that the server listens to. On all platforms, one manager thread handles
TCP/IP connection requests. On UNIX, this manager thread also handles UNIX
socket file connection requests. On Windows, a manager thread handles
sharedmemory connection requests, and another handles named-pipe connection
requests. The server does not create threads to handle interfaces that it does not listen
to. For example, a Windows server that does not have support for named-pipe
connections enabled does not create a thread to handle them.

➢ Connection manager threads associate each client connection with a thread dedicated
to it that handles authentication and request processing for that connection. Manager
threads create a new thread when necessary but try to avoid doing so by consulting
the thread cache first to see whether it contains a thread that can be used for the
connection. When a connection ends, its thread is returned to the thread cache if the
cache is not full. For information about tuning the parameters that control thread
resources, see Connection Interfaces.

➢ On a source replication server, connections from replica servers are handled like
client connections: There is one thread per connected replica.
On a replica server, an I/O thread is started to connect to the source server and read
updates from it. An SQL thread is started to apply updates read from the source.
These two threads run independently and can be started and stopped independently.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 13


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

➢ A signal thread handles all signals. This thread also normally handles alarms and calls
process alarm () to force timeouts on connections that have been idle too long.

• The MySQL Test Suite:

➢ The test system that is included in UNIX source and binary distributions makes it
possible for users and developers to perform regression tests on the MySQL code.
These tests can be run on UNIX.

➢ You can also write your own test cases. For information, including system
requirements, see The MySQL Test Framework in the MySQL Server Dioxygen
documentation, available at https://dev.mysql.com/doc/index-other.html.

➢ The current set of test cases does not test everything in MySQL, but it should catch
most obvious bugs in the SQL processing code, operating system or library issues,
and is quite thorough in testing replication. Our goal is to have the tests cover 100%
of the code. We welcome contributions to our test suite. You may especially want to
contribute tests that examine the functionality critical to your system because this
ensures that all future MySQL releases work well with your applications.

➢ MySQL Services for Plugins

➢ MySQL server plugins have access to server “plugin services.” The plugin services
interface exposes server functionality that plugins can call. It complements the plugin
API and has these characteristics:

➢ Services enable plugins to access code inside the server using ordinary function calls.
Services are also available to loadable functions.

➢ Services are portable and work on multiple platforms.

➢ The interface includes a versioning mechanism so that service versions supported by


the server can be checked at load time against plugin versions. Versioning protects
against incompatibilities between the version of a service that the server provides and
the version of the service expected or required by a plugin.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 14


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

➢ For information about plugins for testing plugin services, see the Plugins for Testing
Plugin Services section of the MySQL Server Dioxygen documentation, available at
https://dev.mysql.com/doc/index-other.html.

The plugin services interface differs from the plugin API as follows:

➢ The plugin API enables plugins to be used by the server. The calling initiative lies
with the server to invoke plugins. This enables plugins to extend server functionality
or register to receive notifications about server processing.

➢ The plugin services interface enables plugins to call code inside the server. The
calling initiative lies with plugins to invoke service functions. This enables
functionality already implemented in the server to be used by many plugins; they need
not individually implement it themselves.

➢ To determine what services exist and what functions they provide, look in the include
/MySQL directory of a MySQL source distribution. The relevant files are:

➢ Plugin.h includes services.h, which is the “umbrella” header that includes all available
service-specific header files.

➢ Service-specific headers have names of the form service_xxx.h.

➢ Each service-specific header should contain comments that provide full usage
documentation for a given service, including what service functions are available,
their calling sequences, and return values.

For developers who wish to modify the server to add a new service, see MySQL
Internals: MySQL Services for Plugins.

Available services include the following:

➢ get_sysvar_source: A service that enables plugins to retrieve the source of system


variable settings.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 15


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

➢ locking_service: A service that implements locks with three attributes: Lock


namespace, lock name, and lock mode. This locking interface is accessible at two
levels: 1) At the SQL level, as a set of loadable functions that each map onto calls to
the service routines;

➢ As a C language interface, callable as a plugin service from server plugins or loadable


functions. For more information, see The Locking Service.

➢ my_plugin_log_service: A service that enables plugins to report errors and specify


error messages. The server writes the messages to its error log.

➢ status_variable_registration. A service for registering status variables.

➢ my_thd_scheduler: A service for plugins to select a thread scheduler.

➢ mysql_keyring: A service for keyring storage, accessible at two levels: 1) At the SQL
level, as a set of loadable functions that each map onto calls to the service routines; 2)
As a C language interface, callable as a plugin service from server plugins or loadable
functions. For more information, see The Keyring Service.

➢ mysql_password_policy: A service for password validation and strength checking.

➢ plugin_registry_service: MySQL Server includes a component-based infrastructure


for improving server extensibility; see MySQL Components. However, MySQL
plugins use an interface that predates the component interface.
The plugin_registry_service enables plugins to access the component registry and its
services.

➢ security_context: A service that enables plugins to examine or manipulate thread


security contexts. This service provides setter and getter routines to access attributes
of the server Security_context class, which includes attributes such as operating
system user and host, authenticated user and host, and client IP address.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 16


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

➢ thd_alloc: A memory-allocation service.

➢ thd_wait: A service for plugins to report when they are going to sleep or stall

Porting MySQL

➢ Before attempting to port MySQL to other operating systems, check the list of
currently supported operating systems first.
See https://www.mysql.com/support/supportedplatforms/database.html.

➢ If you create a new port of MySQL, you are free to copy and distribute it under the
GPL license, but it does not make you a copyright holder of MySQL.

➢ A working POSIX thread library is needed for the server.

➢ To build MySQL from source, your system must satisfy the tool requirements listed at
Installing MySQL from Source.

➢ If you run into problems with a new port, you may have to do some debugging of
MySQL! See Debugging a MySQL Server.

➢ Before you start debugging MySQL, first get the test program mysys/thr_lock to
work. This ensures that your thread installation has even a remote chance to work.

The MySQL source code contains internal documentation written using Dioxygen.
This documentation is useful for understanding how MySQL works from a developer
perspective.

➢ The generated Dioxygen content is available at


https://dev.mysql.com/doc/indexother.html. It is also possible to generate this content
locally from a MySQL source distribution using the instructions at Generating
MySQL Dioxygen Documentation Content.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 17


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

6.1 Database schema:

1. Customer Tab:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 18


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

1. Users Tab:

2. Room Tab:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 19


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER: 7 DATA FLOW DIAGRAM & ER DIAGRAM

7.1 DATA FLOW ANALYSIS:

The data flow analysis is a study of how and what the data flows through the system.
It is done with the help of Data Flow Diagram (DFD), which depicts the entities involved in
the system, data input by the entities, processes the input data undergoes and data store where
the data is stored.

7.1.1 DFD1

Hotel
Admin Login To
Management

7.1.2 DFD2

Employee
Hotel
Sign-up Login To Management

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 20


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

7.1.3 DFD3

Accommodation Information

Customers Info Accommodation Information

Hotel
Administrator

Hotel
Customers Customers
Management
Job Department Info
System

Bill information

Employee List of Customers

List of Accommodation

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 21


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

7.2 ER DIAGRAM (Entity Relationship Diagram):

The entity relationship diagram is used to represent the


relationship between one entity data base record to another entity. How the project is flowing
according to that flow of the project, we are drawing the ER diagram with connectivity from
one relation to another as shown below.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 22


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER: 8 INTRODUCTION TO NETBEANS IDE 12.6

8.1 About NetBeans IDE:

NetBeans IDE is a free, open source, integrated development environment


(IDE) that enables you to develop desktop, mobile and web applications. The IDE supports
application development in various languages, including Java, HTML5, PHP and C++. The
IDE provides integrated support for the complete development cycle, from project creation
through debugging, profiling and deployment. The IDE runs on Windows, Linux, Mac OS X,
and other UNIX-based systems.

The IDE provides comprehensive support for JDK 8 technologies and the most
recent Java enhancements. It is the first IDE that provides support for JDK 8, Java EE 7, and
JavaFX 2. The IDE fully supports Java EE using the latest standards for Java, XML, Web
services, and SQL and fully supports the Glassfish Server, the reference implementation of
Java EE.

8.2 Working with NetBeans IDE:

The IDE enables you to configure options for its many areas of functionality as well as customize its
workspace. The primary tools you can use to configure and update the IDE include the following:

Options Window. The Options window enables you to set general IDE settings, edit any of the IDE's
configurable settings and set keyboard shortcuts.

• Working with the Options Window

• The Options window enables you to change any of the IDE's configurable
settings. You select a category at the top of the window to display its settings
in the lower pane. Depending on the category, you can click on the tabs in the
lower pane to access additional settings.

• The changes are applied when you click Apply. Options window by choosing
Tools > Options. (On Mac OS X, choose NetBeans > Preferences.)

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 23


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

• Plugins Manager. The Plugins manager enables you to enable and disable
installed plugins and add new or updated plugins to the IDE.

• How to Edit IDE Setting

• You use the Options window to specify global settings for the IDE. Settings
that you specify at the project level override the settings that you specify in the
Options window.

• To edit IDE settings in the Options window:

1. Open the Options window by choosing Tools > Options from the main
menu. (If you are running on Mac OS X, choose NetBeans > Preferences.)
2. Select the category in the upper pane to display the configurable settings.
3. Modify the settings.
4. Click Apply.

• How to Import IDE Settings

• When you launch a new version of the IDE for the first time, you are prompted
with the option of importing settings from a previous version of the IDE. This
prompt occurs only if you have a user directory on your system from the
previous version of the IDE and the user directory is in the default location.

• The settings that are imported include the following items:

1. Keyboard shortcuts
2. Most Source Editor font and colour settings
3. Java Platform Manager contents
4. Library Manager contents
5. Database drivers
6. Servers

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 24


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

• You can recreate the conditions of the first launch at any time by deleting your
current userdir. When you restart the IDE you will be prompted with the
option of importing settings from a previous version of the IDE.

• If you do not import the settings at the first launch but later decide that you
would like to import the settings from a previous installation, you can choose
the settings that you would like to import in the Options window.

• Importing settings may overwrite your existing settings. To prevent possible


loss of your settings, use the Export settings function to create a backup of
your IDE settings.

• To import IDE settings:


1. Open the Options window by choosing Tools > Options from the main
menu. (If you are running on Mac OS X, choose NetBeans >
Preferences.)
2. Click Import at the bottom of the Options window.
3. Click Browse and locate either of the following:
4. The zip archive that contains your settings
5. The userdir of the IDE installation that has the settings that you want to
Import
6. Select the Options categories that you want to import. Click OK. You
will need to restart the IDE to apply the imported settings.

• About NetBeans Modules

➢ A NetBeans module is a Java archive file which contains Java classes


written to interact with the NetBeans APIs. For more information, A
module identifies itself as a module by an entry in its MANIFEST.MF
file. NetBeans modules are packaged as NBM files (.nbm extension)
for non-installer distribution, usually via the Plugins manager under
the Tools menu.

➢ NetBeans modules are written with one of two aims in mind:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 25


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

1. Extending the IDE - You can very easily generate skeleton code
for extending the IDE's functionality with new features. For
example, you can use the skeleton code to write modules that make
your favourite cutting-edge technologies available to the NetBeans
IDE. Or, if you miss some functionality in the IDE, you can add it
yourself, by using the skeleton code to write a module that
provides the desired functionality

2. Building a rich-client application - You can use the core of the


IDE as a platform on top of which you develop standalone desktop
applications. The core of the IDE is a separate product called the
NetBeans Platform. For more information by basing your
application on the NetBeans Platform, you can save a lot of
development time, because you can reuse the platform's existing
features such as menus, toolbars, and windowing systems.

3. Even though it is a separate product, there is little need to


download the NetBeans Platform separately—you can develop the
rich-client application in the IDE and then exclude the modules
that are specific to the IDE but that are superfluous to your
application. Only when you want to use a different version of the
platform than

is included in the IDE, does it make sense to download the


NetBeans Platform and install the modules that define the
application into it.

• About the NetBeans Platform:

The NetBeans Platform provides an application's common requirements—such as menus,


document management, and settings—right out of the box. Building an application "on
top of NetBeans" means that, instead of writing applications from scratch, you only

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 26


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

provide the parts of your application that the NetBeans Platform doesn't already have. At
the end of the development cycle, you bundle your application with the NetBeans
Platform, saving you time and energy and resulting in a solid, reliable application.

• Working with a JavaFX Project:

➢ To work with JavaFX in NetBeans IDE, you must have the following:
➢ Installed JavaFX 2 SDK and Runtime
➢ A JavaFX-enabled Java Platform within the IDE

• JavaFX Application and JavaFX FXML Applications:

➢ In a JavaFX Application without FXML, graphic layout and actions


are both defined in Java classes. By default, both are defined in the
main Application class.
➢ In a JavaFX FXML application, graphic layout is defined in an FXML
file and actions are defined in a controller Java class. The controller
class implements the interface javafx.fxml.Initializable.

• JavaFX Preloaders:

➢ A preloader is a small application that is started before the main


application to customize the start-up experience. You can create JavaFX
preloaders either by running the New JavaFX Preloader wizard or by
selecting Create Custom Preloader in the New JavaFX Application
wizard.

• Editing JavaFX Applications :

➢ Edit JavaFX Java source code as you edit any other Java source code
in the IDE. For more information.

➢ Edit FXML files in one of two ways, depending on whether you have
Scene Builder installed
GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 27
HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

➢ If Scene Builder is installed, go to the Projects window and either


double-click the FXML file's node or right-click the FXML file's node
and select Open. Scene Builder opens automatically, focused on that
FXML file. For information about installing and using Scene Builder,
see the JavaFX Scene Builder documentation.

➢ If Scene Builder is not installed, edit the FXML file as you edit any
XML document in the IDE. If Scene Builder is installed,

➢ You can choose to use the IDE's XML editor instead by right-clicking
the FXML file's node and selecting Edit. For more information.
8.3 NetBeans Start Page:

The start-up page shows the following options:

• Section 1: Menus: The NetBeans IDE is like the menus under other IDE,
i.e. it provides quick options to explore the IDE. Add a new project with the
File menu, add sections to the IDE with the View menu, configure window
with the Windows menu, etc.

• Section 2: Toolbar:
Toolbar is a row(s) of boxes, which you can find on the top of the IDE, just after the
menus. You can add a new project, save the project, etc., without searching the sub-menus
under the menu. Also add more options under Toolbar to ease your work.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 28


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

• Section 3: Start Page:


The start page is the first page, which you will get when you will launch the NetBeans
IDE for the first time. It will be visible always if you won’t uncheck under the Show on
Start-up option. The start-up page has a tour of the NetBeans IDE, sample project, demos,
tutorials, etc.

• Section 4: Show on Start-up:


If you want to show the start-up page every time when the NetBeans IDE
launch, then a separate checkbox is available for it. The start-up page has a
tour of the NetBeans IDE, sample project, demos, tutorials, etc.

• Section 5: Options:
This section provides Learn & Discover menu to access resources,
My NetBeans option where you can set your start-up page options. Also
check the new features and news about NetBeans under what’s new section.

• Section 6: Resources:
Here, official NetBeans resources like sample project, demo tour, etc.
is provided here for NetBeans beginners.

• Section 7: Demos and Tutorials (Resources):


The demo and tutorials for NetBeans IDE is visible here.

• Section 8: Online Documentation:


Key section for beginners provided on the start-up page itself; online
documentation to learn and practically work with NetBeans IDE

• Section 9: Featured Demo: the featured demo i.e. a free course can be
seen here.

• Section 10: Search Box:


The search box is wherein you can search about NetBeans IDE concept, the
search results will take you to resources, demos, sample projects, documentation, etc.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 29


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

8.4 Connecting To MySQL Database:

MySQL is a popular Open Source relational database management system (RDBMS)


commonly used in web applications due to its speed, flexibility and reliability. MySQL
employs SQL, or Structured Query Language, for accessing and processing data contained in
databases.

• Configuring MySQL Server Properties


NetBeans IDE comes bundled with support for the MySQL RDBMS. Before you can access
the MySQL Database Server in NetBeans IDE, you must configure the MySQL Server
properties.

1) Right-click the Databases node in the Services window and choose Register MySQL
Server to open the MySQL Server Properties dialog box.

a) Confirm that the server host name and port are correct.

Notice that the IDE enters localhost as the default server host name and 3306 as the
default server port number.

b) Enter the Administrator user name (if not displayed).

c) Enter the Administrator password. The default is set to blank.

d) Click the Admin Properties tab at the top of the dialog box.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 30


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

• The Admin Properties tab is then displayed, allowing you to enter information for
controlling the MySQL Server.

➢ Starting the MySQL Server

• Before you can connect to a MySQL Database Server, you must first ensure that the
MySQL Database Server is running on your machine. If the database server is not
connected you will see (disconnected) next to the user name in the MySQL Server
node in the Service window and you will not be able to expand the node.

• To connect to the database server, confirm that the MySQL Database Server is
running on your machine, right-click the Databases > MySQL Server node in the
Services window and choose Connect. You might be prompted to supply a password
to connect to the server.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 31


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

➢ Creating and Connecting to the Database Instance


A common way of interacting with databases is through an SQL editor. NetBeans IDE has a
built-in SQL Editor for this purpose. The SQL Editor is generally accessible via the Execute
Command option from the right-click menu of the connection node (or of the connection
node’s child nodes). Now that you are connected to the MySQL server, you can create a new
database instance using the SQL Editor. For purposes of this tutorial, create an instance
called MyNewDatabase.

➢ In the IDE’s Services window, right-click the MySQL Server node and choose Create
Database.

The Create MySQL Database dialog box opens.

➢ In the Create MySQL Database dialog box, type the name of the new database. We
will use MyNewDatabase for this tutorial. Leave the checkbox unselected at this time.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 32


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

➢ Click OK.

The new database appears under the MySQL Server node in the Services window.

➢ Right-click the new database node and choose Connect in the popup menu to open the
connection to the database.

Database connections that are open are represented by a complete connection node ( ) in the
Services window.

➢ Creating Database Tables

Now that you have connected to MyNewDatabase, you can begin exploring how to create
tables, populate them with data, and modify data maintained in tables. This allows you to
take a closer look at the functionality offered by the Database Explorer, as well as NetBeans
IDE’s support for SQL files.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 33


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER: 9 INPUT/OUTPUT SCREENS


9.1 Login Page:

9.2 Signup Page:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 34


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

9.3 Forgot Password Page:

9.4 Admin Login Page:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 35


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

9.5 Admin Home Page:

9.6 Home Page:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 36


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

9.7 Manage Room Page:

9.8 Customer Check-In Page:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 37


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

9.9 Customer Check-Out Page:

9.10 Customer Details Bill Page:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 38


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

9.11 Connection Provider Page:

9.12 Database Table Creation Page:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 39


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

9.12 Database Data Accessing Page:

9.12.1:

9.12.2:

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 40


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER: 10 SAMPLE CODING

10.1 Login Page:

Import java.awt.event.KeyEvent;
Import javax.swing.JOptionPane;
Import java.sql.*;
Import project. Select;
Public class login extends javax.swing.JFrame {
Public login () {
InitComponents ();
}
Private void initComponents () { jLabel2 = new
javax.swing.JLabel (); jLabel3 = new
javax.swing.JLabel (); jTextField1 = new
javax.swing.JTextField (); jPasswordField1 = new
javax.swing.JPasswordField (); jButton1 = new
javax.swing.JButton (); jButton2 = new
javax.swing.JButton (); jButton3 = new
javax.swing.JButton (); jLabel1 = new
javax.swing.JLabel (); jButton4 = new
javax.swing.JButton (); jButton5 = new
javax.swing.JButton (); jPanel1 = new
javax.swing.JPanel (); jLabel4 = new
javax.swing.JLabel ();
SetDefaultCloseOperation (javax.swing.WindowConstants.EXIT_ON_CLOSE);
Set Undecorated (true);
GetContentPane ().set Layout (new org.netbeans.lib.awtextra.AbsoluteLayout ());
jLabel2.setBackground (new java.awt.Color (255, 255, 255)); jLabel2.setFont
(new java.awt.Font ("Tahoma", 1, 14)); // NOI18N jLabel2.setForeground (new
java.awt.Color (255, 255, 255)); jLabel2.setText ("Email");
GetContentPane ().add (jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints (560, 350,
60, -1));

jLabel3.setBackground (new java.awt.Color (255, 255, 255));


jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel3.setForeground(new java.awt.Color(255, 255, 255));
jLabel3.setText("Password");
getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 390, 80,
-1));

jTextField1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 41


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

}
});

jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
jTextField1KeyPressed(evt);
}
});

getContentPane().add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(640, 350,


360, -1));

jPasswordField1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N


jPasswordField1.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
jPasswordField1KeyPressed(evt);
}
});

getContentPane().add(jPasswordField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(640,


390, 360, -1));

jButton1.setBackground(new java.awt.Color(0, 0, 0));


jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jButton1.setForeground(new java.awt.Color(255, 255, 255));
jButton1.setText("Login"); jButton1.addActionListener(new
java.awt.event.ActionListener() { public void
actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jButton1.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
jButton1KeyPressed(evt);
}
});

getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(640, 470, -1,


-1));

jButton2.setBackground(new java.awt.Color(0, 0, 0));


jButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jButton2.setForeground(new java.awt.Color(255, 255, 255));
jButton2.setText("Admin");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
} });

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 42


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

10.7 Manage Room Page:


import com.mysql.cj.Query; import
java.awt.event.KeyEvent;
import project.*; import
java.sql.*;
import javax.swing.JOptionPane; import
javax.swing.event.TableModelEvent; import
javax.swing.table.DefaultTableModel; public class
manageRoom extends javax.swing.JFrame { public
manageRoom() {
initComponents();
}
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable(); jLabel2 =
new javax.swing.JLabel(); jTextField1 = new
javax.swing.JTextField(); jLabel3 = new
javax.swing.JLabel(); jComboBox1 = new
javax.swing.JComboBox<>(); jLabel4 = new
javax.swing.JLabel(); jComboBox2 = new
javax.swing.JComboBox<>();
jLabel5 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton(); jLabel6
= new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setLocation(new java.awt.Point(50, 118)); setUndecorated(true);
addComponentListener(new java.awt.event.ComponentAdapter() {
public void componentShown(java.awt.event.ComponentEvent evt) {
formComponentShown(evt);
}
});
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel1.setFont(new java.awt.Font("Algerian", 1, 14)); // NOI18N
jLabel1.setForeground(new java.awt.Color(240, 0, 0));
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/manage
room.png"))); // NOI18N
private void formComponentShown(java.awt.event.ComponentEvent evt) {
ResultSet rs=Select.getData("select *from room");
DefaultTableModel model=(DefaultTableModel)jTable1.getModel();
try {
while(rs.next())
{
model.addRow(new
Object[]{rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5)});

} rs.close
();

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 43


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

}
Catch (Exception e)
{
JOptionPane.showMessageDialog (null, e);
}
}
Try { for
(javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(manageRoom.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(manageRoom.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(manageRoom.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(manageRoom.class.getName()).log(java.util.logging.Level.SEVE
RE, null, ex);
}
public void run() {
new manageRoom().setVisible(true);
}
});
}
private javax.swing.JButton jButton1; private
javax.swing.JButton jButton2; private
javax.swing.JButton jButton3; private
javax.swing.JComboBox<String> jComboBox1; private
javax.swing.JComboBox<String> jComboBox2;
private javax.swing.JLabel jLabel1; private
javax.swing.JLabel jLabel2; private
javax.swing.JLabel jLabel3; private
javax.swing.JLabel jLabel4; private
javax.swing.JLabel jLabel5; private
javax.swing.JLabel jLabel6; private
javax.swing.JScrollPane jScrollPane1; private
javax.swing.JTable jTable1; private
javax.swing.JTextField jTextField1; private
javax.swing.JTextField jTextField2;
}

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 44


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

10.8 Customer Check-In Page:

import java.awt.event.KeyEvent;
import java.text.SimpleDateFormat;
import java.util.Calendar; import
javax.swing.JOptionPane;
import java.sql.*; import project.*;
initComponents();
jTextField7.setEditable(false);
jTextField8.setEditable(false);
SimpleDateFormat myFormat= new SimpleDateFormat("dd/MM/yyyy");
Calendar Cal=Calendar.getInstance();
jTextField7.setText(myFormat.format(Cal.getTime()));
}
String bed;
String roomType;
String roomNo; String
Price; public void
roomDetails() {
jComboBox4.removeAllItems();
jTextField8.setText("");
bed=(String)jComboBox2.getSelectedItem();
roomType=(String)jComboBox3.getSelectedItem();
try {
ResultSet rs=Select.getData("select *from room where bed='"+bed+"' and
roomType='"+roomType+"' and status='Not Booked'");
while(rs.next())
{
jComboBox4.addItem(rs.getString(1));
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, e);
}
}
private void initComponents() { jLabel1 = new
javax.swing.JLabel(); jButton1 = new
javax.swing.JButton(); jLabel2 = new

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 45


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

CHAPTER: 11 TESTING AND RESULTS

11.1 SOFTWARE TESTING:

As the coding is completed according to the requirement, we have to test the quality of the
software. Software testing is a critical element of software quality assurance and represents the
ultimate review of specification, design and coding. Although testing is to uncover the errors
in the software but is also demonstrates that software functions appear to be working as per the
specification, those performance requirements appear to have been met, In addition, data
collected as testing is conducted provide a good indication of software reliability and some
indications of software quality as a whole.
11.2 MySQL CONNECTION TESTING:

MySQL 8.0 is a new generation of application is on the horizon for business and
consumers. The connection between the NetBeans and MySQL 8.0 database is Legit and
there was minor errors occurred before creation of database later on the errors cleared and the
project run very smoothly without any errors but with some minor warnings, Basically the
warnings are common it’s not harmful, But the project run without any errors. The MySQL is
used to store the data which are entered by the employee in the backend. This database is so
secured that the only admin can access the entire database, Even the employee cannot access.
The employee can only update or delete the contents of database. So that we can purely trust
this MySQL database.

11.3 DATABASE TESTING:

Database creation in the MySQL 8.0 is very easy that any person can understand how
to create database. In our Hotel Management System there was no error detected while
creating database. Later the database has been enquired thoroughly after creating it there was
no error detected. The connection from NetBeans to MySQL database is legit. In this case
there was no errors detected and the database is performing as usual there is no worries.

Database connection is not at all a problem.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 46


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

11.4 DATABASE TABLE CREATION TESTING:


MySQL 8.0 database table creation is not a problem the tables created easily without
any errors. The inserted table types are correct, The main errors occurs while creating table
database are mainly table type and table description the main errors are lies in between these
two. In our case we entered the table description correctly. So there are no errors found while
creating a table in database.

11.5 DATABASE DETAILS UPDATE & DELETE TESTING:


MySQL 8.0 database table updating is not a problem the tables can easily updated
without any errors. The query given in project source code is legit, So that the update of table
is easily done in the MySQL with the help of project. We can easily directly access the
database through our project, So that we can trust our project. In case of any error while
updating the table we can easily clear the errors. So far till now I did not got any errors while
updating the table in SQL

11.6 SYSTEM TESTING:

System testing is designated to uncover weakness that was not detected in the earlier
beats. The total system is tested for recovery and feedback after various major failures to
ensure that no data are lost. An acceptance test is done to validity and reliability of the
system. The philosophy behind the testing is to find error in project, there are many test cases
designed with this in mind. The flow of testing is as follows.
11.6.1 CODE TESTING:

Specification testing is done to check if the program does with it should do and how it
should behave under various condition or combinations and submitted for processing in the
system and it is checked if any overlaps occur during the processing.
This strategy examines the logic of the program. Here only syntax of the code is tested. In
code testing syntax error are corrected, to ensure that the code is perfect.
11.6.2 UNIT TESTING:
The first level of testing is called unit testing. Here different modules are tested against the
specifications produced during the design of the modules. Unit testing is done to test the
working of individual modules with test oracles

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 47


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

Unit testing comprises a set of tests performed by an individual programmer prior to


integration of the units into a large system. A program unit is usually small enough that the
programmer who developed it can rest it in a great detail. Unit testing focuses first IB the
modules to locate errors these errors are verified and corrected so that the unit perfectly fits to
the project.

11.6.3 SYSTEM TESTING:


The next level of testing is system testing and acceptance testing. This testing is done
to check if the system has met its requirements and to find the external behaviour of the
system

System testing involves two kinds of activities:

➢ Integration testing.
➢ Acceptance testing.

11.6.4 INTEGRATION TESTING:

The next level of testing is called the Integration Testing. In this many tested modules
are combined into subsystems, which were then tested.

Test case data is prepared to check the control flow of all the modules and to exhaust
all possible inputs to the program. Situations like treating the modules when there is no data
entered in the test box is also tested.

This testing strategy dictates the order in which modules must be available, and exerts
strong influence on the order in which the modules must be written. Debugged and unit
tested. In integration testing, all the modules units on which unit testing is performed are
integrated together and tested.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 48


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

11.6.5 ACCEPTANCE TESTING:

This testing is performed finally by user to demonstrate that the implemented system
satisfies its requirements. The user gives various inputs to get required outputs.

11.6.6 SPECIFICATION TESTING:

Specification testing is done to check if the program does what it should do and how it
should behave under various conditions or combination and submitted for processing in the
system and it is checked if any overlaps occur during the processing.

11.6.7 PERFORMANCE TIME TESTING:

Performance time testing is done to determine how long it takes to accept and respond
i.e.. The total time for processing when it has to handle quite a large number of records. It is
essential to check the exception speed of the system, which runs well with only a handful of
test transactions. Such systems might be slow when fully loaded. So testing is done by
providing large number of data for processing. A system testing is designed to uncover
weaknesses that were not detected in the earlier tests.
The total system is tested for recovery and fall back after various major failures to
ensure that no data are lost during an emergency. An acceptance test is done to ensure the
user about the validity and reliability of the system.

11.7 TEST CASE FOR HOTEL MANAGEMENT SYSTEM:

Following are some of the important test cases are expected as per the testing
plan used for the Hotel Management System.

1. Test conducted in the activities of the Customer Details, Signup, Login are as follows:
Test Case No. 1
Module Signup, Login, Customer Details

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 49


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

Test Only characters for name column and numbers for mobile number
column

Expected Result Taking only inputted name and mobile number.


Test Result Tested-OK

2. Test conducted in the activities of the Administrator Module are as follows:


Test Case No. 2
Module Admin Login, Employee Login
Test No Case Sensitive for email field.
Expected Result Inputting non case sensitive email field.
Test Result Tested-OK

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 50


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

Chapter: 12 FUTURE ENHANCEMENTS

Enhancement means adding, modifying, or redeveloping the code


to support changes in the specifications. It is necessary to keep up with changing user needs
and the operational environment.
Since no system is ever complete, Online Hostel Management
System can further be developed to include more operations and analysis, as changes are
required by end users of the system.

• The System can also be developed using JAVA with the help of NetBeans
Application software.

• The System can also be developed for all Hostel Management.

Graphical Reports can be designed with graphs such as data flow


diagram and ER diagram. This will provide clear picture of a ratio of the stored data can be
retained for future enhancement.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 51


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

Chapter: 13 CONCLUSIONS

The system is designed in such an extendable fashion to incorporate the future changes to the
system easily. Any particular can be added easily and get connected to the menu. The various
user-friendly features are introduced in this project. There are several future ideas to develop
this application, still in mind. All the links to other forms are generated and are tested with
the actual system.

The database connectivity is tested with the user requirements and verified for the
validity. The software requirements have been met. Needed documents are generated and
adequate documentation has been provided for maintenance and further enhancements. The
operation required by the user to operate the system is basic computer knowledge only.

Finally, this is Well graphics project and all the forms are very easy to understand for
every computer operator, so that the transactions of the databases for completely recorded in
a report in the form of SQL data report. No confusions for the required Final printing reports
for all modules in well append project such as channel details, programme details,
programmer details, sponsor details, programme schedule, sample programme table,
registered channel, advertisement details, sample adds on programme, programme ratings,
sponsors, list of allotted programmes, programme schedule list, list of adds, programme
schedule report, programmer details report, sponsor details report, programme rating report
and about us. These modules are completely validated and 100% verifications done in the
frontend tool visual studio and inserted well graphics design

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 52


HOTEL MANAGEMENT SYSTEM | BCA V SEM 2022-2023

Chapter: 14 Bibilography

WEBSITES:

Following websites are referring to create this project reports.

• http://www.google.com
• http://www.microsoft.com
• Welcome to Apache NetBeans
• http://www.wikipedia.org
• http://www.mysql.com

REFERENCES:

• YouTube tutorials.
• MySQL Query’s.
• How to use NetBeans.
• How to use MySQL.
• Connecting database to MySQL through NetBeans.

GT INSTITUTION OF MANAGEMENT STUDIES & RESEARCH 53

You might also like