Skip to content

About

A console-based Java application for managing books with JSON persistence.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

📚 Book Management System

A console-based Java application that allows users to manage books, store them permanently using JSON (GSON library), and retrieve them when the application restarts.

This project demonstrates object-oriented programming, file handling, JSON serialization/deserialization, and clean code structure using a manager class.


🚀 Features

  • Add new books
  • List all books
  • Search books by ISBN
  • Search books by author
  • Remove books
  • View total number of books
  • Automatically save all data to a JSON file
  • Automatically load data when the program starts

🛠 Technologies Used

  • Java
  • OOP (Object-Oriented Programming)
  • ArrayList
  • File Handling (FileWriter & FileReader)
  • JSON
  • GSON (Google JSON Library)

📂 Project Structure

src/ ├── Book.java ├── BookManager.java └── Main.java books.json


▶️ How to Run

  1. Open project in IntelliJ
  2. Build the project
  3. Run Main.java
  4. Interact with the menu in the console

💾 JSON Persistence

The application automatically:

  • Loads all books from books.json when the program starts
  • Saves all changes to books.json when exiting

This makes all data persistent between sessions.


🔧 How to Add GSON

In IntelliJ: File → Project Structure → Libraries → + → From Maven

Search: com.google.code.gson:gson:2.10.1

Add it to the project.


🧠 What I Learned

  • Designing OOP classes (Book + BookManager)
  • Encapsulation and clean object structure
  • Working with ArrayList
  • JSON serialization/deserialization
  • Using external libraries (GSON)
  • Handling files with try/catch
  • Implementing a menu-driven console application

🌱 Future Improvements

  • Add “find by genre”
  • Add sorting options (A-Z, year, etc.)
  • Add update/edit book feature
  • Switch to SQLite database
  • Create a GUI version of the app

⭐ Author

pelin
📧 akkuspelin029@gmail.com
🖥 Computer Engineering Student

About

A console-based Java application for managing books with JSON persistence.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors