Skip to content

Commit

Permalink
Update addTransaction.puml according to new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShyamKrishna33 committed Apr 15, 2024
1 parent 11197d2 commit b9fa417
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The following class diagram shows the associations between classes involved in p

![](./uml/uml-images/TransactionListDiagram.png)

The following sequence diagram shows how a remove transaction goes works:
The following sequence diagram shows how an add transaction command works:

![](./uml/uml-images/addTransactionDiagram.png)

Expand Down
20 changes: 12 additions & 8 deletions docs/uml/addTransaction.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@
autonumber

actor User
participant "TransactionManager" as TM
participant "Parser" as P
participant ":TransactionManager" as TM
participant ":Parser" as P
participant "UserInterface" as UI

User -> TM: processTransaction(input, account)
TM -> TM: validateSyntax(input)
TM -> P: parseUserInputToTransaction(input, account)
activate P
P --> TM: transaction
deactivate P
TM -> TM: checkCategory(transaction)
P -> P: checkCategory(transaction)

alt Category is null
TM -> UI: listCategories()
P -> UI: listCategories()
activate UI
UI --> User: Display category options
User --> UI: categoryNum
UI --> P: getCategoryNum()
deactivate UI
User -> TM: selectCategory(categoryNum)
TM -> TM: setCategory(transaction, categoryNum)
end

P --> TM: transaction
deactivate P


TM -> TM: addTransaction(transaction)
TM -> UI: printAddMessage(transaction, account.balance)
activate UI
Expand Down

0 comments on commit b9fa417

Please sign in to comment.