Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Information Management System

A Java Swing-based Object-Oriented Programming (OOP) application designed to load, manage, search, and analyze a library's catalogue database. The system handles various library item types including Books, CDs, and DVDs, and supports processing loan statistics to compute analytics such as the top-performing loans.


Features

  • Multi-Category Catalogue Support: Load and manage different item categories:
    • Books: Catalogued with author and page count details.
    • CDs: Catalogued with artist and track details.
    • DVDs: Catalogued with director and runtime details.
  • Fast Search & Lookup:
    • Instant $O(1)$ lookups by OCLC (Unique identifier) using HashMaps.
    • Category-wide searches and list filtering by Genre.
  • Reports & Diagnostics:
    • Generate full catalogue summaries.
    • Generate genre-specific reports.
    • Save generated reports directly to local files (catalogue_report.txt).
  • Loan Statistics Analytics:
    • Load external loan records.
    • Identify and report the Top 10 most-loaned library items.
  • User-Friendly Swing Dashboard: A clean GUI featuring tabbed selection, search text-fields, action buttons, and a monospaced scrollable console log to view detailed outputs.

Design & OOP Principles

This project serves as a showcase for core Object-Oriented Programming (OOP) concepts in Java:

  1. Abstraction:
    • Uses an abstract base class LibraryItem to define common attributes and force concrete subclasses (Book, CD, DVD) to implement their category-specific metadata and toString() representation.
  2. Inheritance:
    • Subclasses inherit common properties (OCLC, Title, Genre, Publication Year) from the parent LibraryItem class.
  3. Encapsulation:
    • Uses protected fields, final attributes, and public getter methods to hide internal implementation and expose read-only state.
  4. Polymorphism:
    • Dynamically resolves category types and toString() formatting at runtime depending on the actual subclass instance.

Directory Structure

├── Data/                       # Sample catalog & loan record TXT files
├── src/                        # Source Java files
│   ├── Main.java               # App entry point
│   ├── DashBoard.java          # Swing GUI and Event Listeners
│   ├── LibraryItem.java        # Abstract base class
│   ├── Book.java               # Book representation
│   ├── CD.java                 # CD representation
│   ├── DVD.java                # DVD representation
│   ├── CatalogueLoader.java    # File reader & parser helper
│   ├── ReportGenerator.java    # Exporters for reports
│   └── LoanStat.java           # Model for loan records
├── .gitignore                  # Git exclusions configuration
└── README.md                   # Project documentation

How to Compile & Run

Prerequisites

  • Java Development Kit (JDK): Version 8 or higher installed on your computer.

Step 1: Compile the Code

Navigate to the root directory of the project in your terminal and compile all Java source files:

javac -d out src/*.java

Step 2: Run the App

Run the compiled Java bytecode class:

java -cp out Main

Sample Data Format

To test the file loading capabilities, use the text files provided in the Data/ directory.

  • Catalogues: Tab or comma-separated item files.
  • Loans: Files containing OCLC numbers alongside loan statistics.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages