Question: You are building a program that models a library system. You have been given the following interface for the Book class: public interface Book

You are building a program that models a library system. You have been given the following interface for the

You are building a program that models a library system. You have been given the following interface for the Book class: public interface Book { } String getTitle(); String getAuthor(); int getNumPages(); Time lef Your task is to implement the Book interface in a class called LibraryBook that represents a book in a library system. LibraryBook should have the following additional methods: public boolean isCheckedOut (); public void checkOut(); public void checkIn(); The isChecked Out() method should return true if the book is currently checked out, and false otherwise. The checkOut() method should mark the book as checked out. The checking method should mark the book as checked in Your implementation should also include a constructor that takes the book's title, author, and number of pages as parameters. Write the code for the LibraryBook class, implementing the Book interface, with the additional methods specified above.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the assignment youve shown in the image youre tasked with implementing the Book interface i... View full answer

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