Question: This program practices working with lambdas and streams. Provided Files: Java file Book.java contains a class for book data. Java file BookProject.java contains the starting

This program practices working with lambdas and streams.
Provided Files:
Java file Book.java contains a class for book data.
Java file BookProject.java contains the starting code with a book list constructed and methods filter
and process. You will need to write the bodies of these two methods; they are illustrated in the lectures.
Main Application:
// Task 1: Ask the user for the category of book (ex.Database) and call filter method with
// correct lambda to get list of books with this category
// Display the count
// If books, display headings and book title, format, and price in $
// See sample output for correct display
// Task 2: Ask the user for a price maximum of book (ex.50.00) and call filter method with
// correct lambda to get back list of books with price <= maximum
// Display the count
// If books, display headings and book title, category, format, and price in $
// See sample output for correct display
2
// Task 3: Call process method with correct lambda convert book titles to upper case
// Display the updated list with Book toString method
// See sample output for correct display
// Task 4: use streams to display only paperback titles, category, price sorted by title
// Note: The Book class needs to implement Comparable to define natural ordering by title
// See sample output for correct display
// Task 5: Use streams to display book titles where title contains phrase entered by user
// Display the count using the stream count method
// If books, display headings and book title, category, format, and price in $
// See sample output for correct display

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!