01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
package horstmann.ch05_invoice;
/**
   A product with a price and description.
 */
public class Product implements LineItem
{
  /**
      Constructs a product.
      @param description the description
      @param price the price
   */
  public Product(String description, double price)
  {
    this.description = description;
    this.price = price;
  }
  public double getPrice() { return price; }
  public String toString() { return description; }
  private String description;
  private double price;
}