forked from nus-cs2103-AY2122S1/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 #117 from CheahYan/Update-DevGuide
Update dev guide
- Loading branch information
Showing
7 changed files
with
168 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,26 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam arrowThickness 1.1 | ||
skinparam arrowColor MODEL_COLOR | ||
skinparam classBackgroundColor MODEL_COLOR | ||
|
||
package Logic { | ||
class RevenueCommand | ||
} | ||
|
||
|
||
package Model { | ||
class Revenue | ||
class Index | ||
class Revenue | ||
} | ||
|
||
package Commons { | ||
class Money | ||
} | ||
|
||
RevenueCommand --> "1" Index | ||
RevenueCommand --> "1" Revenue | ||
Revenue --> "1" Money | ||
|
||
@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,15 @@ | ||
@startuml | ||
!include style.puml | ||
start | ||
:Get client at index; | ||
:Add input revenue to the client's revenue; | ||
|
||
if () then ([total revenue is negative]) | ||
:Revert client's revenue back to the \nvalue before the addition; | ||
else ([else]) | ||
:Create new Revenue with the \nvalue of total revenue; | ||
endif | ||
:Return CommandResult; | ||
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,74 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
Participant ":AddressBookParser" as addressBookParser LOGIC_COLOR_T2 | ||
Participant ":RevenueCommandParser" as revenueCommandParser LOGIC_COLOR | ||
Participant "argMultimap:ArgumentMultimap" as argumentMultimap LOGIC_COLOR_T1 | ||
Participant "<<class>>\nParserUtil" as util LOGIC_COLOR_T3 | ||
Participant "revenue:Revenue" as revenue MODEL_COLOR | ||
Participant ":Money" as money MODEL_COLOR | ||
Participant ":RevenueCommand" as command LOGIC_COLOR_T4 | ||
|
||
|
||
addressBookParser -[LOGIC_COLOR_T2]> revenueCommandParser : parse("1 r/100.21") | ||
activate addressBookParser LOGIC_COLOR_T2 | ||
activate revenueCommandParser LOGIC_COLOR | ||
|
||
create argumentMultimap | ||
revenueCommandParser -[LOGIC_COLOR]> argumentMultimap : ArgumentTokenizer.tokenize("1 r/100.21", PREFIX_REVENUE) | ||
activate argumentMultimap LOGIC_COLOR_T1 | ||
|
||
argumentMultimap -[LOGIC_COLOR]-> revenueCommandParser | ||
deactivate argumentMultimap | ||
|
||
revenueCommandParser -[LOGIC_COLOR]> util :parseIndex(argMultimap.getPreamble()) | ||
activate util LOGIC_COLOR_T3 | ||
|
||
util -[LOGIC_COLOR]> argumentMultimap:getPreamble() | ||
activate argumentMultimap LOGIC_COLOR_T1 | ||
|
||
argumentMultimap -[LOGIC_COLOR]-> util | ||
deactivate argumentMultimap | ||
|
||
util -[LOGIC_COLOR_T3]-> revenueCommandParser :index | ||
deactivate util | ||
|
||
revenueCommandParser -[LOGIC_COLOR]> util :parseRevenue(argMultimap.getValue(PREFIX_REVENUE).get()) | ||
activate util LOGIC_COLOR_T3 | ||
|
||
util -[LOGIC_COLOR]> argumentMultimap:getValue(PREFIX_REVENUE).get() | ||
activate argumentMultimap LOGIC_COLOR_T1 | ||
|
||
argumentMultimap -[LOGIC_COLOR]-> util | ||
deactivate argumentMultimap | ||
|
||
create revenue | ||
util -[LOGIC_COLOR_T3]-> revenue: Revenue(new Money(number)) | ||
activate revenue MODEL_COLOR | ||
|
||
create money | ||
revenue -[LOGIC_COLOR_T3]> money: Money(number) | ||
activate money MODEL_COLOR | ||
|
||
money -[LOGIC_COLOR_T3]-> revenue | ||
deactivate money | ||
|
||
revenue -[MODEL_COLOR]-> util | ||
deactivate revenue | ||
|
||
util -[LOGIC_COLOR_T3]-> revenueCommandParser | ||
deactivate util | ||
|
||
create command | ||
revenueCommandParser -[LOGIC_COLOR]> command :RevenueCommand(index, revenue) | ||
activate command LOGIC_COLOR_T4 | ||
|
||
command -[LOGIC_COLOR_T4]-> revenueCommandParser : RevenueCommand | ||
deactivate command | ||
|
||
revenueCommandParser -[LOGIC_COLOR]-> addressBookParser: RevenueCommand | ||
deactivate revenueCommandParser | ||
|
||
deactivate addressBookParser | ||
|
||
@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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.