Skip to content

Commit

Permalink
Add features to DG
Browse files Browse the repository at this point in the history
  • Loading branch information
Lin-Shuang-Shuang committed Apr 15, 2024
1 parent 6d05b75 commit abb3eac
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Developer Guide
## **Acknowledgements**

- {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}

- This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org/).
---

## **Setting up, getting started**
Expand Down Expand Up @@ -94,9 +94,9 @@ Here's a (partial) class diagram of the `Logic` component:

<img src="images/LogicClassDiagram.png" width="550"/>

The sequence diagram below illustrates the interactions within the `Logic` component, taking `execute("delete 1")` API call as an example.
The sequence diagram below illustrates the interactions within the `Logic` component, taking `execute("delete project Duke")` API call as an example.

![Interactions Inside the Logic Component for the `delete project Duke` Command](images/DeleteSequenceDiagram.png)
![Interactions Inside the Logic Component for the `delete project Duke` Command](images/DeleteProjectSequenceDiagram.png)

<div markdown="span" class="alert alert-info">:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
</div>
Expand Down
6 changes: 6 additions & 0 deletions docs/diagrams/DeleteProjectSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ deactivate AddressBookParser
LogicManager -> DeleteProjectCommand : execute(m)
activate DeleteProjectCommand

DeleteProjectCommand -> Model : findProject(Duke)
activate Model

Model --> DeleteProjectCommand
deactivate Model

DeleteProjectCommand -> Model : deleteProject(Duke)
activate Model

Expand Down
10 changes: 5 additions & 5 deletions docs/diagrams/DeleteTaskSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":DeleteTaskCommandParser" as DeleteTaskCommandParser LOGIC_COLOR
participant "d:DeleteTaskCommand" as DeleteTaskCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
participant "p:Person" as Person LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Project" as Project MODEL_COLOR
participant "m:Model" as Model MODEL_COLOR
end box

Expand Down Expand Up @@ -56,10 +56,10 @@ activate Model
Model --> DeleteTaskCommand: p
deactivate Model

DeleteTaskCommand -> Person : removeTask(ui)
activate Person
Person --> DeleteTaskCommand
deactivate Person
DeleteTaskCommand -> Project : removeTask(ui)
activate Project
Project --> DeleteTaskCommand
deactivate Project

create CommandResult
DeleteTaskCommand -> CommandResult
Expand Down
13 changes: 13 additions & 0 deletions docs/diagrams/SetProjectCategorySequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Project" as Project MODEL_COLOR
participant "m:Model" as Model MODEL_COLOR
end box

Expand Down Expand Up @@ -49,6 +50,18 @@ deactivate AddressBookParser
LogicManager -> SetProjectCategoryCommand : execute(m)
activate SetProjectCategoryCommand

SetProjectCategoryCommand -> Model : findProject("Duke")
activate Model

Model --> SetProjectCategoryCommand : oldDuke
deactivate Model

SetProjectCategoryCommand -> Project : createEditedProject()
activate Project

Project -> SetProjectCategoryCommand : newDukeWithCategory
deactivate Project

SetProjectCategoryCommand -> Model : setProject(oldDuke, newDukeWithCategory)
activate Model

Expand Down
Binary file modified docs/images/DeleteProjectSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/DeleteTaskSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/SetProjectCategorySequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit abb3eac

Please sign in to comment.