Modifier and Type | Method and Description |
---|---|
List<Item> |
ItemizedBill.getItems()
Returns the list of items purchased for this bill.
|
List<Item> |
ItemizedBill.getSortedItems()
Returns a sorted list of items purchased for this bill.
|
Modifier and Type | Method and Description |
---|---|
void |
ItemizedBill.addItem(Item item)
Add an item to the list of items purchased for this bill.
|
int |
Item.compareTo(Item other)
Compares two items numerically by their price.
|
Constructor and Description |
---|
Item(Item other)
Initialize an item by copying another item.
|
Constructor and Description |
---|
ItemizedBill(List<Item> items)
Initialize this bill from a list of purchased items.
|