Design and implement a Hotel Management System that manages hotel rooms, reservations, and guest information. The system should handle room bookings, check-ins, check-outs, and maintain room status.
-
Room Management:
- Track different types of rooms (STANDARD, DELUXE, SUITE)
- Manage room availability and status
- Handle room pricing and features
-
Reservation Management:
- Create and manage reservations
- Handle check-in and check-out processes
- Track reservation status (CONFIRMED, CANCELLED, CHECKED_IN, CHECKED_OUT)
-
Guest Management:
- Store guest information
- Track guest history
- Handle guest preferences
-
Room Status Tracking:
- Monitor room availability (AVAILABLE, OCCUPIED, MAINTENANCE)
- Update room status based on reservations
- Handle room maintenance requests
-
Payment Integration:
- Process room payments
- Handle different payment methods
- Generate invoices
- Fields: List rooms, List reservations, List guests
- Methods:
- addRoom()
- makeReservation()
- checkIn()
- checkOut()
- getAvailableRooms()
- cancelReservation()
- Fields: String roomNumber, RoomType type, double price, RoomStatus status
- Methods:
- isAvailable()
- updateStatus()
- getPrice()
- Fields: String id, String name, String email, String phoneNumber
- Methods:
- updateProfile()
- getReservations()
- Fields: String id, Guest guest, Room room, Date checkInDate, Date checkOutDate, ReservationStatus status
- Methods:
- confirm()
- cancel()
- checkIn()
- checkOut()
- Values: STANDARD, DELUXE, SUITE
- Values: AVAILABLE, OCCUPIED, MAINTENANCE
- Values: CONFIRMED, CANCELLED, CHECKED_IN, CHECKED_OUT
HotelManagementSystem system = new HotelManagementSystem();
// Add a room
Room room = system.addRoom("101", RoomType.DELUXE, 150.0);
// Create a guest
Guest guest = new Guest("John Doe", "john@example.com", "1234567890");
// Make a reservation
Reservation reservation = system.makeReservation(guest, room, checkInDate, checkOutDate);
// Check in
system.checkIn(reservation);
// Check out
system.checkOut(reservation);See HotelManagementSystemDemo.java for a sample usage and simulation of the hotel management system.
- Add room service: Track room service requests and delivery
- Add housekeeping: Manage housekeeping schedules and tasks
- Add loyalty program: Implement guest loyalty points and rewards
- Add inventory management: Track hotel supplies and amenities
- Add reporting system: Generate occupancy and revenue reports
- Add notification system: Send booking confirmations and reminders
- Singleton Pattern: For the hotel management system instance
- Factory Pattern: For creating different types of rooms
- Observer Pattern: For room status updates and notifications
- Strategy Pattern: For different pricing strategies
- RoomNotAvailableException: Thrown when trying to book an unavailable room
- InvalidReservationException: Thrown when reservation details are invalid
- CheckInException: Thrown when check-in process fails
- CheckOutException: Thrown when check-out process fails
