Package library

Class Library


  • public class Library
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addBook​(library.LibraryBook book)
      adds the given book to the library
      void checkout​(java.lang.String patron, java.lang.String dueDate, java.lang.String callNum)
      performs processing for checking a book out of the library
      library.LibraryBook findBook​(library.LibraryBook book)
      locates a book in the library
      static void main​(java.lang.String[] args)
      main testing program
      void printLibrary()
      prints all books in the library
      void returned​(java.lang.String callNum)
      processes checked-out book that is being returned
      void sortLibrary()
      sort books in the library by call number
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 book
        dueDate - date book is due to be returned
        callNum - 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