The Library Management System is a simple command-line application built using C++. This project allows users to manage library records, including books and users. It supports functionalities like adding, removing, updating, and searching for books and users. The data is persistently stored in text files, enabling basic file management operations for library systems.
- Add User: Add a new user to the library system by providing their first and last names.
- Remove User: Remove a user from the system based on their details.
- Search for a User: Search for users by name.
- Display All Users: List all users currently in the library system.
- Update User Information: Modify existing user details.
- Add Book: Add a new book to the library system by providing details such as title, author, year, and genre.
- Remove Book: Remove a book from the system by title.
- Search for a Book: Search for books by title or other details.
- Display All Books: List all books currently stored in the system.
- Update Book Information: Modify details of an existing book.
The project is broken into modular components to ensure scalability and maintainability.
├── Books.h # Header file defining the Book class and its methods
├── LibraryFileUtils.h # Header file containing file utility functions (save, delete, update)
├── LibrarySystem.cpp # Main source file handling the CLI interface and system logic
├── LibraryUtils.h # Header file for general utility functions (e.g., searching, displaying)
├── User.h # Header file defining the User class and its methods
└── README.md # Project documentation
- A C++ compiler (e.g., g++ or clang)
- Basic knowledge of C++ programming and file handling
- Optional: IDE like Qt Creator or Visual Studio Code for development
-
Clone the Repository:
git clone <https://github.com/Akins20/Library-Manager.git>
-
Navigate to the Project Directory:
cd Library-Manager -
Compile the Project: Using
g++, you can compile the project as follows:g++ -o library_app LibrarySystem.cpp
-
Run the Application: Once compiled, you can run the executable:
./library_app
When you run the program, the main menu will appear in the terminal, prompting you to choose an action:
Library Management System
1. Add a user
2. Remove a user
3. Add a book
4. Remove a book
5. Search for a user
6. Search for a book
7. Display all users
8. Display all books
9. Update a book
10. Update a user
11. Exit
Enter your choice:
Simply enter the corresponding number for the action you wish to perform.
-
Adding a User: The user will be prompted to input the first name and last name. This data is stored in a file (
users.txt). -
Removing a User: The system searches for the user based on their details and removes them from the file.
-
Updating a User: You can update a user's name, which will overwrite the current data in the file.
-
Adding a Book: The user provides details like title, author, year, and genre, which are then stored in a file (
books.txt). -
Removing a Book: The system searches for a book by title and removes its details from the file.
-
Updating a Book: The user can update the book’s details such as title, author, year, and genre.
-
Improved Search Functionality: Implementing partial search or case-insensitive search for users and books.
-
File Optimization: Moving to a more efficient file handling mechanism (e.g., indexed file structures or databases like SQLite) for larger-scale systems.
-
User Role Management: Implement different user roles (like librarian and member) to introduce different permission levels for adding or removing books and users.
-
Graphical User Interface (GUI): Transitioning the CLI application into a GUI-based application using a framework like Qt.
Feel free to fork the repository and submit pull requests for any improvements or bug fixes. All contributions are welcome!
For any questions or suggestions, feel free to contact:
- Developer: Elijah Ogunbiyi (Akins)
- Email: ogunbiye@gmail.com