From b3272c4372f6fedfdff32e94f9033e9c81d3dd56 Mon Sep 17 00:00:00 2001 From: Frida Anselin Date: Thu, 9 Jan 2025 09:45:44 +0100 Subject: [PATCH] Domain model --- DomainModel.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 DomainModel.md diff --git a/DomainModel.md b/DomainModel.md new file mode 100644 index 0000000..206ea5c --- /dev/null +++ b/DomainModel.md @@ -0,0 +1,21 @@ +# Domain Model + +## SupermarketShopper class + +### alt1 +| Method | Member Variables | Scenario | Result | +|------------------|------------------|----------|--------| +| searchForItem() | | | | +| getItemPrice() | | | | +| calculateTotal() | | | | +| | | | | + +### alt2 +| Classes | Methods | Scenario | Outputs | +|----------------------|-------------------------------------------|----------------|---------------| +| checkoutClass | searchForItem(int ID, List items) | If in list | true | +| | | If not in list | false | +| | getItemPrice(int ID) | If | int price | +| | | | | +| | calculateTotal(List prices) | | int total | +| shoppingHistoryClass | formatRecipt(List items) | | string recipt |