wiki:PrototypeImplementation

Prototype Implementation

Implemented use-cases

This page documents the first application prototype for the Room Reservation System. The prototype is implemented as a Java console application that connects to the PostgreSQL database created in the previous phase. The goal of the prototype is not to represent a complete final application, but to demonstrate that the most important database usage scenarios from Phase P3 can be implemented and executed against the created database.

The prototype implements the following selected use-cases:

The implemented use-cases cover the main database operations needed by the system:

  • reading available rooms from the database;
  • checking reservation availability for a selected date and time interval;
  • creating a new reservation request;
  • selecting users and rooms from lists instead of manually entering identifiers;
  • approving a pending reservation;
  • verifying the created and modified data in the PostgreSQL database.

Prototype overview

The prototype is a simple command-line Java application. After starting the application, the user enters the database connection parameters, and the system connects to the PostgreSQL database through the SSH tunnel. If the connection is successful, the application displays a main menu with the implemented scenarios.

The main menu contains the following options:

  • Search available rooms
  • Create reservation request
  • Approve or reject reservation
  • Exit

The application uses real SQL statements executed against the project schema named project. The prototype uses the same database structure that was created in Phase P2 and the same use-case scenarios that were documented in Phase P3.

Implemented functionality

Search available rooms

The first implemented scenario allows a requester to search for available rooms for a selected date and time interval. The user enters the reservation date, start time, end time, minimum capacity, room type filter, and optional required equipment. The system reads rooms, buildings, equipment assigned to rooms, and existing reservations from the database and returns only rooms that satisfy the selected criteria and do not have an overlapping active reservation.

Detailed documentation: UseCase0001PrototypeImplementation

Create reservation request

The second implemented scenario allows a requester to create a new reservation request. The user does not need to remember internal identifiers such as user_id or room_id. Instead, the application lists available users and available rooms, and the user selects values from the displayed lists. The system then inserts a new reservation record into the database with status pending.

Detailed documentation: UseCase0002PrototypeImplementation

Approve or reject reservation

The third implemented scenario allows an approver to review pending reservations and record an approval decision. The application lists pending reservations, allows the approver to select a reservation, and then records either an approved or rejected decision. The system updates the reservation status and inserts a corresponding approval record.

Detailed documentation: UseCase0003PrototypeImplementation

Build and run instructions

The instructions for compiling, configuring, running, and testing the prototype are documented on the following page:

Source code

The source code of the prototype is prepared as a Java Maven project. The project contains the source code of the application and the required configuration for compiling and running it.

The main source file of the prototype is:

  • src/main/java/mk/finki/roomreservation/App.java

The Maven configuration file is:

  • pom.xml

The application uses JDBC to connect to PostgreSQL and execute the SQL statements needed for the implemented scenarios.

Last modified 17 hours ago Last modified on 06/19/26 00:00:35

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.