FileDocCategorySizeDatePackage
ElectronicBookInfo.javaAPI DocExample1273Tue Oct 29 09:37:34 GMT 2002ora.jwsnut.chapter6.serializerbookservice

ElectronicBookInfo.java

package ora.jwsnut.chapter6.serializerbookservice;

/** 
 * Subclass of BookInfo used for electronic books.
 */
public class ElectronicBookInfo extends BookInfo {
    
    /**
     * The URL of the book
     */
    private String url;
    
    /**
     * Constructs an <code>ElectronicBookInfo</code> object.
     * This constructor is used for deserialization.
     */
    public ElectronicBookInfo() {
    }
    
    /**
     * Constructs an <code>ElectronicBookInfo</code> 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.
     * @param url the book's URL
     */
    public ElectronicBookInfo(String title, String author, String editor, double price, String url) {
        super(title, author, editor, price);
        this.url = url;
    }
    
    /**
     * Gets the url for the book
     * @return the book's url.
     */
    public String getURL() {
        return url;
    }
        
    /**
     * Sets the url of the book
     * @param url the book's url.
     */
    public void setURL(String url) {
        this.url = url;
    }
}