Package library
Class Library
- java.lang.Object
-
- library.Library
-
public class Library extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBook(library.LibraryBook book)adds the given book to the libraryvoidcheckout(java.lang.String patron, java.lang.String dueDate, java.lang.String callNum)performs processing for checking a book out of the librarylibrary.LibraryBookfindBook(library.LibraryBook book)locates a book in the librarystatic voidmain(java.lang.String[] args)main testing programvoidprintLibrary()prints all books in the libraryvoidreturned(java.lang.String callNum)processes checked-out book that is being returnedvoidsortLibrary()sort books in the library by call number
-
-
-
Method Detail
-
addBook
public void addBook(library.LibraryBook book)
adds the given book to the library- Parameters:
book-
-
printLibrary
public void printLibrary()
prints all books in the library
-
findBook
public library.LibraryBook findBook(library.LibraryBook book)
locates a book in the library- Parameters:
book- book being search in the library- Returns:
- book object if book is found null otherwise
-
sortLibrary
public void sortLibrary()
sort books in the library by call number
-
checkout
public void checkout(java.lang.String patron, java.lang.String dueDate, java.lang.String callNum)performs processing for checking a book out of the library- Parameters:
patron- person checking out bookdueDate- date book is due to be returnedcallNum- call number of book
-
returned
public void returned(java.lang.String callNum)
processes checked-out book that is being returned- Parameters:
callNum- call number of book being returned
-
main
public static void main(java.lang.String[] args)
main testing program- Parameters:
args- not used
-
-