Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help writing a program for #2 in Java! 2. Book class is already defined in Homework 03. Design another class, Bookstore, which will
I need help writing a program for #2 in Java!
2. Book class is already defined in Homework 03. Design another class, Bookstore, which will serve as a container of Book objects. - A book is identified by its isbn. - Write test program to create one Bookstore instance; create a few Book instances; test all methods defined in Bookstore class Bookstore -bookList: Book[] -numberOfBooks +Bookstore() +Bookstore (size: int) +addBook (book: Book): boolean +removeBook (book: Book) : boolean +searchBook (book: Book, criteria: String): Book[] -searchBookByTitle(title: String) : Book[] -searchBookByCategory (cate: String): Book[] -searchBookByAuthor (author: String): Book[] -searchBookByISBN (isbn: String): Book[] +getNumberOfBooks () : int +isEmpty (): boolean +isFull (): boolean Constructor, initialize internal bookList, it will have size of 32 as default Constructor, initialize internal bookList, it will have the size as specified in argument Add one book, when adding (1) check to avoid duplication; (2) return true if succeed. Remove one book, return true if one book is found and removed Search and return a list of books. Searching is based on criteria specified through input argument. Valid criteria are: TITLE, AUTHOR, CATEGORY, and ISBN Search and return a list of books based on book title Search and return a list of books based on book category Search and return a list of books based on book author Search and return a list of books based on book isbn Return number of books currently in Bookstore Check if bookstore is empty Check if bookstore is fullStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started