forked from nus-cs2103-AY2223S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 6
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 #72 from yellow-294/update-dg-addassginments
Update DG with AddAssginments command
- Loading branch information
Showing
9 changed files
with
198 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,24 @@ | ||
@startuml | ||
object "__alpha:Person__" as alpha { | ||
role = Student | ||
} | ||
|
||
object "__bravo:Person__" as bravo { | ||
role = Student | ||
} | ||
|
||
object "__charlie:Person__" as charlie { | ||
role = Professor | ||
} | ||
|
||
object "__delta:Person__" as delta { | ||
role = TA | ||
} | ||
|
||
map "__:TAB__" as Tab { | ||
<u> :Person1 *-> alpha | ||
<u> :Person2 *--> bravo | ||
<u> :Person3 *---> charlie | ||
<u> :Person4 *----> delta | ||
} | ||
@end |
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,33 @@ | ||
@startuml | ||
object "__alpha:Person__" as alpha { | ||
role = Student | ||
} | ||
|
||
object "__bravo:Person__" as bravo { | ||
role = Student | ||
} | ||
|
||
object "__charlie:Person__" as charlie { | ||
role = Professor | ||
} | ||
|
||
object "__delta:Person__" as delta { | ||
role = TA | ||
} | ||
|
||
map "__:TAB__" as Tab { | ||
<u> :Person1 *-> alpha | ||
<u> :Person2 *--> bravo | ||
<u> :Person3 *---> charlie | ||
<u> :Person4 *----> delta | ||
} | ||
|
||
map ":AddAssignmentsCommand" as AddAssignmentsCommand { | ||
|
||
} | ||
|
||
AddAssignmentsCommand --> alpha : check | ||
AddAssignmentsCommand ---> bravo : check | ||
AddAssignmentsCommand ----> charlie : check | ||
AddAssignmentsCommand -----> delta : check | ||
@end |
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,56 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":AddAssignmentsCommandParser" as AddAssignmentsCommandParser LOGIC_COLOR | ||
participant ":AddAssignmentsCommand" as AddAssignmentsCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
end box | ||
|
||
|
||
|
||
[-> AddressBookParser : parseCommand(assignments) | ||
activate AddressBookParser | ||
|
||
create AddAssignmentsCommandParser | ||
AddressBookParser -> AddAssignmentsCommandParser: | ||
activate AddAssignmentsCommandParser | ||
|
||
AddAssignmentsCommandParser --> AddressBookParser | ||
deactivate AddAssignmentsCommandParser | ||
|
||
AddressBookParser -> AddAssignmentsCommandParser: parse() | ||
activate AddAssignmentsCommandParser | ||
|
||
create AddAssignmentsCommand | ||
AddAssignmentsCommandParser -> AddAssignmentsCommand: parse() | ||
activate AddAssignmentsCommand | ||
|
||
create Model | ||
AddAssignmentsCommand -> Model: setPerson() | ||
activate Model | ||
|
||
Model --> AddAssignmentsCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
AddAssignmentsCommand -> CommandResult: execute() | ||
activate CommandResult | ||
|
||
CommandResult --> AddAssignmentsCommand | ||
deactivate CommandResult | ||
|
||
AddAssignmentsCommand --> AddAssignmentsCommandParser | ||
deactivate AddAssignmentsCommand | ||
|
||
AddAssignmentsCommandParser --> AddressBookParser | ||
deactivate AddAssignmentsCommandParser | ||
|
||
[<-- AddressBookParser | ||
deactivate AddressBookParser | ||
@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,17 @@ | ||
@startuml | ||
start | ||
: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 ([command is valid]) | ||
:Parse inputs; | ||
:Iterates TAB for Students; | ||
:Creates Assignment objects and add them to an | ||
ArrayList encapsulated in Student; | ||
else ([else]) | ||
:Display error; | ||
endif | ||
stop | ||
@enduml |
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.