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