EhsanulHaqueSiam / HotelManagementSystem

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.
MIT License
12 stars 1 forks source link

Same room name add issue fixed #1

Closed NitPaul closed 1 year ago

NitPaul commented 1 year ago

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.