Question: Directions: SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA. Notes: Assume that the classes listed in the Java Quick

 Directions: SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TOBE WRITTEN IN JAVA. Notes: Assume that the classes listed in theJava Quick Reference have been imported where appropriate. Unless otherwise noted in

Directions: SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA. Notes: Assume that the classes listed in the Java Quick Reference have been imported where appropriate. Unless otherwise noted in the question, assume that parameters in method calls are nat muil and that methods are called only when their preconditions are satisfied In writing solutions for each question, you may use any of the accessible methods that are listed in classes defined in that question. Writing significant amounts of code that can be replaced by a call to one of these methods will not receive full credit. 3. A book club maintains a reading list of books for its members. A book is represented by the following Ecok class. public class Book { /*+ Returns true it this book is a best seller and false otherwise +/ public boolean LsVest Seller 1 /* implementation not shown +/ ) /* keturns the author of the book a/ public string getAuthor() f /* implementation not shown * } // There may be instance variables, constructors, and methods that are not shown. The Readingliat class represents books that are on the book club's reading list public class Readingrist { /* The list of books / private ArrayList booklist; /** Returns the next back to be read, as described in part (a) Postcondition: bookList is unchanged. public Book next.BookToRead() { /* to be implemented in part (al */ } /** Returns a list of books by a particular author, es described in part (b) Postcondition: booklist is unchanged. public arrayList getDocks byAuthor /* to be implemented in part (b) */ } // There may be instance variables, constructors, and methods that are not shown. } (a) write the Readinglist method nextBookToReed, which retums the next book to be read by the club according to the following rules . If there are any best sellers on the reading lisi, as determined by the iBeatSaller method, are of those is retumed . If there are no best sellers on the reading list, then the first book on the reading list is returned. . If there are no books on the reading list then null is returned Complete method nextBookTokaad. /** Returns the next book to be read, as described in part (4) * Postcondition: booklist is unchanged. +/ public Book zext2ookToRead() B 1 E 0/10000 Word Limit 1) Write the RendingList method getBooksByhutbor, which returns a list containing the next book to be read and all other books on the reading list written by the same author as the next book to be read. The books on the returned list may be in any order. If there is no next book to be read the methad should return an erratylist Assume that nextBoa Toresd works as specified, regardless of what you wrote in part (a). You must use nextbookToRead appropriately to receive full credit. Corralete method gataokaayauthor, /** Returns a liat of books by a particular author, as described in part (b) Postcondition: booklist lw unchanged. +/ public arrayList

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 Databases Questions!