Skip to content

ugi06/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 Java console application to manage books with basic operations and file persistence.


🚀 Features

  • Add New Book: Add books with title, author, ISBN, and release year. New books are available by default.
  • 📋 List All Books: View all books with details and availability status.
  • 🔍 Search by Title: Find a book using its title.
  • 📦 Check Out Book: Mark a book as checked out (unavailable).
  • 🔄 Return Book: Mark a checked out book as available.
  • 💾 Data Persistence: Uses books.txt file to save and load books across sessions.

🛠 Technologies Used

  • Java – Core application logic
  • 🧰 Java Collections (ArrayList) – To store and manage book objects
  • 💾 File I/O (books.txt) – For saving and loading books permanently
  • 🧱 OOP (Object-Oriented Programming) – Classes like Book, SaveBook, etc.
  • ⌨️ Scanner – To receive user input from the console

🛠 Technical Details

  • Data Storage: Text file (books.txt), managed by SaveBook class.
  • Book Class:
    • Represents a book with title, author, isbn, releaseYear, and status (boolean).
    • Two constructors for new book creation and loading from file.
    • toText() and fromText() methods for file format conversion.
  • SaveBook Class:
    • Handles saving and loading book lists to/from the file.
    • Uses BufferedReader/BufferedWriter for efficient file operations.
  • Status: true means Available, false means Checked Out.

📝 How to Use

  1. Run the program.
  2. On startup, SaveBook.loadBooks("books.txt") loads existing books into a list.
  3. Use menu options to manage books (add, list, search, checkout, return).
  4. On exit, SaveBook.saveBooks(books, "books.txt") saves changes to disk.

🎯 Future Enhancements

  • Input validation and exception handling improvements.
  • More search and filter options.
  • GUI version for better usability.

📂 File Structure

📁 project-root

─ Book.java

─ Main.java

─ SaveBook.java

─ books.txt ← Persistent data file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages