// Fig. 16.17: Book.java
// Represents a book
package cartXML;

public class Book
{
   private double price;
   private int quantity;
   private String productID;
   private String[] description; //title, author, isbn

   public Book()
   {
      description = null;
      productID = null;
      quantity = 0;
      price = 0;
   }

   public Book( double price, int quantity, String productID )
   {
      this.price = price;
      this.quantity = quantity;
      this.productID = productID;
   }

   public Book( double price, int quantity, String productID,
      String description[] )
   {
      this.price = price;
      this.quantity = quantity;
      this.productID = productID;
      this.description = description;
   }

   public String[] getDescription()
   { return description; }

   public double getPrice()
   { return price; }

   public int getQuantity()
   { return quantity; }

   public String getProductID()
   { return productID; }

   public void setDescription( String description[] )
   { this.description = description; }

   public void setPrice( double d )
   { price = d; }

   public void setQuantity( int i )
   { quantity = i; }

   public void setProductID( String s )
   { productID = s; }
}
/*
 **************************************************************************
 * (C) Copyright 2001 by Deitel & Associates, Inc. and Prentice Hall.     *
 * All Rights Reserved.                                                   *
 *                                                                        *
 * DISCLAIMER: The authors and publisher of this book have used their     *
 * best efforts in preparing the book. These efforts include the          *
 * development, research, and testing of the theories and programs        *
 * to determine their effectiveness. The authors and publisher make       *
 * no warranty of any kind, expressed or implied, with regard to these    *
 * programs or to the documentation contained in these books. The authors *
 * and publisher shall not be liable in any event for incidental or       *
 * consequential damages in connection with, or arising out of, the       *
 * furnishing, performance, or use of these programs.                     *
 **************************************************************************
*/
