This is a simple hotel reservation system implemented in Java. It allows users to book rooms, view room availability, and select payment methods.
-
Book a Room
- Users can choose a room number (from 1 to 10).
- If the room is available, it will be booked.
- Users can also select the room category (standard, deluxe, or suite).
-
View Room Availability
- The system displays the availability status of each room.
-
Payment Types
- After booking a room, users can choose between two payment types:
- Cash: Payment received in cash.
- Credit Card: Payment received via credit card.
- After booking a room, users can choose between two payment types:
-
Compile the Java code:
javac HotelReservationSystem.java
-
Run the program:
java HotelReservationSystem
-
Follow the on-screen instructions to book rooms and make payments.
Hotel Reservation System
1. Book a room
2. View room availability
3. Exit
Enter your choice: 1
Enter room number (1-10): 5
You've selected Deluxe category.
Select payment type:
1. Cash
2. Credit Card
Enter payment type (1 or 2): 2
Payment received via credit card. Enjoy your stay!
...
Room Availability:
Room 1: Available
Room 2: Booked
...