Consider a typical library system described in the following case study.

CASE STUDY

A member of the library is issued with a membership card. Whenever the member wants to borrow a book (up to 6 books can be on loan to a member), the card has to be used.

Books can be borrowed for 14 days and if they are not returned on time, a fine is charged.

If the book has not been returned by a week, reminders are sent out. After the third reminder the member is put on a blacklist until the books have been returned and the fines paid.

Up to 8 copies of popular titles may be held in the library. Books can be reserved if no copies are available for loan. A note is made of the book title, author or authors and the member card number. Members are notified when the title is available.

Create a suitable singly-linked list (SLL) data type to store reminders. Write an algorithm to insert a reminder element:

  • at the beginning of the list
  • after a given reminder node.

Write a Java application to test your algorithm.

The Reminder class may implement the following interface type:

public interface ReminderItem {
public void setDescription (String value); public String getDescription( );
public int getId( );
public void setId(int id);
public Date getReminderDate( );
public void setReminderDate (Date d);
}

Question 2

As part of an Information System for the library, it is required to send reminders for books not returned on time. Write an array based queue for storing reminders. Write a Java application to test the queue.

Question 3

Explain how a Binary Search Tree may be used as part of an Information System for the library. As part of your answer, illustrate how such a tree may be populated.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.