Question: Your task in this portion of the assignment is to create a class to represent a library patron's record and to complete the methods to


Your task in this portion of the assignment is to create a class to represent a library patron's record and to complete the methods to have a working menu system for the librarians to use when working at the library desk. You will need to create or complete each of the files listed below, in addition to the files you created for Part I. Starter code includesLibrary.java. A main method and some methods needed by it are included inLibrary.java. Do not changemain orreadCatalog inLibrary.java. You will need to completePatron.java before you can implement the functionality ofLibrary.java.

Patron.java

A class to represent a patron of the library. It should implement thePrintable interface. This means it will need to implement the abstract methods found inPrintable. You will need an instance variable that is an ArrayList of Item. Your class will need to implement the following methods:

public Patron( String name, int cardNumber )

The constructor for Patron. It should initialize any necessary fields.

public String basicInfo( )

Provides a simple representation of this object's data in the following format:

NAME (CARD NUMBER)

public String detailedInfo( )

Provides a detailed representation of this object's data in the following format (note that there are 4 spaces before each checked out item listed):

Name: NAME

Card number: CARD NUMBER

ITEM BASIC INFO due on DUE DATE

ITEM BASIC INFO due on DUE DATE

ITEM BASIC INFO due on DUE DATE

public ArrayList getItems()

Returns the list of items checked out to this patron.Required for testing.


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javaioFile import javaioFileNotFoundException import javatimeLocalDate import javautilArrayList import javautilScanner public class Library private ArrayList catalog private ArrayList searches ... 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!