-
Notifications
You must be signed in to change notification settings - Fork 581
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 #341 from devanshubisht/branch-update-dg
Update DG with FindCommand
- Loading branch information
Showing
7 changed files
with
220 additions
and
24 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
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,21 @@ | ||
@startuml | ||
!define COMMAND_COLOR #A9A9A9 | ||
!define ATTRIBUTE_COLOR #FFFFFF | ||
!define METHOD_COLOR #FFFFFF | ||
|
||
class FindCommand{ | ||
- predicate: Predicate<Student> | ||
+ FindCommand(predicate: Predicate<Student>) | ||
+ execute(model: Model): CommandResult | ||
+ equals(other: Object): boolean | ||
+ toString(): String | ||
} | ||
|
||
class Course{ | ||
+ updateFilteredStudentList(predicate: Predicate<Student>): void | ||
+ getFilteredStudentList(): List<Student> | ||
} | ||
|
||
Command <|-- FindCommand | ||
FindCommand ..> Course : calls | ||
@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,87 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":CodeSphereParser" as CodeSphereParser LOGIC_COLOR | ||
participant ":FindCommandParser" as FindCommandParser LOGIC_COLOR | ||
participant "d:FindCommand" as FindCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant ":Model" as Model MODEL_COLOR | ||
participant "d:NameContainsKeywordsPredicate" as NameContainsKeywordsPredicate MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("find n/john") | ||
activate LogicManager | ||
|
||
LogicManager -> CodeSphereParser : parseCommand("find n/john") | ||
activate CodeSphereParser | ||
|
||
create FindCommandParser | ||
CodeSphereParser -> FindCommandParser | ||
activate FindCommandParser | ||
|
||
FindCommandParser --> CodeSphereParser | ||
deactivate FindCommandParser | ||
|
||
CodeSphereParser -> FindCommandParser : parse("n/john") | ||
activate FindCommandParser | ||
|
||
create NameContainsKeywordsPredicate | ||
FindCommandParser -> NameContainsKeywordsPredicate | ||
activate NameContainsKeywordsPredicate | ||
|
||
NameContainsKeywordsPredicate --> FindCommandParser | ||
deactivate NameContainsKeywordsPredicate | ||
|
||
create FindCommand | ||
FindCommandParser -> FindCommand | ||
activate FindCommand | ||
|
||
FindCommand --> FindCommandParser : f | ||
deactivate FindCommand | ||
|
||
FindCommandParser --> CodeSphereParser : f | ||
deactivate FindCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
FindCommandParser -[hidden]-> CodeSphereParser | ||
destroy FindCommandParser | ||
|
||
CodeSphereParser --> LogicManager : f | ||
deactivate CodeSphereParser | ||
|
||
LogicManager -> FindCommand : execute() | ||
activate FindCommand | ||
|
||
FindCommand -> Model : updateFilteredStudentList(NameContainsKeywordsPredicate("john")) | ||
activate Model | ||
|
||
Model --> FindCommand | ||
deactivate Model | ||
|
||
FindCommand -> Model : getFilteredStudentList().size() | ||
activate Model | ||
|
||
Model --> FindCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
FindCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> FindCommand | ||
deactivate CommandResult | ||
|
||
FindCommand --> CodeSphereParser : result | ||
deactivate FindCommand | ||
|
||
CodeSphereParser --> LogicManager : result | ||
deactivate CodeSphereParser | ||
|
||
[<--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
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.