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
Step: 1
import javaioFile import javaioFileNotFoundException import javatimeLocalDate import javautilArrayList import javautilScanner public class Library private ArrayList catalog private ArrayList searches ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started