forked from AY2425S1-CS2103T-F11-2/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
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 AY2425S1-CS2103T-F11-2#149 from Rachelcoll/documents
Update UG and DG implementation for `attendance` `mark` and `unmark` command
- Loading branch information
Showing
18 changed files
with
321 additions
and
157 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,20 @@ | ||
@startuml | ||
skin rose | ||
skinparam ActivityFontSize 15 | ||
skinparam ArrowFontSize 12 | ||
start | ||
:User inputs telegram handles and date to mark attendance | ||
:User executes command; | ||
|
||
'Since the beta syntax does not support placing the condition outside the | ||
'diamond we place it as the true branch instead. | ||
|
||
if () then ([user input is valid]) | ||
:Get list of Members from filteredPersonList of model; | ||
:Create copy of existing member | ||
Add attendance of the specified date to each member; | ||
:Update corresponding members in address book; | ||
else ([else]) | ||
endif | ||
stop | ||
@enduml |
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,50 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ClassFontColor #000000 | ||
skinparam ClassBorderColor #000000 | ||
skinparam ClassBackgroundColor #FFFFAA | ||
|
||
' Class Diagram for MarkAttendance Feature | ||
|
||
class AddressBook { | ||
- FilteredList<Person> filteredPersons | ||
+ void setPerson(Person target, Person updatedPerson) | ||
+ FilteredList<Person> getFilteredPersonList() | ||
} | ||
|
||
class Model | ||
|
||
class Person { | ||
+ boolean isMember() | ||
} | ||
|
||
class Attendance { | ||
- LocalDate session | ||
} | ||
|
||
class Role | ||
|
||
class Member | ||
|
||
class AttendanceMarkingCommand { | ||
+ List<String> displayMembers() | ||
} | ||
|
||
class MarkAttendanceCommand { | ||
- List<Telegram> telegrams | ||
- Attendance attendance | ||
+ CommandResult execute(Model model) throws CommandException | ||
} | ||
|
||
|
||
' Relationships | ||
AttendanceMarkingCommand .right.|> Command | ||
MarkAttendanceCommand .up.|> AttendanceMarkingCommand | ||
ModelManager .left.|> Model | ||
ModelManager o-- AddressBook | ||
AddressBook o-left- Person | ||
MarkAttendanceCommand -right-> Model : uses | ||
Member .right.|> Role | ||
Person -left-> "*" Role : contains | ||
Person --> "*" Attendance : contains | ||
@enduml |
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,64 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":MarkAttendanceCommandParser" as MarkAttendanceCommandParser LOGIC_COLOR | ||
participant "m:MarkAttendanceCommand" as MarkAttendanceCommand LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
end box | ||
[-> LogicManager : execute(mark) | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand(mark) | ||
activate AddressBookParser | ||
|
||
create MarkAttendanceCommandParser | ||
AddressBookParser -> MarkAttendanceCommandParser | ||
activate MarkAttendanceCommandParser | ||
|
||
create MarkAttendanceCommand | ||
MarkAttendanceCommandParser -> MarkAttendanceCommand : parse(arguments) | ||
activate MarkAttendanceCommand | ||
|
||
MarkAttendanceCommand --> MarkAttendanceCommandParser : m | ||
deactivate MarkAttendanceCommand | ||
|
||
MarkAttendanceCommandParser --> AddressBookParser | ||
deactivate MarkAttendanceCommandParser | ||
|
||
AddressBookParser --> LogicManager : m | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> MarkAttendanceCommand : execute() | ||
activate MarkAttendanceCommand | ||
|
||
MarkAttendanceCommand -> Model : getFilteredPersonList() | ||
activate Model | ||
|
||
Model --> MarkAttendanceCommand : filteredPersonList | ||
deactivate Model | ||
|
||
MarkAttendanceCommand -> MarkAttendanceCommand : markAttendance() | ||
activate MarkAttendanceCommand | ||
|
||
MarkAttendanceCommand -> Model : setPerson() | ||
activate Model | ||
|
||
MarkAttendanceCommand -> MarkAttendanceCommand : findByTelegram() | ||
activate MarkAttendanceCommand | ||
|
||
MarkAttendanceCommand --> LogicManager : result | ||
deactivate MarkAttendanceCommand | ||
|
||
MarkAttendanceCommand -[hidden]-> LogicManager : result | ||
destroy MarkAttendanceCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |
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 | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant ":AddressBook" as AddressBook MODEL_COLOR | ||
participant "persons:UniquePersonList" as UniquePersonList MODEL_COLOR | ||
end box | ||
|
||
[-> Model : setPerson(p) | ||
activate Model | ||
|
||
Model -> AddressBook : setPerson(p) | ||
activate AddressBook | ||
|
||
AddressBook -> UniquePersonList : contains(p) | ||
AddressBook --> Model | ||
deactivate AddressBook | ||
|
||
[<-- Model | ||
deactivate Model | ||
|
||
@enduml |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.