This Library Management System (LMS) manages books, patrons, and branches within a library. It allows for operations like book lending, returning, and searching. The system also includes features for recommending books based on patron preferences.
The project tries to follow OOP's concepts, SOLID principles and some design patterns.
- LibraryManagementSystem: The use of the Singleton pattern ensures that there is only one instance of the entire library system, which centralizes the management of branches, patrons, inventory, and lending.
- RecommendationStrategy: Defines a family of algorithms for recommending books. Implemented by:
- RecommendByAuthor: Recommends books based on favorite authors.
- RecommendByGenre: Recommends books based on favorite genres.
Represents a book with attributes like ID, title, author, ISBN, genre(BookGenre enum), and publication year. It also tracks whether the book is borrowed(isBorrowed attributes).
Represents a library patron. Tracks borrowed books, borrowing history, favorite genres, and favorite authors.
Represents a library branch containing book inventory and search capabilities. Manages book transfers between branches. It is composed of BrnachDetails, BookInventory and SearchService classes
Stores details about a branch, including its name and address.
Manages the inventory of books in a branch. Supports adding, removing, updating, and transferring books.
Provides search functionality for books based on title, author, and ISBN.
Manages branches, patrons, and reservations. Provides operations for adding, removing, and transferring branches and books.
Handles operations related to patrons, such as adding, removing, and updating patron details.
Manages book lending and returning. Handles notifications for reservations when books are returned.
Provides methods to display available and borrowed books in a branch.
Defines the strategy for recommending books based on patron preferences.
Recommends books based on the patron's favorite authors.
Recommends books based on the patron's favorite genres.
Manages book recommendations using different strategies.
- Single Responsibility Principle: Each manager class has a clear responsibility, making the code easier to understand and maintain.
- Separation of Concerns: Each manager handles a specific part of the system, making it easy to modify one part without affecting others.
- Flexibility: Different managers can be tested and developed independently.
- Add Book: Add new books to the inventory.
- Remove Book: Remove books from the inventory.
- Update Book: Update book details in the inventory.
- Search Book: Search for books by title, author, or ISBN.
- Add Patron: Add new patrons to the system.
- Remove Patron: Remove patrons from the system.
- Update Patron: Update patron details.
- Add Branch: Add new branches to the system.
- Remove Branch: Remove branches from the system.
- Transfer Book: Transfer books between branches.
- Checkout Book: Check out books to patrons.
- Return Book: Return books to branches.
- Recommend Books: Recommend books to patrons based on their preferences(byGenre or byAuthor).
- Recommend Books: Allows patrons to reserve a already borrowed book. And a notification would be sent to patron when the book is returned saying "its now available for borrow".
- The lending process lacks functionalities such as due dates and borrowing dates.
- The return process does not check the borrowing date and due date to calculate fines.
- The reservation and notification system is not foolproof and requires further improvements in the algorithm/business logic.
Feel free to fork the repository and submit pull requests with improvements or bug fixes.