Skip to content

MOHKSADAH/Library-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Management System

A comprehensive command-line interface (CLI) library management system built in Java. This system provides separate interfaces for librarians, professors, and students with role-based access control and complete book management functionality.

Features

🔐 Role-Based Access Control

  • Librarian System: Full administrative access to manage books
  • Professor System: Book borrowing with higher limits and profile management
  • Student System: Book borrowing with standard limits and profile management

📚 Book Management

  • Add new books with comprehensive details (title, author, ISBN, genre, publication year, quantity, language, pages)
  • Delete books from the library database
  • Update existing book information
  • Display all books in the library
  • Advanced search functionality (by title, genre, ISBN, author)

📖 Borrowing System

  • Book borrowing with quantity tracking
  • Book return functionality
  • Role-based borrowing limits (different limits for students and professors)
  • Real-time borrowing limit tracking

🔍 Search & Discovery

  • Search books by multiple criteria
  • User-friendly search interface
  • Detailed book information display

👤 User Profile Management

  • Account information display
  • Profile update functionality
  • Borrowing history tracking

System Architecture

The system is built with object-oriented principles and includes:

  • LibraryManagementSystem: Main controller class
  • LibraryDatabase: Database management for books
  • Librarian: Administrative functions
  • Student: Student-specific operations with borrowing limits
  • Professor: Professor-specific operations with extended privileges
  • Book: Book entity with comprehensive attributes
  • Search: Advanced search functionality
  • BookLender: Interface for borrowing operations

Prerequisites

  • Java Development Kit (JDK) 8 or higher

Installation

  1. Clone the repository:
git clone https://github.com/username/library-management-system.git
cd library-management-system
  1. Compile the Java files:
javac -d bin src/system/*.java
  1. Run the application:
java -cp bin system.LibraryManagementSystem

Usage

Starting the Application

When you run the application, you'll see the main menu:

------------------------------------
            LIBRARY SYSTEM          
------------------------------------
1. Librarian Subsystem
2. Professor Subsystem
3. Student Subsystem
4. Exit

Enter your choice: 

Librarian Functions

Access the librarian system to:

  1. Add Book: Enter comprehensive book details including:

    • Title (must be unique)
    • Author (alphabetic characters only)
    • ISBN (unique numeric identifier)
    • Genre (alphabetic characters only)
    • Publication Year
    • Book Quantity
    • Language
    • Number of Pages
  2. Delete Book: Remove books using ISBN

  3. Update Book: Modify existing book information

  4. Display All Books: View complete library inventory

Professor/Student Functions

Both user types can:

  1. Show Account Info: Display user profile and borrowing information
  2. Borrow Book:
    • View available books
    • Select book by ISBN
    • System checks borrowing limits and book availability
  3. Return Book:
    • View borrowed books
    • Return book by ISBN
    • Updates library inventory automatically
  4. Profile Update: Modify user information
  5. Search Book: Use advanced search by title, genre, ISBN, or author

Example: Adding a Book

Enter book details:
Title: The Great Gatsby
Author: F Scott Fitzgerald
ISBN: 9780743273565
Genre: Fiction
Publication Year: 1925
Book Quantity: 5
Language: English
Pages: 180

Example: Borrowing a Book

Available Books:
[Book list displays]

Enter Book ISBN: 9780743273565
Book Borrowed!
Remaining borrowing limit as a student: 4

Data Validation

The system includes comprehensive input validation:

  • Duplicate Prevention: No duplicate titles or ISBNs allowed
  • Format Validation: Author, genre, and language must contain only alphabetic characters
  • Numeric Validation: ISBN, publication year, quantity, and pages must be positive integers
  • Empty Field Prevention: All required fields must be filled

Borrowing Limits

  • Students: Limited number of books (configurable via librarian settings)
  • Professors: Higher borrowing limits than students
  • Real-time Tracking: System displays remaining borrowing capacity

Search Functionality

The system provides multiple search options:

  1. Search by Title: Find books with matching titles
  2. Search by Genre: Browse books by category
  3. Search by ISBN: Direct book lookup
  4. Search by Author: Find all books by a specific author

Error Handling

  • Book not found scenarios
  • Insufficient quantity warnings
  • Borrowing limit enforcement

Project Structure

library-management-system/
├── src/
│   └── system/
│       ├── LibraryManagementSystem.java    # Main application class
│       ├── LibraryDatabase.java            # Database management
│       ├── Librarian.java                  # Librarian operations
│       ├── Student.java                    # Student operations
│       ├── Professor.java                  # Professor operations
│       ├── Book.java                       # Book entity
│       ├── User.java                       # Manage Users operations and constraints
│       ├── Search.java                     # Search functionality
│       └── BookLender.java                 # Borrowing interface
├── bin/                                    # Compiled classes
└── README.md

Future Enhancements

  • Due date tracking and overdue notifications
  • Book reservation system
  • Fine calculation for overdue books
  • Export/import functionality for book data
  • GUI version of the application
  • User authentication system
  • Book recommendation system

Known Issues

  • Data is not persisted between application runs (in-memory storage)
  • No user authentication - role selection is based on menu choice

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages