Answered step by step
Verified Expert Solution
Link Copied!

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!

image text in transcribed

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 full

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

Define the future value of a lump-sum amount.

Answered: 1 week ago