Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the following BookStore methods using appropriate Stream methods: Method name Parameters Resulting behavior printAllTitles none Prints all titles in UPPERCASE printBookTitle String title Prints

Create the following BookStore methods using appropriate Stream methods:
Method name
Parameters
Resulting behavior
printAllTitles
none
Prints all titles in UPPERCASE
printBookTitle
String title
Prints all titles that match the specified parameter
printTitlesInAlphaOrder
none
Prints all titles in alphabetical order, A-Z
Page 6 of 6 Sept 2023
printGroupByDecade
int decade
Prints all books for the inputted decade IE 2000s -> print all book titles from 2000-2009
getLongest
none
Find the longest title in the bookstore
main
String[] args
Calls all of the BookStore methods listed above, in this table
isThereABookWrittenBetween
Int year
Returns true or false
howManyBooksContain
String word
Returns the amount of Books that contain this word in their title
whichPercentWrittenBetween
int first, int last
What percentage of the books were written between these two years (inclusive)?
getOldestBook
none
Returns the oldest book
getBooksThisLength
int titleLength
Returns a List of all books whose title is this length

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions