Skip to content

Commit

Permalink
Add Seq Diagram for Store
Browse files Browse the repository at this point in the history
  • Loading branch information
WilsonLee2000 committed Apr 10, 2023
1 parent 446871d commit d726cb4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Step 3. The `storeNotes` public method will then store the note item input by us
<summary>Sequence Diagram for Store</summary>
<div markdown="1">


![img.png](SequenceDiagrams/Store_sequence_diagram.png)

</div>
</details>
Expand Down
27 changes: 27 additions & 0 deletions docs/UmlFiles/Store.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@startuml
'https://plantuml.com/sequence-diagram

@startuml
title Sequence Diagram for Store
actor User

User -> ":Store" **: Store(notes, toDo)
User -> ":Store":storeNotes()
activate ":Store"
alt isInvalidTodo(toDo) is "Invalid todo"
":Store" -> ":Ui" : Ui.printIncorrectFormatEntered()
activate ":Ui"
deactivate ":Ui"
else
":Store" -> ":notes": notes.add(toDo)
activate ":notes"
deactivate ":notes"
":Store" -> ":Ui": Ui.printAddNote(toDo, notes.getSize());
activate ":Ui"
deactivate ":Ui"
":Store" -> ":NotesFileWriter": NotesFileWriter.saveFile(filePath, notes.getAll())
activate ":NotesFileWriter"
deactivate ":NotesFileWriter"
end
deactivate ":Store"
@enduml

0 comments on commit d726cb4

Please sign in to comment.