Skip to content

A Java console application for library management using OOP principles and flat-file persistence. Features dual access roles (Client/Employee), inventory tracking, and automated loan management through file I/O.

Notifications You must be signed in to change notification settings

andrei-vasile-dev/Java-OOP-Library-Manager

Repository files navigation


📚 READ&LEARN - Library Management System

Java Console Application built with core Object-Oriented Programming (OOP) principles. Features a dual-role access system (Client/Employee) and robust data persistence using flat-file storage.


🧾 Project Description:

READ&LEARN is a library management solution designed to handle book inventories, user entrance permits, and loan records. The application demonstrates fundamental programming concepts such as class inheritance, array management, and complex File I/O operations in a console environment.

⚙️ Main Features

👤 Client Module

Browse Inventory: View the full list of available books.
Advanced Search: Search for specific books by title or category.
Temporal Filtering: Find books published within a specific timeframe (year intervals).
Self-Service Permits: Generate a library entrance permit (PermisIntrare).

💼 Employee Module

Stock Management: Add new books (Carte) to the system in real-time.
Loan Processing: Create loan slips (FisaImprumut) with automatic stock availability check.
Data Lookup: Search for specific permits or loan records by user name.
Inventory Control: View detailed information including publishers and available copies.


🏗️ Application Architecture

The project is structured into 4 main classes to ensure a modular and organized code logic:

Class Responsibility
ReadandLearn The main controller handling menus, file parsing, and user interaction.
Carte Entity representing a book (Title, Author, Publisher, Stock, Category).
PermisIntrare Manages library access data for visitors.
FisaImprumut Handles the logic for borrowing books and recording return dates.

🗄️ Data Persistence

The application uses local text files as a database substitute. All changes (adding books, creating permits, or loaning items) are automatically synchronized with these files:

1️⃣ Carte.txt – Stores the library's book inventory.
2️⃣ PermisIntrare.txt – Stores issued entrance permits.
3️⃣ FisaImprumut.txt – Stores all active and past loan records.

Technical Detail: The system uses Scanner for reading and OutputStreamWriter for overwriting files, ensuring data is formatted correctly for subsequent sessions.


🧩 Technical Skills Demonstrated

  • Encapsulation: Using Getters and Setters within entity classes.
  • File I/O: Reading from and writing to structured text files using split() and parsing logic.
  • Validation: Checking for book availability before issuing a loan.
  • Data Structures: Managing collections of objects using arrays.
  • Console UI: Developing a nested menu system with switch-case logic.

🚀 Installation and Running

  1. Ensure you have Java JDK installed on your machine.
  2. Clone this repository or download the source files.
  3. Place the .txt files in the same directory as the .java files (or within the project root).
  4. Compile and run the main class:
    javac src/readandlearn/ReadandLearn.java
    java src/readandlearn.ReadandLearn

About

A Java console application for library management using OOP principles and flat-file persistence. Features dual access roles (Client/Employee), inventory tracking, and automated loan management through file I/O.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages