library
Class Book
java.lang.Object
library.Book
- Direct Known Subclasses:
- CirculatingBook, ReferenceBook
public class Book
- extends java.lang.Object
Basic Book class for all types of books
information includes author, title, and ISBN
- Author:
- walker
Example motivated by Exercise 4.51 in Weiss, although
numerous changes have been made.
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
getAuthor
public java.lang.String getAuthor()
- standard getters and setters
setAuthor
public void setAuthor(java.lang.String author)
getTitle
public java.lang.String getTitle()
setTitle
public void setTitle(java.lang.String title)
getIsbn
public java.lang.String getIsbn()
setIsbn
public void setIsbn(java.lang.String isbn)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- Returns:
- pretty String of title, book and ISBN information,
suitable for printing