Modifier and Type | Field and Description |
---|---|
private java.lang.String |
description |
private double |
price |
Constructor and Description |
---|
Product(java.lang.String description,
double price)
Constructs a product.
|
Modifier and Type | Method and Description |
---|---|
double |
getPrice()
Gets the price of this line item.
|
java.lang.String |
toString()
Gets the description of this line item.
|
private java.lang.String description
private double price
public Product(java.lang.String description, double price)
description
- the descriptionprice
- the price