This is a simple Hotel Management System implemented in C++ that allows you to manage customer records for a hotel. It's an educational project designed to showcase essential file handling and data management concepts within a command-line interface.
- Book a Room: Book a room by entering customer and room details. The data is stored persistently in a file.
- Search Customer Details: Find a customer's details (name, address, bill) by entering their room number.
- Display Allotted Rooms: View the total number of rooms currently booked.
- Modify Customer Record: Update a customer's details by providing their room number.
- Delete Customer Record: Remove a customer's record from the system by their room number.
- Exit: Gracefully exit the program.
The program operates as a command-line application that interacts with a file to store and retrieve data.
- The system uses a
Customerstruct to store customer details like room number, name, address, and bill amount. - Data is read from and written to a file named
"customer_records.txt". - A
switchstatement in themainfunction handles user input from a menu to execute different functionalities.
- Compile the code: Compile the C++ code using your preferred C++ compiler.
- Run the program: Execute the compiled program to see the Hotel Management System menu.
- Select an option: Use the menu to perform actions like booking rooms, searching for details, or modifying records.
- Customer Records: All data is stored in
"customer_records.txt".
The program is structured around a Customer struct and a set of functions that handle file I/O operations (readCustomerRecords, writeCustomerRecords). The main program loop is managed by a switch statement that processes user input.
This is a basic system for educational purposes. For a real-world application, it would require more robust error handling, data validation, security, and the use of a proper database for more efficient data management.