A Java Swing desktop application simulating a complete hotel reservation management system.
CodeAlpha Grand Hotel is a full-featured, dark-themed hotel management GUI that lets staff manage room availability, make and cancel bookings, process payments, and generate detailed manager reports — all in one professional desktop application.
- 15 rooms across 4 categories: Standard, Deluxe, Suite, and Presidential
- Real-time availability status (✅ Available / ❌ Booked)
- Filter rooms by type or availability
- Room category cards showing amenities and pricing at a glance
- Full guest information form (name, phone, email)
- Date validation — no past check-in, check-out must be after check-in
- Guest count validation per room capacity
- Live cost calculator showing nights, rate, and total before confirming
- Auto-generated unique Booking ID (e.g.
BK1001)
- View all bookings in a sortable table
- Cancel any confirmed booking with one click
- Smart refund policy on cancellation:
- 7+ days before check-in → 100% refund
- 3–6 days before check-in → 50% refund
- Less than 3 days → No refund
- Fetch any booking by ID and view full details
- Supports Credit/Debit Card, UPI/Net Banking, and Cash
- Generates a unique Transaction ID on successful payment
- Prevents duplicate payments and payments on cancelled bookings
- Full hotel summary: total rooms, availability, occupancy rate
- Confirmed vs cancelled booking counts
- Total revenue from paid bookings
- Revenue and booking breakdown by room type
- List of 10 most recent bookings
- Always-visible top bar showing Available Rooms, Booked Rooms, Total Revenue, and Occupancy %
| Type | Price/Night | Max Guests | Highlights |
|---|---|---|---|
| Standard | ₹1,500 | 2 | WiFi, TV, AC |
| Deluxe | ₹2,800 | 2 | WiFi, TV, AC, Mini Bar, City View |
| Suite | ₹5,500 | 4 | Jacuzzi, Ocean View, Lounge |
| Presidential | ₹12,000 | 6 | Private Pool, Butler Service, Gym |
| Floor | Rooms | Type | Count |
|---|---|---|---|
| 1 | 101 – 105 | Standard | 5 |
| 2 | 201 – 204 | Deluxe | 4 |
| 3 | 301 – 303 | Suite | 3 |
| 4 | 401 – 402 | Presidential | 2 |
Total: 14 Rooms
HotelReservationSystemGUI.java # Main source file
HotelReservationSystemGUI.class # Compiled main class
HotelReservationSystemGUI$Room.class # Inner Room data model
HotelReservationSystemGUI$Booking.class # Inner Booking data model
HotelReservationSystemGUI$RoomType.class # Enum for room categories
HotelReservationSystemGUI$1.class through
HotelReservationSystemGUI$7.class # Anonymous inner classes (renderers, listeners)
- Java 17 or higher
- No external libraries — standard Java SE only (
javax.swing,java.awt,java.time,java.util)
Place all .class files in the same directory and run:
java HotelReservationSystemGUIjavac HotelReservationSystemGUI.java
java HotelReservationSystemGUI- Browse rooms → Go to the 🛏 Rooms tab, use the filter dropdown to find available rooms.
- Make a booking → Go to 📅 New Booking, fill in guest details, select room and dates, click Calculate Cost, then Confirm Booking.
- View all bookings → Go to 📋 All Bookings to see every reservation and cancel if needed.
- Process payment → Go to 💳 Payment, enter the Booking ID, select payment method, and click Confirm Payment.
- Generate report → Go to 📊 Report and click Generate Full Report for a complete hotel summary.
Sidhant Kumar 🎓 Java Programming Intern @ CodeAlpha 🐙 GitHub: sidhantkumar2007 📌 Project: CodeAlpha Internship — Task 4
