forked from nus-cs2113-AY2324S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #82 from isaaceng7/update-developer-guide
Update List feature in DG with sequence diagram
- Loading branch information
Showing
3 changed files
with
71 additions
and
5 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,61 @@ | ||
@startuml | ||
'https://plantuml.com/sequence-diagram | ||
|
||
autonumber | ||
|
||
actor User | ||
participant "TransactionManager" as TM | ||
participant "UserInterface" as UI | ||
participant "LocalDate" as LD | ||
|
||
User -> TM: processList() | ||
TM -> UI: printListOptions() | ||
activate UI | ||
UI --> User: Display list options | ||
deactivate UI | ||
User -> TM: selectOption(option) | ||
TM -> TM: determineAction(option) | ||
|
||
alt Option 1 (All Transactions) | ||
TM -> TM: printTransactions() | ||
TM -> UI: printTransactions() | ||
activate UI | ||
UI --> User: Display all transactions | ||
deactivate UI | ||
else Option 2 (Past Week Transactions) | ||
TM -> LD: now() | ||
activate LD | ||
LD --> TM: today | ||
deactivate LD | ||
TM -> TM: calculateStartDate("week") | ||
TM -> TM: filterTransactions(startDate) | ||
TM -> UI: printPastTransactions(transactions, "week") | ||
activate UI | ||
UI --> User: Display past week transactions | ||
deactivate UI | ||
else Option 3 (Past Month Transactions) | ||
TM -> LD: now() | ||
LD --> TM: today | ||
TM -> TM: calculateStartDate("month") | ||
TM -> TM: filterTransactions(startDate) | ||
TM -> UI: printPastTransactions(transactions, "month") | ||
activate UI | ||
UI --> User: Display past month transactions | ||
deactivate UI | ||
else Option 4 (Custom Date Transactions) | ||
TM -> UI: getStartDate() | ||
activate UI | ||
UI --> TM: startDate | ||
deactivate UI | ||
TM -> UI: getEndDate() | ||
activate UI | ||
UI --> TM: endDate | ||
deactivate UI | ||
TM -> TM: parseDates(startDate, endDate) | ||
TM -> TM: filterTransactions(startDate, endDate) | ||
TM -> UI: printCustomDateTransactions(transactions) | ||
activate UI | ||
UI --> User: Display custom date transactions | ||
deactivate UI | ||
end | ||
@enduml |