FileDocCategorySizeDatePackage
BookInfo.javaAPI DocExample2529Thu Dec 19 20:32:42 GMT 2002ora.jwsnut.chapter2.bookservice

BookInfo

public class BookInfo extends Object
A class that holds information relating to a book known to the book web service.

Fields Summary
private String
title
The title of the book.
private String
author
The book's author (or authors)
private String
editor
The book's editor
private double
price
The list price of the book.
Constructors Summary
public BookInfo()
Constructs an uninitialized BookInfo object.

    
public BookInfo(String title, String author, String editor, double price)
Constructs a BookInfo object initialized with given attributes.

param
title the book's title
param
author the name of the book's author
param
editor the name of the book's editor
param
price the price of the book.

        this.title = title;
        this.author = author;
        this.editor = editor;
        this.price = price;
    
Methods Summary
public java.lang.StringgetAuthor()
Gets the author of the book

return
the book's author.

        return author;
    
public java.lang.StringgetEditor()
Gets the name of the editor the book

return
the book's editor.

        return editor;
    
public doublegetPrice()
Gets the price of the book in USD

return
the book's price.

        return price;
    
public java.lang.StringgetTitle()
Gets the title of the book

return
the book's title.

        return title;
    
public voidsetAuthor(java.lang.String author)
Sets the author of the book

param
author the book's author.

        this.author = author;
    
public voidsetEditor(java.lang.String editor)
Sets the name of the editor the book

param
editor the book's editor.

        this.editor = editor;
    
public voidsetPrice(double price)
Sets the price of the book in USD

param
price the book's price.

        this.price = price;
    
public voidsetTitle(java.lang.String title)
Sets the title of the book

param
title the book's title.

        this.title = title;