public class Book
extends java.lang.Object
Constructor and Description |
---|
Book()
Constructor sets the title and author to empty strings, and number of pages to zero.
|
Book(java.lang.String title,
java.lang.String author)
Constructor sets the title and author to the values of the parameters.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAuthor()
Accessor method that returns the value of the author instance variable.
|
java.lang.String |
getTitle()
Accessor method that returns the value of the title instance variable.
|
void |
setAuthor(java.lang.String author)
Mutator method that updates the value of the author instance variable.
|
void |
setTitle(java.lang.String title)
Mutator method that updates the value of the title instance variable.
|
public Book()
public Book(java.lang.String title, java.lang.String author)
title
- the title of the bookauthor
- the author of the bookpublic java.lang.String getAuthor()
public java.lang.String getTitle()
public void setAuthor(java.lang.String author)
author
- the author of the bookpublic void setTitle(java.lang.String title)
title
- the title of the book