Skip to content

Commit

Permalink
Update DG with regards to Code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cazh1 committed Nov 1, 2023
1 parent 9c7f19c commit 0c3c380
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
5 changes: 4 additions & 1 deletion docs/diagrams/class/AddOrderCommandClass.puml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ AddOrderCommand --> Pantry
AddOrderCommand ..> Order
OrderList --> "*" Order
Sales --> "1...*" OrderList
Chef ..> Pantry

class CafeCtrl {
- setup()
Expand All @@ -42,6 +43,7 @@ class UI {
class AddOrderCommand {
# pantry : Pantry
# orderList : OrderList
# menu : Menu
- ui : Ui
- order : Order
+ execute() : void
Expand Down Expand Up @@ -86,7 +88,8 @@ class Pantry {
- pantryStock : ArrayList<Ingredient>
- menuItems : ArrayList<Dish>
- ui : Ui
+ decreaseIngredientsStock(dishIngredient : ArrayList<Ingredient>) : void
+ isDishCooked( :ArrayList<Ingredient>) : boolean
+ calculateDishAvailability(menu : Menu) : void
}

class Sales {
Expand Down
2 changes: 1 addition & 1 deletion docs/diagrams/class/NextDayCommandClass.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CafeCtrl "1" o-- "*" Command

Command <|- NextDayCommand
Parser "1" --> "*" NextDayCommand
NextDayCommand --> OrderList
NextDayCommand ..> OrderList : Creates >
NextDayCommand --> CurrentDate
NextDayCommand --> Sales
Sales --> "1...*" OrderList
Expand Down
25 changes: 11 additions & 14 deletions docs/diagrams/sequence/AddOrderCommand_execute.puml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,28 @@ autonumber
return
":Chef" -> ":Order" : getIngredientList()
activate ":Order"
return ingredientList : ArrayList<Ingredient>
":Chef" -> ":Pantry" : decreaseIngredientsStock(ingredientList : ArrayList<Ingredient>)
return :ArrayList<Ingredient>
":Chef" -> ":Pantry" : isDishCooked(:ArrayList<Ingredient>)
activate ":Pantry"
return
":Chef" -> ":Order" : setComplete()
return isComplete : boolean
":Chef" -> ":Order" : setComplete(isComplete : boolean)
activate ":Order"
return
end
":Chef" -> ":Ui" : showToUser(args : String)
":Chef" -> ":Ui" : showOrderStatus(args : String)
activate ":Ui"
":Ui" -> ":Ui" : showToUser(args : String)
activate ":Ui"
return
return
":Chef" -> ":Pantry" : calculateDishAvailability(menu : Menu)
activate ":Pantry"
return
return
opt order.getIsComplete()
":AddOrderCommand" -> ":OrderList" : addCost(order : Order)
activate ":OrderList"
return
end
":AddOrderCommand" -> ":OrderList" : getTotalCost()
activate ":OrderList"
return totalOrderListCost : float
":AddOrderCommand" -> ":Ui" : showTotalCost(totalOrderListCost)
activate ":Ui"
":Ui" -> ":Ui" : showToUser(args : String)
activate ":Ui"
return
return
return
@enduml
Binary file modified docs/images/class/AddOrderCommandClass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/class/NextDayCommandClass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/sequence/AddOrderCommand_execute.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0c3c380

Please sign in to comment.