forked from nus-cs2113-AY2324S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 335-update-ug-dg-v2.1
# Conflicts: # docs/DeveloperGuide.md
- Loading branch information
Showing
40 changed files
with
469 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,38 @@ | ||
@startuml | ||
!define COMMAND class ListIngredientCommand | ||
!define UI class Ui | ||
!define MAIN class Main | ||
!define STORAGE class Storage | ||
!define DATA class Data | ||
!define PARSER class Parser | ||
!define COMMAND class Command | ||
|
||
autonumber | ||
Actor user | ||
|
||
loop userInput != "bye" | ||
user->Ui : 'delete 1' | ||
activate Ui | ||
Ui-> Main : userInput : String | ||
activate Main | ||
Main -> Parser : parseCommand() | ||
Activate Parser | ||
Parser -> Main : command: Command | ||
Deactivate Parser | ||
Main -> Command : delete.execute() | ||
Activate Command | ||
Command -> Data : menu.remove() | ||
Activate Data | ||
return | ||
return | ||
user -> Ui: 'bye' | ||
Ui-> Main : userInput : String | ||
end loop | ||
Main->Storage : saveMenu() | ||
Activate Storage | ||
Storage -> Storage: encodeMenu() | ||
Activate Storage | ||
return | ||
return | ||
return | ||
return | ||
|
||
@enduml | ||
@startuml | ||
!define UI class ":Ui" | ||
!define MAIN class ":CafeCtrl" | ||
!define STORAGE class ":Storage" | ||
!define DATA class ":Data" | ||
!define PARSER class ":Parser" | ||
!define COMMAND class ":Command" | ||
|
||
autonumber | ||
Actor user | ||
|
||
user -> ":Ui": 'bye' | ||
Activate ":Ui" | ||
":Ui"-> ":CafeCtrl" : receiveUserInput('bye') | ||
loop !exitCommand | ||
Activate ":CafeCtrl" | ||
":CafeCtrl" -> ":Parser" : parseCommand('bye') | ||
Activate ":Parser" | ||
return exitCommand: ":Command" | ||
":CafeCtrl" -> ":Command" : exitCommand.execute() | ||
Activate ":Command" | ||
return | ||
end loop | ||
":CafeCtrl"->":Storage" : saveAll() | ||
Activate ":Storage" | ||
":Storage" -> ":Storage": saveMenu() | ||
Activate ":Storage" | ||
return | ||
":Storage" -> ":Storage": saveOrderList() | ||
Activate ":Storage" | ||
return | ||
":Storage" -> ":Storage": savePantryStock() | ||
Activate ":Storage" | ||
return | ||
return | ||
return | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@startuml | ||
!define COMMAND class ":BuyIngredientCommand" | ||
!define UI class ":Ui" | ||
!define MENU class ":Menu" | ||
!define PANTRY class ":Pantry" | ||
|
||
autonumber | ||
|
||
-> ":BuyIngredientCommand" : execute() | ||
activate ":BuyIngredientCommand" | ||
|
||
":BuyIngredientCommand" -> ":BuyIngredientCommand" : addIngredient() | ||
activate ":BuyIngredientCommand" | ||
loop i < ingredients.size() | ||
":BuyIngredientCommand" -> ":Pantry" : addIngredientToStock(name: String, qty: int, unit: String) | ||
activate ":Pantry" | ||
":Pantry" -> ":Pantry" : getPantryStock() | ||
activate ":Pantry" | ||
return pantryStock: ArrayList<Ingredient> | ||
|
||
":Pantry" -> ":Pantry" : getIndexOfIngredient(name: String) | ||
activate ":Pantry" | ||
return ingredientIndex: int | ||
alt ingredientIndex != -1 | ||
":Pantry" -> ":Pantry" : addIngredientQuantity(qty: int, ingredientIndex: int, unit: String) | ||
activate ":Pantry" | ||
return ingredient: Ingredient | ||
":Pantry" --> ":BuyIngredientCommand" : ingredient: Ingredient | ||
else | ||
return ingredient: Ingredient | ||
end | ||
end loop | ||
|
||
loop i >= 0 | ||
":BuyIngredientCommand" -> ":BuyIngredientCommand" : buildBuyIngredientMessage(ingredient: Ingredient) | ||
activate ":BuyIngredientCommand" | ||
return ingredientString: String | ||
end loop | ||
|
||
return | ||
":BuyIngredientCommand" -> ":Ui" : showToUser(ingredientString: String) | ||
activate ":Ui" | ||
return | ||
return | ||
|
||
|
||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@startuml | ||
!define COMMAND class ":ViewTotalStockCommand" | ||
!define UI class ":Ui" | ||
!define PANTRY class ":Pantry" | ||
|
||
autonumber | ||
|
||
-> ":ViewTotalStockCommand" : execute() | ||
activate ":ViewTotalStockCommand" | ||
|
||
":ViewTotalStockCommand" -> ":Pantry" : getPantryStock().get(dishIndexToBeDeleted: int) | ||
activate ":Pantry" | ||
return (pantryStock: ArrayList<Ingredients>) | ||
loop Ingredient ingredient : pantryStock | ||
":ViewTotalStockCommand" -> ":Ui" : showIngredientStock(name: String, qty: int, unit: String) | ||
activate ":Ui" | ||
":Ui" -> ":Ui" : showToUser(message: String) | ||
activate ":Ui" | ||
return | ||
return | ||
end loop | ||
return | ||
|
||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.