Package | Description |
---|---|
horstmann.ch05_invoice |
Modifier and Type | Class and Description |
---|---|
class |
Bundle
A bundle of line items that is again a line item.
|
class |
DiscountedItem
A decorator for an item that applies a discount.
|
class |
Product
A product with a price and description.
|
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<LineItem> |
Invoice.getItems()
Gets an iterator that iterates through the items.
|
Modifier and Type | Method and Description |
---|---|
void |
Bundle.add(LineItem item)
Adds an item to the bundle.
|
void |
Invoice.addItem(LineItem item)
Adds an item to the invoice.
|
java.lang.String |
InvoiceFormatter.formatLineItem(LineItem item)
Formats a line item of the invoice.
|
java.lang.String |
SimpleFormatter.formatLineItem(LineItem item) |
Constructor and Description |
---|
DiscountedItem(LineItem item,
double discount)
Constructs a discounted item.
|