From 01a31cec6c2c3c42058efbe4f72b7eb3922917a9 Mon Sep 17 00:00:00 2001 From: uthmel Date: Wed, 14 Aug 2024 09:40:57 +0200 Subject: [PATCH 1/4] Finished Exercise 1 --- Domain_model.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Domain_model.md diff --git a/Domain_model.md b/Domain_model.md new file mode 100644 index 0000000..0e7f533 --- /dev/null +++ b/Domain_model.md @@ -0,0 +1,24 @@ +``` +As a supermarket shopper, +So that I can pay for products at checkout, +I'd like to be able to know the total cost of items in my basket. +``` + +| Classes | Method | Scenario | Outputs | +|----------|----------------------|---------------------|------------| +| `Basket` | `CalculateTotalCost` | If basket has items | Total cost | +| | | If no items | 0 | +| | | | | + +``` +As an organised individual, +So that I can evaluate my shopping habits, +I'd like to see an itemised receipt that includes the name and price of the products +I bought as well as the quantity, and a total cost of my basket. +``` + + Classes | Method |Scenario | Outputs | +|----------|---------------------------|--------------------|------------------------------------| +| `Basket` | `GetItemandPrice()` | If basket has items | Gets all the items from the Basket | +| | `GetPriceofItem()` | If basket has items | Gets price for the items | +| | `GetQuantity()` | If basket has items | Total cost | From 6cecb725c2db2b5e01893c9470cccab0b99a0968 Mon Sep 17 00:00:00 2001 From: uthmel Date: Wed, 14 Aug 2024 09:58:09 +0200 Subject: [PATCH 2/4] Finished Exercise 1 --- Domain_model.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Domain_model.md b/Domain_model.md index 0e7f533..4e19777 100644 --- a/Domain_model.md +++ b/Domain_model.md @@ -4,11 +4,11 @@ So that I can pay for products at checkout, I'd like to be able to know the total cost of items in my basket. ``` -| Classes | Method | Scenario | Outputs | -|----------|----------------------|---------------------|------------| -| `Basket` | `CalculateTotalCost` | If basket has items | Total cost | -| | | If no items | 0 | -| | | | | +| Classes | Method | Scenario | Outputs | +|----------|------------------------------------|---------------------|------------| +| `Basket` | `CalculateTotalCost(List)` | If basket has items | Total cost | +| | | If no items | 0 | +| | | | | ``` As an organised individual, @@ -17,8 +17,8 @@ I'd like to see an itemised receipt that includes the name and price of the prod I bought as well as the quantity, and a total cost of my basket. ``` - Classes | Method |Scenario | Outputs | -|----------|---------------------------|--------------------|------------------------------------| -| `Basket` | `GetItemandPrice()` | If basket has items | Gets all the items from the Basket | -| | `GetPriceofItem()` | If basket has items | Gets price for the items | -| | `GetQuantity()` | If basket has items | Total cost | +| Classes | Method | Scenario | Outputs | +|----------|---------------------------------------------------|---------------------|------------------------------------| +| `Basket` | `GetItemandPrice(HashMap items)` | If basket has items | Gets all the items from the Basket | +| | `GetQuantity()` | If basket has items | | +| | `GetTotalPrice()` | |Total cost | From 32f961e7973b1fe7fbd259fa2752073acab9b830 Mon Sep 17 00:00:00 2001 From: uthmel Date: Wed, 14 Aug 2024 09:59:17 +0200 Subject: [PATCH 3/4] Finished Exercise 1 --- Domain_model.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Domain_model.md b/Domain_model.md index 4e19777..b50d8b9 100644 --- a/Domain_model.md +++ b/Domain_model.md @@ -17,8 +17,8 @@ I'd like to see an itemised receipt that includes the name and price of the prod I bought as well as the quantity, and a total cost of my basket. ``` -| Classes | Method | Scenario | Outputs | -|----------|---------------------------------------------------|---------------------|------------------------------------| -| `Basket` | `GetItemandPrice(HashMap items)` | If basket has items | Gets all the items from the Basket | -| | `GetQuantity()` | If basket has items | | -| | `GetTotalPrice()` | |Total cost | +| Classes | Method | Scenario | Outputs | +|----------|---------------------------------------------------|---------------------|-------------------------------------| +| `Basket` | `GetItemandPrice(HashMap items)` | If basket has items | Gets all the items from the Basket | +| | `GetQuantityFromBasket()` | If basket has items | Quantity of each prodocut in Basket | +| | `GetTotalPriceandlist()` | If basket has items | Total cost and list | From f6f6dbeeeb03a0af4c0538766e15ade2221eb036 Mon Sep 17 00:00:00 2001 From: uthmel Date: Wed, 14 Aug 2024 10:20:23 +0200 Subject: [PATCH 4/4] Finished Exercise 1 --- domain-model.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 domain-model.md diff --git a/domain-model.md b/domain-model.md new file mode 100644 index 0000000..b50d8b9 --- /dev/null +++ b/domain-model.md @@ -0,0 +1,24 @@ +``` +As a supermarket shopper, +So that I can pay for products at checkout, +I'd like to be able to know the total cost of items in my basket. +``` + +| Classes | Method | Scenario | Outputs | +|----------|------------------------------------|---------------------|------------| +| `Basket` | `CalculateTotalCost(List)` | If basket has items | Total cost | +| | | If no items | 0 | +| | | | | + +``` +As an organised individual, +So that I can evaluate my shopping habits, +I'd like to see an itemised receipt that includes the name and price of the products +I bought as well as the quantity, and a total cost of my basket. +``` + +| Classes | Method | Scenario | Outputs | +|----------|---------------------------------------------------|---------------------|-------------------------------------| +| `Basket` | `GetItemandPrice(HashMap items)` | If basket has items | Gets all the items from the Basket | +| | `GetQuantityFromBasket()` | If basket has items | Quantity of each prodocut in Basket | +| | `GetTotalPriceandlist()` | If basket has items | Total cost and list |