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 #147 from zengzihui/branch-update-dg
Update developer guide for view command and add buyer command
- Loading branch information
Showing
3 changed files
with
202 additions
and
139 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,16 @@ | ||
@startuml | ||
skin rose | ||
skinparam ActivityFontSize 15 | ||
skinparam ArrowFontSize 12 | ||
|
||
start | ||
:User executes addBuyer command; | ||
|
||
if () then ([User provided correct parameters]) | ||
:Buyer's name, phone, email, budget and preferredHousingType are parsed; | ||
#palegreen:New buyer is returned; | ||
stop | ||
else([User failed to provide correct parameters]) | ||
#pink:EstateEase displays an error; | ||
end | ||
@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,76 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":AddBuyerCommandParser" as AddBuyerCommandParser LOGIC_COLOR | ||
participant "a:AddBuyerCommand" as AddBuyerCommand LOGIC_COLOR | ||
participant "commandResult:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
end box | ||
|
||
|
||
[-> LogicManager : execute(addBuyer n/James \n\ | ||
p/98765432 e/james@gmail.com \n\ | ||
budget/20000 type/HDB) | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parse(addBuyer n/James \n\ | ||
p/98765432 e/james@gmail.com \n\ | ||
budget/20000 type/HDB) | ||
activate AddressBookParser | ||
|
||
create AddBuyerCommandParser | ||
AddressBookParser -> AddBuyerCommandParser | ||
activate AddBuyerCommandParser | ||
|
||
AddBuyerCommandParser --> AddressBookParser | ||
deactivate AddBuyerCommandParser | ||
|
||
AddressBookParser -> AddBuyerCommandParser : parse(n/James p/98765432 \n\ | ||
e/james@gmail.com budget/20000 type/HDB) | ||
activate AddBuyerCommandParser | ||
|
||
create AddBuyerCommand | ||
AddBuyerCommandParser -> AddBuyerCommand | ||
activate AddBuyerCommand | ||
|
||
AddBuyerCommand --> AddBuyerCommandParser | ||
deactivate AddBuyerCommand | ||
|
||
AddBuyerCommandParser --> AddressBookParser : a | ||
deactivate AddBuyerCommandParser | ||
|
||
AddBuyerCommandParser -[hidden]-> AddressBookParser | ||
destroy AddBuyerCommandParser | ||
|
||
AddressBookParser --> LogicManager : a | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> AddBuyerCommand : execute() | ||
activate AddBuyerCommand | ||
|
||
AddBuyerCommand -> Model : addBuyer(buyer) | ||
activate Model | ||
|
||
Model --> AddBuyerCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
AddBuyerCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> AddBuyerCommand | ||
deactivate CommandResult | ||
|
||
AddBuyerCommand --> LogicManager : commandResult | ||
deactivate AddBuyerCommand | ||
|
||
[<-- LogicManager : commandResult | ||
deactivate LogicManager | ||
@enduml | ||
|