Skip to content

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“š Library Management System

A console-based Library Management System built in Java, demonstrating core Object-Oriented Programming (OOP) principles through a real-world use case: managing books, members, and borrow/return transactions.

๐Ÿš€ Features

  • Add Books โ€” Add new books to the library catalog with title, author, ISBN, page count, and description
  • Search Books โ€” Look up a book by ISBN and check its availability
  • Issue Books โ€” Lend a book to a member, automatically tracking the borrow date and due date
  • Return Books โ€” Return a book, with automatic late fine calculation (โ‚น5/day) based on the due date
  • Availability Tracking โ€” Books are automatically marked as borrowed/available in real time

๐Ÿ› ๏ธ Tech Stack

  • Language: Java
  • Core Concepts: Object-Oriented Programming (Encapsulation, Constructors), Collections (ArrayList), Date handling (LocalDate, ChronoUnit), Console I/O (Scanner)

๐Ÿ—๏ธ Project Structure

LibraryManagementSystem/
โ””โ”€โ”€ src/
    โ”œโ”€โ”€ Book.java          # Represents a single book
    โ”œโ”€โ”€ Member.java        # Represents a library member
    โ”œโ”€โ”€ BorrowRecord.java  # Tracks a borrow transaction (member, book, dates)
    โ”œโ”€โ”€ Library.java       # Core logic: add/search/issue/return books
    โ””โ”€โ”€ Main.java          # Console menu that ties everything together

๐Ÿงฉ Class Overview

Class Responsibility
Book Stores book details (title, author, ISBN, pages, description, availability)
Member Stores member details (name, ID, mobile number)
BorrowRecord Links a member and a book for one borrow transaction, with borrow/due dates
Library Manages all books, members, and borrow records; contains the core business logic
Main Runs the console menu and handles user interaction

โ–ถ๏ธ How to Run

  1. Clone this repository:
    git clone https://github.com/codewithish/LibraryManagementSystem.git
    
  2. Navigate to the src folder and compile all files:
    javac *.java
    
  3. Run the program:
    java Main
    
  4. Follow the on-screen menu to add, search, issue, or return books.

๐Ÿ’ก What I Learned

  • Designing a multi-class system where classes collaborate (Library orchestrating Book, Member, and BorrowRecord)
  • Deciding what data belongs on which class (e.g., realizing dueDate belongs to a transaction, not a Member or a Book)
  • Working with Java's LocalDate and ChronoUnit for real date calculations
  • Writing clean, single-responsibility methods (searchBook(), findBorrowRecord()) instead of cramming logic into one place

๐Ÿ”ฎ Future Improvements

  • Persist data to a file or database (currently in-memory only โ€” resets on each run)
  • Add a graphical (Swing) or web-based UI
  • Support multiple copies of the same book
  • Add member borrow history view

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Built by Aishu as a portfolio project while preparing for software engineering placements.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages