<<<<<<< HEAD
A comprehensive Library Management System built with Java, featuring book management, member management, borrowing/returning operations, and detailed reporting capabilities.
- Book Management: Add, remove, search, and view books
- Member Management: Register members, manage profiles, track borrowing history
- Borrowing System: Automated borrowing and returning with due date tracking
- Fine Management: Automatic fine calculation for overdue books
- Search System: Search books by title, author, category, or general query
- Member Types: Different privileges for Students, Faculty, and Staff
- Transaction History: Complete audit trail of all library operations
- Overdue Tracking: Automatic identification and management of overdue books
- Reporting: Comprehensive reports and statistics
- Data Persistence: File-based data storage with backup capabilities
Library-Management-System/
├── models/
│ ├── Book.java # Book entity class
│ ├── Member.java # Member entity class
│ └── Transaction.java # Transaction record class
├── services/
│ └── LibraryService.java # Core business logic
├── ui/
│ └── LibraryConsoleUI.java # Console user interface
├── utils/
│ └── FileUtils.java # File operations utility
├── data/ # Data storage directory
└── LibraryManagementApp.java # Main application class
- Java 8 or higher
- Any Java IDE (IntelliJ IDEA, Eclipse, VS Code) or command line
-
Create Project Directory
mkdir LibraryManagementSystem cd LibraryManagementSystem -
Create Package Structure
mkdir -p src/models mkdir -p src/services mkdir -p src/ui mkdir -p src/utils mkdir -p data -
Add Source Files
- Copy all the provided Java files to their respective directories
- Ensure proper package declarations in each file
-
Compile the Project
javac -d . LibraryManagementApp.java models/Book.java models/Member.java models/Transaction.java services/LibraryService.java ui/LibraryConsoleUI.java utils/FileUtils.java -
Run the Application
java LibraryManagementApp
- Create a new Java project in your IDE
- Create the package structure (models, services, ui, utils)
- Add the provided classes to their respective packages
- Run
LibraryManagementApp.java
-
Book Management
- Add new books to the library
- Remove books from inventory
- View all books or available books only
-
Member Management
- Register new members (Student/Faculty/Staff)
- Remove members (only if no borrowed books)
- View member details and borrowing history
- Process fine payments
-
Borrow/Return Operations
- Borrow books (with automatic due date calculation)
- Return books (with fine calculation if overdue)
- View borrowed books by member
-
Search Functionality
- Search by book title
- Search by author name
- Search by category
- General search (searches all fields)
-
Reports and Analytics
- Library statistics overview
- Overdue books report
- Members with pending fines
- Complete transaction history
The system comes with pre-loaded sample data including:
- 5 sample books across different categories
- 3 sample members (Student, Faculty, Staff)
- Repository Pattern: Clean separation of data access logic
- Enum Pattern: Type-safe member types and transaction types
- Builder Pattern: Clean object construction
- MVC Pattern: Separation of concerns between models, services, and UI
- Manages book information and borrowing state
- Tracks due dates and overdue calculations
- Handles book availability status
- Stores member information and borrowing limits
- Different member types with varying privileges
- Fine tracking and payment management
- Records all library operations
- Provides audit trail for borrowing/returning
- Tracks fines and payment history
- Core business logic implementation
- Validates all operations
- Manages relationships between books and members
| Member Type | Borrow Duration | Max Books | Description |
|---|---|---|---|
| STUDENT | 14 days | 3 books | Standard student access |
| FACULTY | 21 days | 5 books | Extended privileges for faculty |
| STAFF | 14 days | 3 books | Standard staff access |
- Fine Rate: $1.00 per day overdue
- Maximum Fine: $50.00 per book
- Borrowing Restriction: Members with fines over $50 cannot borrow books
- Automatic Calculation: Fines calculated automatically upon return
- GUI interface using JavaFX or Swing
- Database integration (MySQL/PostgreSQL)
- Book reservation system
- Email notifications for due dates
- Barcode/QR code integration
- Multi-branch support
- Digital book management
- Web-based interface
- Advanced search with filters
- Book recommendation system
- Integration with external book APIs
- Mobile app companion
- Statistical dashboards
- Export functionality (PDF, Excel)
- Comprehensive input validation
- Graceful error recovery
- User-friendly error messages
- Consistent data validation
- Transaction atomicity
- Backup and recovery options
- Clean package structure
- Separation of concerns
- Comprehensive documentation
- Consistent naming conventions
- Book Operations: Add/remove books, search functionality
- Member Operations: Register/remove members, view details
- Borrowing Flow: Complete borrow-return cycle
- Fine Calculation: Test overdue scenarios
- Edge Cases: Invalid inputs, non-existent records
The system includes built-in sample data for immediate testing:
- Books from various genres and authors
- Members of different types
- Various transaction scenarios
"Member not found" Error
- Ensure member ID exists in the system
- Check for typos in member ID
"Book not available" Error
- Verify book exists and is not currently borrowed
- Use search function to find available books
File Permission Errors
- Ensure write permissions in the data directory
- Check if data directory exists
Compilation Errors
- Verify Java version compatibility
- Check package declarations match directory structure
This project is designed as a learning exercise. Feel free to:
- Add new features
- Improve existing functionality
- Enhance the user interface
- Add database integration
- Implement additional design patterns
This project is created for educational purposes. Feel free to use, modify, and distribute as needed for learning and academic projects.
For questions or suggestions about this Library Management System implementation, please refer to the code comments or create issues in your repository.