Library Management System.
You have found WIL placement at a local library and quickly noticed that they use a manual book search.
Develop a simple Library Management System. This system should allow users to manage books and
members of the library. The system will require the implementation of various functionalities, including
adding new books, searching for books by title or author, registering new members, and checking out books.
Objectives:
• Using Exceptions: Properly handle errors such as trying to check out a book that is not available
or entering invalid data.
• Using Assertions: Use assertions to validate the state of the program at various points, such as
ensuring a book's availability status is correctly updated when checked out.
• Using Collections and Generics: Utilize collections such as lists or dictionaries to manage books
and members. Generics should be used for flexibility and type safety.
• Using Strings and Regular Expressions: Implement functionality to search for books and
members using strings and validate inputs (like email addresses for members) using regular
expressions.
You pitched this whole idea to the library manager and got approval, however, the library manager asked
for a readme file, in which you will explain how the program works.
Source: Mashile T., (2024)
Project Tasks:
Task 1: Implementing the Book and Member Classes
• Book Class: Should have properties such as Title, Author, ISBN, and IsAvailable.
Include a method to toggle the IsAvailable status.
• Member Class: Should include properties such as Name, Email, and a list of borrowed books.
Use regular expressions to validate the email format upon member creation.
Task 2: Managing Collections
Implement collections using generics to manage books and members within the library system. Use a
List for books and List for members.
Task 3: Implementing Search Functionality
Allow users to search for books by title or author. Use string manipulation and search techniques to find
matches. Ensure searches are case-insensitive.
Task 4: Handling Book Checkouts
Implement a checkout system where members can borrow books if available. Use exceptions to handle cases
where books are not available for checkout.
Task 5: Assertions and Input Validation
Use assertions to ensure that books are properly checked out and returned. Validate user inputs using regular
expressions and exceptions to prevent invalid data entry.
Java code