A Java-based project demonstrating how to manage and process a bookstore inventory using Java Streams, Predicates, and Comparator. The project focuses on filtering, sorting, and categorizing books in a clean and readable way.
book-store-challenge/
└── src/
├── app/
│ └── Main.java
├── model/
│ └── BookModel.java
├── service/
│ └── bookService/
│ ├── BookService.java
│ └── BookTable.java
└── utils/
└── BookList.java
The bookstore maintains a collection of books with the following attributes:
- ID
- Book Name
- Author
- Price
- Published Date (
LocalDate)
The application provides multiple operations to analyze and display this data effectively.
- Displays books priced below $30
- Useful for promotions and discounts
- Filters books published before January 1, 2000
- Helps identify classic titles
- Displays books whose titles end with "(Coming Soon)"
- Used to preview future releases
- Sorts all books by price in ascending order
- Helpful for price comparison and listings
- Identifies books with titles of 20 or more characters
- Useful for collectors and special editions
- Displays the complete book collection
- Java
- Java Collections (
List) - Java Streams API
- Functional Interfaces (
Predicate) - Lambda Expressions
- Comparator
LocalDate
- Clone the repository
git clone <repository-url>
- Open the project in your IDE
- Run the main class that calls BookService
- View results in the console
- Hands-on experience with Java Streams
- Functional-style filtering and sorting
- Cleaner and more maintainable Java code
- Real-world data processing scenarios