forked from nus-cs2103-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 pull request #280 from AY2324S1-CS2103T-F08-0/fry-update-ppp
Update DG
- Loading branch information
Showing
7 changed files
with
536 additions
and
29 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,71 @@ | ||
@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 "d:DeleteCommand" as DeleteCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("delete 1") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("delete 1") | ||
activate AddressBookParser | ||
|
||
create DeleteCommandParser | ||
AddressBookParser -> DeleteCommandParser | ||
activate DeleteCommandParser | ||
|
||
DeleteCommandParser --> AddressBookParser | ||
deactivate DeleteCommandParser | ||
|
||
AddressBookParser -> DeleteCommandParser : parse("1") | ||
activate DeleteCommandParser | ||
|
||
create DeleteCommand | ||
DeleteCommandParser -> DeleteCommand | ||
activate DeleteCommand | ||
|
||
DeleteCommand --> DeleteCommandParser : d | ||
deactivate DeleteCommand | ||
|
||
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 -> DeleteCommand : execute() | ||
activate DeleteCommand | ||
|
||
DeleteCommand -> Model : deletePerson(personToDelete) | ||
activate Model | ||
|
||
Model --> DeleteCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
DeleteCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> DeleteCommand | ||
deactivate CommandResult | ||
|
||
DeleteCommand --> LogicManager : result | ||
deactivate DeleteCommand | ||
|
||
[<--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,84 @@ | ||
@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 ":EditCommandParser" as EditCommandParser LOGIC_COLOR | ||
participant "d:EditCommand" as EditCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant "e:Person" as EditedPerson MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("edit 1 --name new name") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("edit 1 --name new name") | ||
activate AddressBookParser | ||
|
||
create EditCommandParser | ||
AddressBookParser -> EditCommandParser | ||
activate EditCommandParser | ||
|
||
EditCommandParser --> AddressBookParser | ||
deactivate EditCommandParser | ||
|
||
AddressBookParser -> EditCommandParser : parse("1 --name new name") | ||
activate EditCommandParser | ||
|
||
create EditCommand | ||
EditCommandParser -> EditCommand | ||
activate EditCommand | ||
|
||
EditCommand --> EditCommandParser : d | ||
deactivate EditCommand | ||
|
||
EditCommandParser --> AddressBookParser : d | ||
deactivate EditCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
EditCommandParser -[hidden]-> AddressBookParser | ||
destroy EditCommandParser | ||
|
||
AddressBookParser --> LogicManager : d | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> EditCommand : execute() | ||
activate EditCommand | ||
|
||
create EditedPerson | ||
EditCommand -> EditedPerson ++ | ||
return | ||
|
||
EditCommand -> Model ++ : hasPerson(e) | ||
return | ||
|
||
EditCommand -> Model : setPerson(p, e) | ||
activate Model | ||
|
||
Model --> EditCommand | ||
deactivate Model | ||
|
||
EditCommand -> Model : updateFilteredPersonList() | ||
activate Model | ||
|
||
Model --> EditCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
EditCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> EditCommand | ||
deactivate CommandResult | ||
|
||
EditCommand --> LogicManager : result | ||
deactivate EditCommand | ||
|
||
[<--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,79 @@ | ||
@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 ":FavouriteCommandParser" as FavouriteCommandParser LOGIC_COLOR | ||
participant "d:FavouriteCommand" as FavouriteCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("fav 1") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("fav 1") | ||
activate AddressBookParser | ||
|
||
create FavouriteCommandParser | ||
AddressBookParser -> FavouriteCommandParser | ||
activate FavouriteCommandParser | ||
|
||
FavouriteCommandParser --> AddressBookParser | ||
deactivate FavouriteCommandParser | ||
|
||
AddressBookParser ->FavouriteCommandParser : parse("1") | ||
activate FavouriteCommandParser | ||
|
||
create FavouriteCommand | ||
FavouriteCommandParser -> FavouriteCommand | ||
activate FavouriteCommand | ||
|
||
FavouriteCommand --> FavouriteCommandParser : d | ||
deactivate FavouriteCommand | ||
|
||
FavouriteCommandParser --> AddressBookParser : d | ||
deactivate FavouriteCommandParser | ||
|
||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
FavouriteCommandParser -[hidden]-> AddressBookParser | ||
destroy FavouriteCommandParser | ||
|
||
AddressBookParser --> LogicManager : d | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> FavouriteCommand : execute() | ||
activate FavouriteCommand | ||
|
||
FavouriteCommand -> Model : favouritePerson(personToFavourite) | ||
activate Model | ||
|
||
Model --> FavouriteCommand | ||
deactivate Model | ||
|
||
FavouriteCommand -> Model ++ : setPerson(personToFavourite, personToFavourite) | ||
return | ||
|
||
FavouriteCommand -> Model ++ : updateFilteredPersonList() | ||
return | ||
|
||
deactivate Model | ||
|
||
create CommandResult | ||
FavouriteCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> FavouriteCommand | ||
deactivate CommandResult | ||
|
||
FavouriteCommand --> LogicManager : result | ||
deactivate FavouriteCommand | ||
|
||
[<--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,79 @@ | ||
@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 ":UnfavouriteCommandParser" as UnfavouriteCommandParser LOGIC_COLOR | ||
participant "d:UnfavouriteCommand" as UnfavouriteCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("unfav 1") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("unfav 1") | ||
activate AddressBookParser | ||
|
||
create UnfavouriteCommandParser | ||
AddressBookParser -> UnfavouriteCommandParser | ||
activate UnfavouriteCommandParser | ||
|
||
UnfavouriteCommandParser --> AddressBookParser | ||
deactivate UnfavouriteCommandParser | ||
|
||
AddressBookParser ->UnfavouriteCommandParser : parse("1") | ||
activate UnfavouriteCommandParser | ||
|
||
create UnfavouriteCommand | ||
UnfavouriteCommandParser -> UnfavouriteCommand | ||
activate UnfavouriteCommand | ||
|
||
UnfavouriteCommand --> UnfavouriteCommandParser : d | ||
deactivate UnfavouriteCommand | ||
|
||
UnfavouriteCommandParser --> AddressBookParser : d | ||
deactivate UnfavouriteCommandParser | ||
|
||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
UnfavouriteCommandParser -[hidden]-> AddressBookParser | ||
destroy UnfavouriteCommandParser | ||
|
||
AddressBookParser --> LogicManager : d | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> UnfavouriteCommand : execute() | ||
activate UnfavouriteCommand | ||
|
||
UnfavouriteCommand -> Model : unfavouritePerson(personToUnfavourite) | ||
activate Model | ||
|
||
Model --> UnfavouriteCommand | ||
deactivate Model | ||
|
||
UnfavouriteCommand -> Model ++ : setPerson(personToUnfavourite, personToUnfavourite) | ||
return | ||
|
||
UnfavouriteCommand -> Model ++ : updateFilteredPersonList() | ||
return | ||
|
||
deactivate Model | ||
|
||
create CommandResult | ||
UnfavouriteCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> UnfavouriteCommand | ||
deactivate CommandResult | ||
|
||
UnfavouriteCommand --> LogicManager : result | ||
deactivate UnfavouriteCommand | ||
|
||
[<--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
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