Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 3

blur-text-image

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

Financial Reporting Financial Statement Analysis And Valuation A Strategic Perspective

Authors: James M Wahlen, Stephen P Baginskl, Mark T Bradshaw

7th Edition

9780324789423, 324789416, 978-0324789416

More Books

Students also viewed these Programming questions