forked from AY2324S2-CS2103T-W12-1/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.
Add explanation on extensions to add and edit command
Lack of explanation to how add and edit command works, and birthday and priority features. Updating the developer guide will make future understanding easier. Let's * Add PUML object and sequence diagrams for add command. * Add brief explanation on how add and edit commands and command parsers work. * Add explanation of birthday class. * Add explanation of priority class and priority value enum.
- Loading branch information
1 parent
c12467f
commit b726205
Showing
3 changed files
with
126 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,23 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam objectFontColor white | ||
|
||
object "<u>:AddCommand</u>" as AddCommand LOGIC_COLOR | ||
object "<u>:AddCommandParser</u>" as AddCommandParser LOGIC_COLOR | ||
object "<u>:AddressBookParser</u>" as AddressBookParser LOGIC_COLOR | ||
object "<u>:Model</u>" as Model MODEL_COLOR | ||
object "<u>:CommandResult</u>" as CommandResult LOGIC_COLOR | ||
object "<u>toAdd:Person" as Person LOGIC_COLOR | ||
object "<u>:ArgumentMultimap" as ArgumentMultimap LOGIC_COLOR | ||
object "<u>:ParserUtil" as ParserUtil LOGIC_COLOR | ||
|
||
AddressBookParser --> AddCommandParser : calls | ||
AddressBookParser --> AddCommand | ||
AddCommandParser -> AddCommand | ||
AddCommandParser --> ArgumentMultimap : instantiates | ||
ParserUtil --> ArgumentMultimap : parses | ||
AddCommand --> Person | ||
AddCommand --> Model | ||
AddCommand -right-> CommandResult : outputs | ||
Model --> Person : Adds | ||
@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,60 @@ | ||
@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 "a:AddCommand" as AddCommand 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(...) | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand(...) | ||
activate AddressBookParser | ||
|
||
create AddCommand | ||
AddressBookParser -> AddCommand : AddCommand(...) | ||
activate AddCommand | ||
|
||
AddCommand --> AddressBookParser | ||
deactivate AddCommand | ||
|
||
AddressBookParser --> LogicManager : a | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> AddCommand : execute() | ||
activate AddCommand | ||
|
||
AddCommand -> Model : addPerson(toAdd) | ||
activate Model | ||
|
||
Model --> AddCommand | ||
deactivate Model | ||
|
||
AddCommand -> Model : setDisplayClient(toAdd) | ||
activate Model | ||
|
||
Model --> AddCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
AddCommand --> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> AddCommand | ||
deactivate CommandResult | ||
|
||
AddCommand --> LogicManager : result | ||
deactivate AddCommand | ||
AddCommand -[hidden]-> LogicManager : result | ||
destroy AddCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |