By HARISH SS
Java-based reservation system for booking and removing rooms, tracking total bookings. Utilizes MySQL database, includes input validation, exception handling.
Main
class:
Booked
class:
totalBooked
that retrieves the count of distinct booked rooms from the database and prints the result.NewBooks
class:
RemoveBooks
class:
removeBookedRooms
that removes a booked room from the database based on the room number provided.DataBaseCon
class:
DATABASE SQL QUERY:
# RESULT:
Enter 1 to check number of booked room :
Enter 2 to book the room:
Enter 3 to remove the booked room:
Enter your choice form (1 to 3):
1
Total number of booked rooms: 6
Enter 1 to check number of booked room :
Enter 2 to book the room:
Enter 3 to remove the booked room:
Enter your choice form (1 to 3):
2
Enter your username:
KISHORE
Enter your age:
33
Enter your mobile number:
3423424534
Rows affected: 1
User details have been updated.
Enter 1 to check number of booked room :
Enter 2 to book the room:
Enter 3 to remove the booked room:
Enter your choice form (1 to 3):
3
Enter Your Room Number:
9
Rows affected: 0
The room has been successfully unbooked.
Enter 1 to check number of booked room :
Enter 2 to book the room:
Enter 3 to remove the booked room:
Enter your choice form (1 to 3):
3
Enter Your Room Number:
10
Rows affected: 1
The room has been successfully unbooked.
Enter 1 to check number of booked room :
Enter 2 to book the room:
Enter 3 to remove the booked room:
Enter your choice form (1 to 3):
-----------------------------------------------------END------------------------------------------------------------------
Submitted by HARISH SS (Harishss2002)
Download packets of source code on Coders Packet
Comments