A small-scale Java project that simulates a library management system using Object-Oriented Programming (OOP) concepts and Java Collections.
This project allows users to manage books and library members, including adding, listing, searching, borrowing, and returning books — all through a simple console-based interface.
- Add new books with title and author.
- List all books in the library.
- Search books by ID or title.
- Add library users with unique IDs.
- Display user details along with borrowed books.
- Users can borrow available books.
- Users can return borrowed books.
- Book availability is tracked automatically.
- Easy-to-use menu-driven system for interacting with the library.
- Java – Core programming language.
- OOP Concepts – Classes, Objects, Encapsulation, Methods.
- Collections Framework –
ArrayListfor storing books and users. - Console I/O –
Scannerfor user input.
Library-Management-System/
├─ models/
│ ├─ Book.java
│ └─ User.java
├─ services/
│ ├─ LibraryService.java
│ └─ UserService.java
└─ Main.java
- models: Contains the data models (
BookandUser). - services: Contains business logic for handling books and users.
- Main.java: Entry point with a menu-driven interface.
- Clone the repository:
git clone https://github.com/sumitojha2002/Library-management-system.git-
Navigate to the project folder and compile the code:
javac models/.java services/.java Main.java
-
Run the program: java Main
-
Follow the on-screen menu to add books, add users, borrow/return books, and search.
Future Improvements
- Save data persistently (file or database) so data is not lost on exit.
- Improve input validation for better user experience.
- Add advanced features like overdue tracking, categories, or multiple copies of books.
- GUI interface using JavaFX or Swing.