0% found this document useful (0 votes)
2 views

AJP_Micro

The document is a micro project report on the 'Hotel Management System' developed by students at Shri Chhatrapati Shivaji Maharaj College of Engineering for the academic year 2024-2025. It details the project's objectives, methodology, and outcomes, highlighting features such as room booking, food ordering, and user interface design. The report includes acknowledgments, a program code, and an evaluation sheet for assessing the project.

Uploaded by

Onkar Maheshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

AJP_Micro

The document is a micro project report on the 'Hotel Management System' developed by students at Shri Chhatrapati Shivaji Maharaj College of Engineering for the academic year 2024-2025. It details the project's objectives, methodology, and outcomes, highlighting features such as room booking, food ordering, and user interface design. The report includes acknowledgments, a program code, and an evaluation sheet for assessing the project.

Uploaded by

Onkar Maheshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Shri Chhatrapati Shivaji Maharaj College

of Engineering Nepti,
Ahmednagar

DEPARTMENT OF COMPUTER
ENGINEERING

MICRO
PROJECT
REPORT
ON
Advanced Java Programming(AJP)
FOR
2024-2025
1|P age
Shri Chhatrapati Shivaji Maharaj College
of Engineering Nepti,
Ahmednagar

CERTIFICATE
This is to certify

that, Name of the

Student,

Akash Khurd 2219530049


Prathmesh Bhapkar 2219530033
Onkar Maheshan 2219530051

have successfully completed the Project work entitled “Hotel Management System” under my
supervision, in the partial fulfillment of the requirements for the TY Diploma in subject Advanced
Java Programming and the report submitted to Prof. Sayali Chitale for academic year 2024-2025.

Date :

Place: Shri Chhatrapati Shivaji Maharaj College of Engineering Nepti, Ahmednagar

Prof. Sayali Chitale Prof,V.V.Jagtap Hon .Dr. Kharde

Y.R Project Guide HOD Principal

2|P age
ACKNOWLEDGMENT

It is my great pleasure to present the honor and sincere gratitude to my guide Prof.Sayali Chitale Shri
Chhatrapati Shivaji Maharaj College Of Engineering A.nagar helped in joining the hands in developing
each and every steps of this project and for valuable guidance and constant encouragement during
completion of project work. It was my privilege and pleasure to work under his valuable guidance. I
am indeedgratefully to him for providing me helpful suggestions. Due to his constant encouragement
andinspiration I could complete my project work. I am very thankful to Principal, Shri Chhatrapati Shivaji
Maharaj College Of Engineering A.nagar
My grateful thanks to Prof.Jagtap.V.V Head of Computer Department, for their valuable
guidance,support and constant encouragement.
I express thanks to my family and friends for their support and encouragement at every stage of successful
completion of this project work.
My sincere thanks to all those who have directly or indirectly helped me to carry out this work.

Akash Khurd
Prathmesh Bhapkar
Onkar Maheshan

3|P age
INDEX
Sr. No Title Page No.
1. Introduction 5
2. Aim 6
3. Literature Review 6
3. Outcomes 6
4. Program 7-11
5. Output 12-15
6. References 15
7. Conclusion 16

4|P age
Introduction

The Hotel Management System is a Java Swing-based desktop application designed to


streamline room bookings and food ordering for hotel guests. It features an intuitive
graphical interface that enables users to easily:

Book Rooms: Guests can enter their details to check availability and reserve rooms,
with real-time updates on room status.

Check Availability: Users can view available rooms instantly, enhancing the booking
experience.

Order Food: Guests can select multiple food items from a menu using a multi-
select list, specifying quantities for their orders.

Calculate Total Cost: The application computes the total cost of food orders and
displays it in a dialog box for clarity.

Input Validation: It includes validation to ensure accurate room numbers and


quantities, providing error feedback when necessary.

This system effectively supports hotel operations, making it easy for staff and guests to
manage bookings and dining needs efficiently.

5|P age
Aim / Benefits of the micro-project
The primary aim of the Hotel Management System is to simplify and automate the
process of managing hotel room bookings and food ordering. By providing a user-
friendly interface, the system seeks to enhance the overall guest experience and
streamline hotel operations. The application is designed to minimize manual errors,
improve efficiency, and facilitate better communication between guests and hotel staff.
The Hotel Management System aims to provide a seamless and efficient solution for
hotel management, benefiting both guests and hotel staff through improved processes
and enhanced experiences.

