| Classes | Member variables | Methods | Scenario | Outcomes |
|---|---|---|---|---|
Supermarket |
HashMap<String product, Integer price> products |
calculateTotal(HashMap<String product, Integer quantity> basket) |
Empty basket Items in basket |
Return "Basket is empty" Return total cost of items |
| Classes | Member variables | Methods | Scenario | Outcomes |
|---|---|---|---|---|
Receipt |
HashMap<String product, Integer price> productsHashMap<String product, Integer quantity> basket |
calculateTotal()itemizeReceipt() |
Empty basket Products in basket Payment not complete Payment complete |
Return "Basket is empty" Return total cost of products Return "Payment is not complete" Return itemized receipt |