Living Eco Hotel Management System is a console-based C program designed to streamline hotel room management. The system enables staff or admin to perform essential operations such as room booking, check-in/check-out, booking cancellation, stay extension/reduction, and viewing room statuses. Secure login for staff/admin users is supported, ensuring only authorized personnel can access management features.
Room Booking: Reserve rooms for customers, including locals and foreigners, by selecting available rooms and entering their details. Supports bookings for future dates and enforces guest capacity per room.
Check-in/Check-out: Verify customer details and process room check-ins/check-outs, including displaying stay bills and payment collection.
Booking Management: Cancel bookings, extend or reduce stay duration, and show a list of current bookings with customer information.
Room Status Overview: Display all rooms with their status (Available, Booked, Reserved), rent, maximum capacity, AC status, and booking dates.
Secure Staff/Admin Login: Access management console via secure credentials to protect sensitive booking operations.
Data Model:
Each hotel room is represented by a Room struct, with fields for booking status, customer details, room information, and linked list navigation.
Core Functions:
bookRoom(), cancelRoom(), checkInRoom(), checkout(), showRooms(), showBookings(), extendorreduceStay()
Input Validation:
Ensures valid phone and NID/passport details, room numbers, date selection.
Date Management:
Uses struct tm for managing booking and check-in dates, supporting future-dated bookings and preventing past date bookings.
Payment Options:
Allows for bill payment through cash, card, or bank transfer, including discount options applied at checkout.
Compile the Program
gcc -o hotel_management hotel_management.c
Note: The program uses <conio.h> for password entry. This header is available on Windows systems.
Run the Program
./hotel_management
Login:
Enter Staff or Admin ID (pre-set IDs: 0, faisal2775, raha545)
Enter Password (pre-set passwords: 0, 01882740912, islam)
Menu Options:
Show All Rooms
Book Room
Check In
Check Out
View Bookings
Extend or Reduce Stay
Cancel Booking
Log Out
Follow Console Prompts:
Enter customer details, select rooms, specify dates, and manage bookings as directed.
Implements a linked list for dynamic room management.
Prevents double bookings and enforces logical date rules.
Comprehensive input validation for critical data (phones, NIDs, dates).
Basic billing and discount mechanism included.
The program is console-based and intended for demonstration or small-scale hotel usage.
Designed for Windows due to reliance on <conio.h> for hidden password input; portability may require code adjustment.
All data exists only in memory for the duration of program execution—data persistence is not implemented.
Only supports up to 30 rooms, configured by three blocks of 10 rooms each (room numbers: 101-110, 201-210, 301-310).
Pull requests and suggestions for improvement are welcome! Please fork this repository or share feedback to help extend this basic hotel management tool.
This project is open-source and available under the MIT License.