forked from nus-cs2113-AY2223S2/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 #307 from WilsonLee2000/SeqDiagramAdd
Add Sequence Diagram for Store
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
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,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 |