forked from nus-cs2103-AY2324S2/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 pull request #227 from bertrandong/update-dg-final
Update dg with product menu commands
- Loading branch information
Showing
9 changed files
with
261 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":AddMenuCommandParser" as AddMenuCommandParser LOGIC_COLOR | ||
participant "a:AddMenuCommand" as AddMenuCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant "m:Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("menu pn/Cupcake pc/2.50 ps/5") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("menu pn/Cupcake pc/2.50 ps/5") | ||
activate AddressBookParser | ||
|
||
create AddMenuCommandParser | ||
AddressBookParser -> AddMenuCommandParser | ||
activate AddMenuCommandParser | ||
|
||
AddMenuCommandParser --> AddressBookParser | ||
deactivate AddMenuCommandParser | ||
|
||
AddressBookParser -> AddMenuCommandParser : parse("pn/Cupcake pc/2.50 ps/5") | ||
activate AddMenuCommandParser | ||
|
||
create AddMenuCommand | ||
AddMenuCommandParser -> AddMenuCommand | ||
activate AddMenuCommand | ||
|
||
AddMenuCommand --> AddMenuCommandParser : | ||
deactivate AddMenuCommand | ||
|
||
AddMenuCommandParser --> AddressBookParser : a | ||
deactivate AddMenuCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
AddMenuCommandParser -[hidden]-> AddressBookParser | ||
destroy AddMenuCommandParser | ||
|
||
AddressBookParser --> LogicManager : a | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> AddMenuCommand : execute(m) | ||
activate AddMenuCommand | ||
|
||
AddMenuCommand -> Model : deleteProduct(id) | ||
activate Model | ||
|
||
Model --> AddMenuCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
AddMenuCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> AddMenuCommand | ||
deactivate CommandResult | ||
|
||
AddMenuCommand --> LogicManager : r | ||
deactivate AddMenuCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@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,33 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant ":AddressBook" as AddressBook MODEL_COLOR | ||
end box | ||
|
||
box ProductMenu | ||
participant ":ProductMenu" as ProductMenu | ||
end box | ||
|
||
[-> Model : deleteProduct(id) | ||
activate Model | ||
|
||
Model -> AddressBook : deleteProduct(id) | ||
activate AddressBook | ||
|
||
AddressBook -> ProductMenu :deleteProduct(id) | ||
activate ProductMenu | ||
|
||
ProductMenu -> ProductMenu :deleteProduct(id) | ||
ProductMenu -> AddressBook | ||
deactivate ProductMenu | ||
|
||
AddressBook --> Model : | ||
deactivate AddressBook | ||
|
||
[<-- Model | ||
deactivate Model | ||
|
||
@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,87 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR | ||
participant ":DeleteMenuCommandParser" as DeleteMenuCommandParser LOGIC_COLOR | ||
participant "d:DeleteMenuCommand" as DeleteMenuCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant "m:Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("delete m/1") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("delete m/1") | ||
activate AddressBookParser | ||
|
||
create DeleteCommandParser | ||
AddressBookParser -> DeleteCommandParser | ||
activate DeleteCommandParser | ||
|
||
DeleteCommandParser --> AddressBookParser | ||
deactivate DeleteCommandParser | ||
|
||
AddressBookParser -> DeleteCommandParser : parse("m/1") | ||
activate DeleteCommandParser | ||
|
||
create DeleteMenuCommandParser | ||
DeleteCommandParser -> DeleteMenuCommandParser | ||
activate DeleteMenuCommandParser | ||
|
||
DeleteMenuCommandParser --> DeleteCommandParser | ||
deactivate DeleteMenuCommandParser | ||
|
||
DeleteCommandParser -> DeleteMenuCommandParser : parse("1") | ||
activate DeleteMenuCommandParser | ||
|
||
create DeleteMenuCommand | ||
DeleteMenuCommandParser -> DeleteMenuCommand | ||
activate DeleteMenuCommand | ||
|
||
DeleteMenuCommand --> DeleteMenuCommandParser : | ||
deactivate DeleteMenuCommand | ||
|
||
DeleteMenuCommandParser --> DeleteCommandParser : d | ||
deactivate DeleteMenuCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
DeleteMenuCommandParser -[hidden]-> DeleteCommandParser | ||
destroy DeleteMenuCommandParser | ||
|
||
DeleteCommandParser --> AddressBookParser : d | ||
deactivate DeleteCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
DeleteCommandParser -[hidden]-> AddressBookParser | ||
destroy DeleteCommandParser | ||
|
||
AddressBookParser --> LogicManager : d | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> DeleteMenuCommand : execute(m) | ||
activate DeleteMenuCommand | ||
|
||
DeleteMenuCommand -> Model : deleteProduct(id) | ||
activate Model | ||
|
||
Model --> DeleteMenuCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
DeleteMenuCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> DeleteMenuCommand | ||
deactivate CommandResult | ||
|
||
DeleteMenuCommand --> LogicManager : r | ||
deactivate DeleteMenuCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@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,33 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant ":AddressBook" as AddressBook MODEL_COLOR | ||
end box | ||
|
||
box ProductMenu | ||
participant ":ProductMenu" as ProductMenu | ||
end box | ||
|
||
[-> Model : deleteProduct(id) | ||
activate Model | ||
|
||
Model -> AddressBook : deleteProduct(id) | ||
activate AddressBook | ||
|
||
AddressBook -> ProductMenu :deleteProduct(id) | ||
activate ProductMenu | ||
|
||
ProductMenu -> ProductMenu :deleteProduct(id) | ||
ProductMenu -> AddressBook | ||
deactivate ProductMenu | ||
|
||
AddressBook --> Model : | ||
deactivate AddressBook | ||
|
||
[<-- Model | ||
deactivate Model | ||
|
||
@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.