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: 1. Add a library book to the library. 2. Check out a library book by specifying its ISBN number and new holder and the due date. 3. Determine the current holder of a library book given its ISBN number.

a. Write two interfaces: Book and LibraryBook that abstract the functionality described above.

b. 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_2

Step: 3

blur-text-image_3

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 Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions