forked from nus-cs2103-AY2223S2/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 #218 from nicleejy/dg-activity-diagram
add activity diagrams, autocomplete dg writeup
- Loading branch information
Showing
7 changed files
with
117 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
31 changes: 31 additions & 0 deletions
31
docs/diagrams/activity_diagrams/addRecurringExpenseActivityDiagram.puml
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,31 @@ | ||
@startuml | ||
start | ||
:User executes "addrec" command; | ||
:"addrec" command is parsed; | ||
|
||
if () then ([arguments present & in valid format]) | ||
if () then ([end date later than start date]) | ||
:RecurringExpenseManager object created; | ||
:AddRecurringExpenseCommand object created and executed; | ||
if () then ([recurring expense is unique) | ||
:Search category list for instance matching category name; | ||
if () then ([matching instance found]) | ||
:Link matching category to RecurringExpenseManager; | ||
else ([else]) | ||
:Add category to category list; | ||
endif; | ||
:Add RecurringExpenseManager object to recurring expense list; | ||
:Generate new expenses from recurring expense; | ||
:Display success message; | ||
else ([else]) | ||
:Error message displayed specifying duplicate recurring expense; | ||
endif | ||
else ([else]) | ||
:Error message displayed specifying end date was earlier than start date; | ||
endif | ||
|
||
else ([else]) | ||
:Error message displayed specifying an error in the command format; | ||
endif | ||
stop | ||
@enduml |
18 changes: 18 additions & 0 deletions
18
docs/diagrams/activity_diagrams/deleteRecurringExpenseActivityDiagram.puml
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,18 @@ | ||
@startuml | ||
start | ||
:User executes "delrec" command; | ||
:"delrec" command is parsed; | ||
|
||
if () then ([index is present]) | ||
if () then ([index is within range]) | ||
:Get RecurringExpenseManager instance to edit; | ||
:Delete RecurringExpenseManager from recurring expense list; | ||
:Display success message; | ||
else ([else]) | ||
:Error message displayed specifying index out of range; | ||
endif; | ||
else ([else]) | ||
:Error message displayed specifying an error in the command format; | ||
endif | ||
stop | ||
@enduml |
24 changes: 24 additions & 0 deletions
24
docs/diagrams/activity_diagrams/editRecurringExpenseActivityDiagram.puml
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,24 @@ | ||
@startuml | ||
start | ||
:User executes "edrec" command; | ||
:"edrec" command is parsed; | ||
|
||
if () then ([at least one argument is present]) | ||
if () then ([arguments in valid format and index within range]) | ||
:Get RecurringExpenseManager instance to edit; | ||
:Search category list for instance matching category name; | ||
if () then ([matching instance found]) | ||
:Link matching category to RecurringExpenseManager; | ||
:Update necessary attributes in RecurringExpenseManager; | ||
:Display success message; | ||
else ([else]) | ||
:Error message displayed specifying nonexistent category; | ||
endif; | ||
else ([else]) | ||
:Error message displayed specifying an error in the command format or index out of range; | ||
endif | ||
else ([else]) | ||
:Error message displayed specifying no attributes given to edit; | ||
endif | ||
stop | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.5 KB
docs/images/activity_diagrams/deleteRecurringExpenseActivityDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.6 KB
docs/images/activity_diagrams/editRecurringExpenseActivityDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.