public class DiscountedItem extends java.lang.Object implements LineItem
Constructor and Description |
---|
DiscountedItem(LineItem item,
double discount)
Constructs a discounted item.
|
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.
|
public DiscountedItem(LineItem item, double discount)
item
- the item to be discounteddiscount
- the discount percentage