Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
Department of Computer Engineering
Micro-Project Report On
Hotel Management System
In the partial fulfilment of Diploma in Computer Engineering
(Forth Semester)
Submitted By:
Shravan Kukekar (24CM026)
Rohini Lanjulkar (24CM027)
Swejal Lonare (24CM028)
Priyani Madne (24CM029)
Maheshwar Mohorkar (24CM030)
Under the Guidance of :
Prof. G. B. Chavhan
Department of Computer Engineering
2026-27
REPORT ON HOTEL MANAGEMENT SYSTEM 1
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
CERTIFICATE
This is to certify that the Micro-project entitled
Hotel Management System
is a bonafide work and it is submitted to the
Government Polytechnic, Amravati.
By
Shravan Kukekar (24CM026)
Rohini Lanjulkar (24CM027)
Swejal Lonare (24CM028)
Priyani Madne (24CM029)
Maheshwar Mohorkar (24CM030)
Submitted for partial fulfilment of course FC4509 (Java
Programming) of the Diploma Programme in Computer
Engineering, during the academic year 2025-2026
under guidance.
Prof. G. B. Chavhan Dr. P.P. Karde
Lectural in Computer Head of the Department
Engineering Department Computer Engineering
REPORT ON HOTEL MANAGEMENT SYSTEM 2
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
ABSTRACT
The Hotel Management System is a desktop-based application developed
using the Java programming language and the Abstract Window Toolkit
(AWT) for graphical user interface design. The main objective of this
project is to provide a simple and efficient system for managing basic
hotel operations such as customer registration, room booking, record
viewing, deletion of customer data, and billing.
The system is designed to replace manual methods of maintaining
records, which are often time-consuming and prone to errors. By
automating these processes, the application improves accuracy, speed,
and overall efficiency. The user interacts with the system through a
graphical interface consisting of buttons, labels, text fields, and other
components provided by AWT.
The project makes use of core Java concepts such as object-oriented
programming, event handling, and file handling. Customer and booking
details are stored in text files, ensuring data persistence even after the
application is closed. The use of file handling eliminates the need for a
database, making the system simple and easy to implement.
The application is divided into different modules, including adding
customers, deleting customer records, booking rooms, viewing booking
details, and generating bills. Each module is designed to perform a
specific task, making the system modular and easy to understand.
Additionally, the system enhances user experience by displaying all
application windows at the center of the screen. This improvement makes
the interface more organized and visually appealing.
Although the system is basic and intended for small-scale use, it
demonstrates how Java can be used to develop real-world applications
with graphical interfaces and data storage capabilities. The project can be
further enhanced by integrating a database, improving the user interface,
and adding advanced features.
REPORT ON HOTEL MANAGEMENT SYSTEM 3
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
Introduction
The Hotel Management System is a desktop-based application developed
using the Java programming language with the help of the Abstract
Window Toolkit (AWT). The main purpose of this project is to design a
simple and efficient system that can manage essential hotel operations
such as customer registration, room booking, record viewing, deletion of
customer data, and billing.
Java is a high-level, object-oriented programming language that is widely
used for developing platform-independent applications. It follows the
principle of “Write Once, Run Anywhere,” meaning that Java programs can
run on any system that supports the Java Virtual Machine (JVM). Java
provides strong support for graphical user interface (GUI) development
through libraries like AWT and Swing.
In this project, AWT is used to design the graphical interface. AWT
provides various components such as Frame, Button, Label, TextField,
TextArea, and Choice, which help in creating interactive applications. The
user interacts with the system through these components, making the
application easy to use.
Another important concept used in this project is event handling. Java
handles user actions like button clicks using event listeners such as
ActionListener. Each button in the system performs a specific operation
when clicked.
The project also makes use of file handling to store and retrieve data.
Instead of using a database, customer and booking information is stored
in text files ([Link] and [Link]). This approach simplifies data
management while still demonstrating persistent storage.
Additionally, the system has been improved by centering all application
windows using the method setLocationRelativeTo(null), which enhances
the user interface and provides a better user experience.
This project demonstrates how Java can be effectively used to develop
real-world applications with graphical interfaces and data storage
capabilities.
REPORT ON HOTEL MANAGEMENT SYSTEM 4
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
Objectives of the Project :
The main objective of the Hotel Management System is to automate the
basic operations of a hotel in order to improve efficiency and reduce
manual workload. In traditional hotel systems, records are often
maintained manually, which can lead to errors, data loss, and inefficiency.
This project aims to overcome these problems by providing a
computerized solution.
Another important objective is to develop a system that is simple and
user-friendly. The use of AWT components ensures that users can easily
interact with the system through buttons, text fields, and menus without
requiring advanced technical knowledge.
The project also aims to demonstrate the practical implementation of core
Java concepts such as object-oriented programming, event handling, and
file handling. By dividing the system into different modules, the project
helps in understanding how large applications are structured and
managed.
Furthermore, the project focuses on data persistence by storing
information in text files. This ensures that customer and booking records
are (saved) even after the program is closed.
Finally, the project serves as a learning platform for developing real-world
applications and improving programming skills.
Project Overview / Structure :
The Hotel Management System is designed as a menu-driven application
where the main window provides access to different functionalities
through buttons. Each button opens a new window that performs a
specific operation.
The system is divided into multiple classes, and each class represents a
separate module. This modular approach improves code organization and
readability.
The main modules of the system include customer management, deletion
of customer records, room booking, viewing booking details, and billing.
REPORT ON HOTEL MANAGEMENT SYSTEM 5
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
The main class acts as the central controller that connects all modules.
When the user clicks a button, the corresponding module is activated, and
a new window is displayed.
The system uses file handling to store data permanently. Customer details
are stored in [Link], while booking details are stored in
[Link]. These files are automatically created in the project directory.
The use of multiple frames allows the system to separate different
functionalities, making the application more organized and easy to use.
Java Key Concepts Used in the Project :
1. Object-Oriented Programming (OOP):
The project is developed using object-oriented programming principles,
where the entire system is divided into multiple classes such as the main
class, AddCustomer, DeleteCustomer, BookRoom, ViewRooms, and
Checkout. Each class is responsible for a specific functionality, which
improves the modularity and organization of the program.
2. Graphical User Interface (GUI) using AWT:
The application uses the Abstract Window Toolkit (AWT) to design the
graphical user interface. Various components such as Frame, Button,
Label, TextField, TextArea, and Choice are used to build interactive
screens. These components allow users to interact with the system
through a visual interface instead of command-line input, making the
application more user-friendly and easier to operate.
3. Event Handling:
Event handling is an important concept used in this project to manage
user interactions. When a user clicks a button or performs an action, an
event is generated. These events are handled using the ActionListener
interface. Each button in the system is linked to an action listener that
defines what operation should be performed when the button is clicked.
This makes the application dynamic and responsive.
4. File Handling:
The project uses file handling to store and retrieve data permanently.
Classes like FileWriter are used to write data into files, while
BufferedReader is used to read data from files. Customer details are
stored in [Link], and booking details are stored in [Link]. This
REPORT ON HOTEL MANAGEMENT SYSTEM 6
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
ensures that data is ( محفوظsaved) even after the application is closed,
eliminating the need for a database.
5. AWT Layout and Window Management:
The project uses layout management techniques to arrange components
on the screen. In some parts, absolute positioning is used with
setBounds(). Additionally, all windows are centered on the screen using
the method setLocationRelativeTo(null), which improves the appearance
and user experience of the application.
6. Input Handling and User Interaction:
The system collects user input through TextField components and
processes it based on the selected operation. This allows users to enter
data such as customer name, phone number, and booking details, making
the system interactive and functional.
Java Code :
1) Import Statements :
import [Link].*;
import [Link].*;
import [Link].*;
2) Main Class Declaration & Variables :
class HotelManagementSystem extends Frame implements ActionListener
{
Button addCustomer, deleteCustomer, bookRoom, viewRooms,
checkout, exit;
HotelManagementSystem() {
setTitle("Hotel Management System");
setSize(500, 400);
setLayout(null);
Label title = new Label("HOTEL MANAGEMENT SYSTEM");
[Link](120, 50, 300, 30);
add(title);
REPORT ON HOTEL MANAGEMENT SYSTEM 7
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
addCustomer = new Button("Add Customer");
deleteCustomer = new Button("Delete Customer");
bookRoom = new Button("Book Room");
viewRooms = new Button("View Rooms");
checkout = new Button("Checkout");
exit = new Button("Exit")
[Link](150, 100, 200, 30);
[Link](150, 140, 200, 30);
[Link](150, 180, 200, 30);
[Link](150, 220, 200, 30);
[Link](150, 260, 200, 30);
[Link](150, 300, 200, 30);
add(addCustomer); add(deleteCustomer); add(bookRoom);
add(viewRooms); add(checkout); add(exit);
[Link](this);
[Link](this);
[Link](this);
[Link](this);
[Link](this);
[Link](this);
setLocationRelativeTo(null);
setVisible(true);
3)Event Handling (Main Menu Actions) :
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
dispose();
}
REPORT ON HOTEL MANAGEMENT SYSTEM 8
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
});
}
public void actionPerformed(ActionEvent e) {
if ([Link]() == addCustomer) new AddCustomer();
else if ([Link]() == deleteCustomer) new DeleteCustomer();
else if ([Link]() == bookRoom) new BookRoom();
else if ([Link]() == viewRooms) new ViewRooms();
else if ([Link]() == checkout) new Checkout();
else if ([Link]() == exit) [Link](0);
}
public static void main(String[] args) {
new HotelManagementSystem();
}
}
4)Add Customer Class :
class AddCustomer extends Frame implements ActionListener {
TextField name, phone;
Button save;
AddCustomer() {
setTitle("Add Customer");
setSize(300, 200);
setLayout(new FlowLayout());
add(new Label("Name:"));
name = new TextField(20);
add(name);
add(new Label("Phone:"));
phone = new TextField(20);
add(phone);
save = new Button("Save");
REPORT ON HOTEL MANAGEMENT SYSTEM 9
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
add(save);
[Link](this);
setLocationRelativeTo(null);
setVisible(true);
}
5)Add Customer Logic (File Handling) :
public void actionPerformed(ActionEvent e) {
try {
FileWriter fw = new FileWriter("[Link]", true);
[Link]([Link]() + "," + [Link]() + "\n");
[Link]();
[Link]("Customer Saved!");
} catch (Exception ex) {
[Link]("Error");
}
}
}
6)Delete Customer Class :
class DeleteCustomer extends Frame implements ActionListener {
TextField name;
Button delete;
DeleteCustomer() {
setTitle("Delete Customer");
setSize(300, 150);
setLayout(new FlowLayout());
add(new Label("Enter Name to Delete:"));
name = new TextField(20);
add(name);
delete = new Button("Delete");
1
REPORT ON HOTEL MANAGEMENT SYSTEM
0
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
add(delete);
[Link](this);
setLocationRelativeTo(null);
setVisible(true);
}
7)Delete Customer Logic :
public void actionPerformed(ActionEvent e) {
try {
BufferedReader br = new BufferedReader(new
FileReader("[Link]"));
FileWriter fw = new FileWriter("[Link]");
String line;
String deleteName = [Link]();
boolean found = false;
while ((line = [Link]()) != null) {
if () {
[Link](line + "\n");
} else { found = true;
}
}
[Link]();
[Link]();
File original = new File("[Link]");
File temp = new File("[Link]");
[Link]();
[Link](original);
if (found)
[Link]("Customer Deleted!");
else
[Link]("Customer Not Found!");
} catch (Exception ex) {
1
REPORT ON HOTEL MANAGEMENT SYSTEM
1
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
[Link]("Error"); }
}
}
8)Book Room Class :
class BookRoom extends Frame implements ActionListener {
TextField name, days;
Choice roomType;
Button book;
BookRoom() {
setTitle("Book Room");
setSize(300, 250);
setLayout(new FlowLayout());
add(new Label("Customer Name:"));
name = new TextField(20);
add(name);
add(new Label("Room Type:"));
roomType = new Choice();
[Link]("Standard");
[Link]("Deluxe");
add(roomType);
add(new Label("Days:"));
days = new TextField(20);
add(days);
book = new Button("Book");
add(book);
[Link](this);
setLocationRelativeTo(null);
setVisible(true);
1
REPORT ON HOTEL MANAGEMENT SYSTEM
2
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
9)Book Room Logic :
public void actionPerformed(ActionEvent e) {
try {
FileWriter fw = new FileWriter("[Link]", true);
[Link]([Link]() + "," + [Link]() + ","
+ [Link]() + "\n");
[Link]();
[Link]("Room Booked!");
} catch (Exception ex) {
[Link]("Error") }
}
10)View Rooms Class :
class ViewRooms extends Frame {
TextArea area;
ViewRooms() {
setTitle("View Bookings");
setSize(400, 300);
area = new TextArea();
add(area);
try {
BufferedReader br = new BufferedReader(new
FileReader("[Link]"));
String line;
while ((line = [Link]()) != null) {
[Link](line + "\n"); }
[Link]();
} catch (Exception e) { [Link]("No bookings found."); }
setLocationRelativeTo(null);
setVisible(true); }
}
1
REPORT ON HOTEL MANAGEMENT SYSTEM
3
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
11)Checkout Class :
class Checkout extends Frame implements ActionListener {
TextField days;
Button calculate;
Label result;
Checkout() {
setTitle("Checkout");
setSize(300, 200);
setLayout(new FlowLayout());
add(new Label("Days Stayed:"));
days = new TextField(20);
add(days);
calculate = new Button("Generate Bill");
add(calculate);
result = new Label("");
add(result);
[Link](this);
setLocationRelativeTo(null);
setVisible(true);
}
12)Checkout Logic :
public void actionPerformed(ActionEvent e) {
int d = [Link]([Link]());
int rate = 1000;
int total = d * rate;
[Link]("Total Bill: ₹" + total);
}
}
Code Explanation :
1
REPORT ON HOTEL MANAGEMENT SYSTEM
4
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
The system is implemented using multiple classes, each handling a
specific functionality.
Import Statements:
The program begins by importing required packages such as [Link] for
GUI components, [Link] for handling user actions, and [Link] for
file handling operations. These packages provide all the necessary classes
used throughout the application.
Main Class (HotelManagementSystem):
The main class extends the Frame class and implements ActionListener to
handle button events. It acts as the entry point of the application and
creates the main menu window. It contains buttons for different operations
like adding customers, deleting customers, booking rooms, viewing
bookings, checkout, and exiting the application.
GUI Design in Main Window:
The constructor of the main class sets the window title, size, and layout.
Labels and buttons are created and positioned using setBounds(). These
components are added to the frame, forming the main user interface. The
window is centered on the screen using setLocationRelativeTo(null).
Event Handling Mechanism:
Each button is associated with an ActionListener. When a button is clicked,
the actionPerformed() method is executed. Based on the button pressed,
the program opens a new window corresponding to that operation, such
as AddCustomer, DeleteCustomer, or BookRoom.
AddCustomer Class:
This class creates a new window for entering customer details. It uses
TextField components to collect name and phone number. When the Save
button is clicked, the data is written into a file named [Link] using
FileWriter in append mode.
1
REPORT ON HOTEL MANAGEMENT SYSTEM
5
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
DeleteCustomer Class:
This class allows deletion of a customer record. It reads the existing file
using BufferedReader and writes all records except the selected one into a
temporary file. After processing, the original file is replaced with the
updated file, effectively deleting the desired record.
BookRoom Class:
This class provides functionality for booking rooms. It collects customer
name, room type, and number of days using input fields and a Choice
component. The data is stored in [Link] using FileWriter.
ViewRooms Class:
This class displays all booking records. It reads data from the file using
BufferedReader and shows it in a TextArea component. If no records are
found, an appropriate message is displayed.
Checkout Class:
This class handles billing operations. It takes the number of days as input
and calculates the total cost using a fixed room rate. The result is
displayed on the screen using a Label.
File Handling Concept:
The program uses FileWriter for writing data and BufferedReader for
reading data from files. This ensures that all records are stored
permanently and can be accessed whenever needed.
Window Handling:
The program uses WindowAdapter to handle window closing events. This
ensures that the application closes properly when the user exits.
User Interaction:
The system interacts with the user through GUI components like buttons
and text fields. Each operation is performed based on user input, making
the system interactive and easy to use.
Output :
1
REPORT ON HOTEL MANAGEMENT SYSTEM
6
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
1) Main Menu Screen :
2) Add Customer Windows :
3) Delete Customer Window :
4) Book Room Window :
1
REPORT ON HOTEL MANAGEMENT SYSTEM
7
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
5) View Room Output :
6) Checkout / Billing Screen :
1
REPORT ON HOTEL MANAGEMENT SYSTEM
8
Government Polytechnic Amravati
(An Autonomous institute of Government of Maharashtra)
Conclusion
The Hotel Management System developed in this project
successfully demonstrates the use of Java programming for
creating a real-world application. It provides a simple and
efficient solution for managing customer records, room
bookings, and billing operations.
The project helped in understanding important concepts such
as GUI design using AWT, event handling, and file handling. The
use of modular programming made the system organized and
easy to maintain.
Although the system has some limitations, it serves as a strong
foundation for developing more advanced applications. With
further improvements, it can be extended into a fully functional
hotel management system suitable for real-world use.
1
REPORT ON HOTEL MANAGEMENT SYSTEM
9