Literature Review
The development of a Hotel Management System (HMS) with integrated food ordering
capabilities draws upon various concepts, methodologies, and technologies discussed
in existing literature. This review highlights key areas relevant to the system's design
and implementation, including hotel management systems, user interface design, food
ordering systems, and software development methodologies.

Outcomes
Enhanced Efficiency: Streamlined operations reduce staff workload and expedite
service.
Increased Guest Satisfaction: User-friendly interface improves the booking and dining
experience.
Higher Revenue: Easier food ordering encourages additional purchases from guests.
Real-Time Information: Instant updates on room availability and order status
enhance transparency.
Data Insights: Collection of guest preferences informs service improvements and
marketing strategies.

6|P age
Program
import
javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import
java.awt.event.ActionListener;
import java.util.ArrayList;

public class HotelManagementSystem extends JFrame implements ActionListener {


private JTextField nameField;
private JTextField roomField;
private JTextArea outputArea;

// Food ordering components


private JList<String>
foodMenu; private JTextField
quantityField;

// Room availability data


private final int TOTAL_ROOMS = 10; // Example: 10
rooms private ArrayList<Boolean> roomAvailability;

// Food prices
private final double[] foodPrices = {100, 80, 120, 50, 20}; // Prices for Pizza,
Burger, Pasta, Salad, Soda

public HotelManagementSystem() {
// Initialize room availability
roomAvailability = new ArrayList<>(TOTAL_ROOMS);
for (int i = 0; i < TOTAL_ROOMS; i++) {
roomAvailability.add(true); // All rooms are initially available

7|P age
}

// Frame settings

8|P age
setTitle("Hotel Management System");
setSize(400, 400);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLayout(new BorderLayout());

// Input panel for booking


JPanel inputPanel = new JPanel();
inputPanel.setLayout(new GridLayout(3, 2));

inputPanel.add(new JLabel("Guest Name:"));


nameField = new JTextField();
inputPanel.add(nameField);

inputPanel.add(new JLabel("Room Number:"));


roomField = new JTextField();
inputPanel.add(roomField);

JButton bookButton = new JButton("Book Room");


bookButton.addActionListener(this);
inputPanel.add(bookButton);

JButton checkButton = new JButton("Check Availability");


checkButton.addActionListener(this);
inputPanel.add(checkButton);

add(inputPanel, BorderLayout.NORTH);

// Output area
outputArea = new JTextArea();
outputArea.setEditable(false);
add(new JScrollPane(outputArea), BorderLayout.CENTER);

// Food ordering panel


JPanel foodPanel = new JPanel();
foodPanel.setLayout(new BorderLayout());

9|P age
foodPanel.add(new JLabel("Select Food:"), BorderLayout.NORTH);

// Create a JList for food items


String[] foodOptions = {"Pizza @ 100", "Burger @ 80", "Pasta @ 120", "Salad @
50", "Soda @ 20"};
foodMenu = new JList<>(foodOptions);

foodMenu.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTI
ON);
foodMenu.setVisibleRowCount(4); // Display 4 rows at a time
JScrollPane foodScrollPane = new JScrollPane(foodMenu);
foodPanel.add(foodScrollPane, BorderLayout.CENTER);

JPanel quantityPanel = new JPanel();


quantityPanel.setLayout(new FlowLayout());
quantityPanel.add(new JLabel("Quantity:"));
quantityField = new JTextField(5);
quantityPanel.add(quantityField);

JButton orderButton = new JButton("Order Food");


orderButton.addActionListener(this);
quantityPanel.add(orderButton);

foodPanel.add(quantityPanel, BorderLayout.SOUTH);
add(foodPanel, BorderLayout.SOUTH);
}

@Override
public void actionPerformed(ActionEvent e)
{ String command =
e.getActionCommand(); if
(command.equals("Book Room")) {
String name = nameField.getText();
int roomNumber = Integer.parseInt(roomField.getText()) - 1; // Convert to
0- based index

10 | P a g e
if (roomNumber < 0 || roomNumber >= TOTAL_ROOMS) {

11 | P a g e
outputArea.append("Invalid room number. Please choose between 1 and " +
TOTAL_ROOMS + ".\n");
} else if (roomAvailability.get(roomNumber)) {
roomAvailability.set(roomNumber, false); // Mark the room as booked
outputArea.append("Room " + (roomNumber + 1) + " booked for " + name +
".\
n"); } else {
outputArea.append("Room " + (roomNumber + 1) + " is already booked.\n");
}
} else if (command.equals("Check Availability")) {
StringBuilder availableRooms = new StringBuilder("Available Rooms: ");
for (int i = 0; i < TOTAL_ROOMS; i++) {
if (roomAvailability.get(i)) {
availableRooms.append(i + 1).append(" "); // Convert to 1-based index
}
}
outputArea.append(availableRooms.toString() + "\n");
} else if (command.equals("Order Food")) {
StringBuilder orderedItems = new StringBuilder("Ordered: ");
int[] selectedIndices = foodMenu.getSelectedIndices();
String quantityText = quantityField.getText();
int quantity;

// Validate quantity
input try {
quantity = Integer.parseInt(quantityText);
if (quantity <= 0) {
JOptionPane.showMessageDialog(this, "Quantity must be a positive
number.", "Invalid Input", JOptionPane.ERROR_MESSAGE);
return;
}
} catch (NumberFormatException ex) {
JOptionPane.showMessageDialog(this, "Please enter a valid quantity.",
"Invalid Input", JOptionPane.ERROR_MESSAGE);
return;
}

12 | P a g e
double totalCost = 0.0;
if (selectedIndices.length == 0) {
outputArea.append("No food items selected.\
n"); return;
}

for (int index : selectedIndices) {


String foodItem = foodMenu.getModel().getElementAt(index);
double price = foodPrices[index];
totalCost += price * quantity;
orderedItems.append(quantity).append(" of ").append(foodItem).append(",
");
}

// Remove the last comma and space


if (orderedItems.length() > 0) {
orderedItems.setLength(orderedItems.length() - 2);
}

outputArea.append(orderedItems.toString() + ".\n");

// Display total cost using JOptionPane


JOptionPane.showMessageDialog(this, "Total cost: " + totalCost, "Order
Total", JOptionPane.INFORMATION_MESSAGE);
}
}

public static void main(String[] args) {


SwingUtilities.invokeLater(() -> {
HotelManagementSystem hms = new HotelManagementSystem();
hms.setVisible(true);
});
}
}

13 | P a g e
Output

14 | P a g e
15 | P a g e
16 | P a g e
References
https://docs.oracle.com/javase/8/docs/api/javax/swing/
package- summary.html

https://docs.oracle.com/javase/tutorial/uiswing/

https://stackoverflow.com/questions/tagged/swing

https://www.youtube.com/user/caveofprogramming

17 | P a g e
Conclusion
The methodology outlined above provides a comprehensive approach to developing a
Hotel Management System in Java using Swing. By following this methodology, you
ensure that the system is well-planned, robust, and user-friendly. Starting with
thorough requirements analysis, the system is designed using the MVC pattern to
separate concerns, making it easier to manage and extend. The implementation phase
focuses on building a responsive and intuitive user interface, coupled with solid
business logic for room booking, availability checks, and food ordering.
Testing is emphasized to ensure the system functions correctly and meets user
expectations. Finally, the deployment and maintenance phases ensure that the system is
not only delivered effectively but also remains reliable and relevant over time through
updates and enhancements.
By adhering to this structured methodology, you can successfully develop a Hotel
Management System that meets the needs of its users and is adaptable for future growth.

18 | P a g e
Teacher Evaluation Sheet

Name of Student:………………… ……………………………………………………

Enrolment No…………………………………………..

Name of Program……………………Semester:……………………………….

Course Title: …………………. Code:……………………….

Title of the Micro- Project:……………… ………………………………………………….

Course Outcomes Achieved

…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………

19 | P a g e
Evaluation as per suggested Rubric for Assessment of Micro-Project

Process Assessment Product Assessment

Part A- Project Individual


Part B-Project Total
Project Methodology Presentation/Viva
Report/Working Model Marks10
Proposal (2 mark) (4 mark)
(2 marks)
(2 marks)

Sr. Characteristic to be Poor Average Good Excellent


No. assessed (Marks 1-3) (Marks 4-5) (Marks 6-8) (Marks 9-10)

1 Relevance to the course

Literature survey/
2
Information Collection

3 Project Proposal

Completion of the Target


4
as per project proposal

Analysis of Data
5
&
Representation
Quality of
6
Prototype/Model

7 Report Preparation

8 Presentation

20 | P a g e
Micro-Project Evaluation Sheet

Note:

Every course teacher is expected to assign marks for group evolution in first 3 columns & individual
evaluation in 4th columns for each group of students as per rubrics.

Comments/Suggestions about team work/leadership/inter-personal communication(if any).

……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
………………

Anyother comment:

……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
………………

Name and designation of the faculty member


...............................................................................

Signature...........................

21 | P a g e

You might also like