In this project, we have developed an enhanced Java-based hotel reservation application. This application enables customers to search and book hotel rooms according to room availability.
The primary components of the Hotel Reservation Application include:
- Command Line Interface (CLI): We have utilized the CLI for user interaction, allowing users to input commands to search for available rooms, book rooms, and perform other actions.
- Java Code: This component contains the business logic for the application.
- Java Collections: Java collections are employed for in-memory data storage, such as user information and room availability.
The application architecture is divided into the following layers:
- User Interface (UI): This layer includes a main menu for users who wish to book a room and an admin menu for managing administrative tasks.
- Resources: These act as the Application Programming Interface (API) to our UI.
- Services: The services layer communicates with resources and other services to build the necessary business logic for providing feedback to the UI.
- Data Models: Data models are used to represent the domain within the system (e.g., rooms, reservations, and customers).
One of the key features of this architecture is the use of layers to promote modularity and decoupling. For instance, if we later decide to switch the UI components from a command-line interface to a web-based interface, the layered architecture will facilitate this change.
A UI component should never communicate directly with a service, as this would expose the service implementation to the UI and make it challenging to replace later.
This application utilizes Java version 14.
To run the application, simply compile the project and execute the HotelApplication class.
- Email: kirkgo [at] gmail.com
- LinkedIn: https://www.linkedin.com/in/kirkgo/