How jprathod2007/java-hotel-reservation-system works
This is a single-file console hotel reservation application. A user selects menu actions; the console entry point delegates room search, booking, cancellation, and reservation listing to HotelService. The service keeps room and reservation state in memory and loads or saves it in two local text files. The excerpts show a simulated payment method, but not its call site, so no payment-flow edge is asserted.
Main entry points: HotelReservationSystem.java Hotel service
Components 7
Console interface
- Console menu
HotelReservationSystem.java
Reservation domain
- Hotel service
HotelReservationSystem.java - Room inventory
HotelReservationSystem.java - Reservation record
HotelReservationSystem.java
Local persistence
- rooms.txt
HotelReservationSystem.java - bookings.txt
HotelReservationSystem.java
Other components
- Hotel guest
Connections 8
- Hotel guest → Console menu: selects actions
HotelReservationSystem.java - Console menu → Hotel service: requests operations
HotelReservationSystem.java - Hotel service → Room inventory: loads and filters
HotelReservationSystem.java - Hotel service → Reservation record: creates and updates
HotelReservationSystem.java - Hotel service → rooms.txt: loads and saves
HotelReservationSystem.java - Hotel service → bookings.txt: loads and saves
HotelReservationSystem.java - Room inventory → rooms.txt: serializes inventory
HotelReservationSystem.java - Reservation record → bookings.txt: serializes bookings
HotelReservationSystem.java