forked from nus-cs2103-AY2122S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
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 nus-cs2103-AY2122S1#97 from luminousleek/update-dg
Update DG for design considerations
- Loading branch information
Showing
5 changed files
with
159 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,59 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box UI UI_COLOR_T1 | ||
participant ":MainWindow" as MainWindow UI_COLOR | ||
end box | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR | ||
participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
[-> MainWindow : executeCommand(delete 1) | ||
activate MainWindow | ||
|
||
MainWindow -> LogicManager : execute(delete 1, GuiState.DETAILS) | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand(delete 1, GuiState.DETAILS) | ||
activate AddressBookParser | ||
|
||
AddressBookParser -> DeleteCommandParser : parse(1, GuiState.DETAILS) | ||
activate DeleteCommandParser | ||
|
||
create DeleteCommand | ||
DeleteCommandParser -> DeleteCommand | ||
activate DeleteCommand | ||
|
||
DeleteCommand --> DeleteCommandParser | ||
deactivate DeleteCommand | ||
|
||
DeleteCommandParser --> AddressBookParser : d | ||
deactivate DeleteCommandParser | ||
|
||
AddressBookParser --> LogicManager : d | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> DeleteCommand : execute() | ||
activate DeleteCommand | ||
|
||
create CommandResult | ||
DeleteCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> DeleteCommand | ||
deactivate CommandResult | ||
|
||
DeleteCommand --> LogicManager : r | ||
deactivate DeleteCommand | ||
|
||
LogicManager --> MainWindow : r | ||
deactivate LogicManager | ||
|
||
[<--MainWindow | ||
deactivate MainWindow | ||
@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,62 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam arrowThickness 1.1 | ||
skinparam arrowColor LOGIC_COLOR_T4 | ||
skinparam classBackgroundColor LOGIC_COLOR | ||
|
||
package UI { | ||
|
||
Class MainWindow UI_COLOR | ||
} | ||
|
||
package Logic { | ||
|
||
Class AddressBookParser | ||
Class XYZCommand | ||
Class XYZParser | ||
Class CommandResult | ||
|
||
Class "{abstract}\nCommand" as Command | ||
|
||
Class "<<enumeration>>\nGuiState" as GuiState | ||
Interface Logic <<Interface>> | ||
Interface Parser <<Interface>> | ||
|
||
Class LogicManager | ||
|
||
} | ||
|
||
package Model{ | ||
Class HiddenModel #FFFFFF | ||
} | ||
|
||
package Storage{ | ||
} | ||
|
||
MainWindow .> Logic | ||
|
||
LogicManager .right|> Logic | ||
MainWindow ->"1" GuiState | ||
Logic .right> GuiState | ||
|
||
XYZCommand -up-|> Command | ||
LogicManager ..> Command : executes > | ||
|
||
LogicManager -->"1" AddressBookParser | ||
AddressBookParser ..> Parser | ||
XYZParser .up.|> Parser | ||
XYZParser .down.> XYZCommand : creates > | ||
|
||
LogicManager --> Model | ||
LogicManager --> Storage | ||
Storage --[hidden] Model | ||
Command .[hidden]up.> Storage | ||
Command .left.> Model | ||
note left of XYZCommand: XYZCommand = AddCommand, \nDeleteCommand, etc | ||
|
||
Logic ..> CommandResult | ||
LogicManager .down.> CommandResult | ||
Command .up.> CommandResult : produces > | ||
CommandResult -up->"1" GuiState | ||
MainWindow .down.> CommandResult : updates < | ||
@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.