|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Book
This class implements a simple book description. The complexity of multi-part ISBN codes, significant information about the authors, and so on and so forth is not dealt with in this simple example.
| Constructor Summary | |
Book(java.lang.String theTitle,
java.lang.String theISBN,
java.lang.String[] theAuthors,
long theUPC)
Construct a new Book using the parameters provided. |
|
Book(java.lang.String theTitle,
java.lang.String theISBN,
java.lang.String theAuthor,
long theUPC)
Construct a new Book using the parameters provided. |
|
| Method Summary | |
java.lang.String[] |
getAuthors()
Return the array of author names for this book. |
java.lang.String |
getISBN()
Return the ISBN of the book. |
java.lang.String |
getTitle()
Return the title of the book. |
long |
getUPC()
Any class that implements the UPC interface must be able to say what its UPC code is. |
java.lang.String |
toString()
return a String describing this Book |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Book(java.lang.String theTitle,
java.lang.String theISBN,
java.lang.String[] theAuthors,
long theUPC)
theTitle - the title of the booktheISBN - the ISBN number for this booktheAuthors - an array holding the names of the authorstheUPC - The UPC code for this book
public Book(java.lang.String theTitle,
java.lang.String theISBN,
java.lang.String theAuthor,
long theUPC)
theTitle - the title of the booktheISBN - the ISBN number for this booktheAuthor - the name of the sole authortheUPC - The UPC code for this book| Method Detail |
public long getUPC()
getUPC in interface UPCpublic java.lang.String getTitle()
public java.lang.String getISBN()
public java.lang.String[] getAuthors()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||