forked from nus-cs2103-AY2223S2/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 #69 from evanpy/dg-draft
Update developer guide for sort feature
- Loading branch information
Showing
6 changed files
with
148 additions
and
29 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,7 @@ | ||
@startuml | ||
start | ||
:User executes sort command; | ||
:Sort AddressBook by attribute; | ||
:Save AddressBook to addressBookStateList; | ||
stop | ||
@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 | ||
|
||
Actor User as user USER_COLOR | ||
Participant ":UI" as ui UI_COLOR | ||
Participant ":LogicManager" as LM LOGIC_MANAGER_COLOR | ||
Participant ":AddressBookParser" as ABP ADDRESS_BOOK_PARSER_COLOR | ||
Participant ":SortCommandParser" as SCP SORT_COMMAND_PARSER_COLOR | ||
Participant ":SortCommand" as SC SORT_COMMAND_COLOR | ||
Participant "model:ModelManager" as MM MODEL_MANAGER_COLOR | ||
Participant ":Storage" as storage STORAGE_COLOR | ||
|
||
user -[USER_COLOR]> ui : "sort name" | ||
activate ui UI_COLOR | ||
|
||
ui -[UI_COLOR]> LM : execute("sort name") | ||
activate LM LOGIC_MANAGER_COLOR | ||
|
||
LM -[LOGIC_MANAGER_COLOR]> ABP : parseCommand("sort name") | ||
activate ABP ADDRESS_BOOK_PARSER_COLOR | ||
|
||
ABP -[ADDRESS_BOOK_PARSER_COLOR]> SCP : parse("name") | ||
activate SCP SORT_COMMAND_PARSER_COLOR | ||
|
||
create SC | ||
SCP -[SORT_COMMAND_PARSER_COLOR]> SC : SortCommand("name") | ||
activate SC SORT_COMMAND_COLOR | ||
|
||
SC -[SORT_COMMAND_COLOR]-> SCP | ||
deactivate SC | ||
|
||
SCP -[SORT_COMMAND_PARSER_COLOR]-> ABP | ||
deactivate SCP | ||
|
||
ABP --[ADDRESS_BOOK_PARSER_COLOR]> LM : command | ||
deactivate ABP | ||
|
||
LM -[LOGIC_MANAGER_COLOR]> SC : execute(model) | ||
activate SC SORT_COMMAND_COLOR | ||
|
||
SC -[SORT_COMMAND_COLOR]> MM : sortPersonList("name") | ||
activate MM MODEL_MANAGER_COLOR | ||
deactivate MM | ||
|
||
SC --[SORT_COMMAND_COLOR]> LM : commandResult | ||
deactivate SC | ||
|
||
LM -[LOGIC_MANAGER_COLOR]> storage : saveAddressBook(addressBook) | ||
activate storage STORAGE_COLOR | ||
storage -[STORAGE_COLOR]> storage : Save to file | ||
activate storage STORAGE_COLOR_T1 | ||
storage --[STORAGE_COLOR]> storage | ||
deactivate storage | ||
storage --[STORAGE_COLOR]> LM | ||
deactivate storage | ||
|
||
LM --[LOGIC_MANAGER_COLOR]> ui | ||
deactivate LM | ||
|
||
ui--[UI_COLOR]> user | ||
deactivate ui | ||
@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
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.