-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add UML diagram for mark command
- Loading branch information
Showing
2 changed files
with
39 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
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,23 @@ | ||
@startuml | ||
start | ||
:User keys in MarkCommand with name and week; | ||
|
||
:Retrieve person from Model using name; | ||
|
||
if () then ([Person not found]) | ||
:Throw MESSAGE_INVALID_PERSON_DISPLAYED_NAME; | ||
stop | ||
else ([Else]) | ||
:Retrieve weeksPresent for the person; | ||
if () then ([Week already marked]) | ||
:Return MESSAGE_MARK_ALREADY_SUCCESS; | ||
stop | ||
else ([Else]) | ||
:Add week to weeksPresent; | ||
:Update person with new weeksPresent; | ||
:Save updated person back to Model; | ||
:Return MESSAGE_MARK_SUCCESS; | ||
stop | ||
endif | ||
endif | ||
@enduml |