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.
- 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
- Java
- OOP (Object-Oriented Programming)
- ArrayList
- File Handling (FileWriter & FileReader)
- JSON
- GSON (Google JSON Library)
src/ ├── Book.java ├── BookManager.java └── Main.java books.json
- Open project in IntelliJ
- Build the project
- Run Main.java
- Interact with the menu in the console
The application automatically:
- Loads all books from
books.jsonwhen the program starts - Saves all changes to
books.jsonwhen exiting
This makes all data persistent between sessions.
In IntelliJ: File → Project Structure → Libraries → + → From Maven
Search: com.google.code.gson:gson:2.10.1
Add it to the project.
- 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
- 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
pelin
📧 akkuspelin029@gmail.com
🖥 Computer Engineering Student