This repository contains the source code for a Hotel Management System implemented in Java. The system provides functionality for managing hotel operations, such as check-in, check-out, room management, and payment processing. It utilizes Java Swing for the graphical user interface.
In MangeRoom.java if someone want to add a room which room number is already exist than it should allow user to add new room. The issue in the code lies in the while loop condition and its execution. In each iteration of the loop, it is calling br.readLine() twice, which skips a line from the file.
In this updated code, I assign the line read from the file to the line variable within the loop condition. This way, the same line is used for the comparison within the loop's block, ensuring that it is not skipped.
In MangeRoom.java if someone want to add a room which room number is already exist than it should allow user to add new room. The issue in the code lies in the while loop condition and its execution. In each iteration of the loop, it is calling br.readLine() twice, which skips a line from the file. In this updated code, I assign the line read from the file to the line variable within the loop condition. This way, the same line is used for the comparison within the loop's block, ensuring that it is not skipped.