Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A book consists of an author, title, and ISBN number (all of which can never change once the book is created). A library book is

A book consists of an author, title, and ISBN number (all of which can never change once the book is created).

A library book is a book that also contains a due date and the current holder of the book, which is either a String representing a person who has checked the book out or null if the book is currently not checked out. Both the due date and holder of the book can change over time.

A library contains library books and supports the following operations:

Add a library book to the library.

Check out a library book by specifying its ISBN number and

new holder and the due date.

Determine the current holder of a library book given its ISBN

number.

Write two interfaces: Book and LibraryBook that abstract the func- tionality described above.

Write a library class that includes the three methods specified. In implementing the Library class, you should maintain the library books in an ArrayList. You may assume that there are never any requests to add duplicate books.

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

Students also viewed these Databases questions