Skip to content

Commit

Permalink
Merge pull request #165 from Lin-Shuang-Shuang/branch-DGfeature
Browse files Browse the repository at this point in the history
Update DG
  • Loading branch information
Lin-Shuang-Shuang authored Apr 15, 2024
2 parents d5f4853 + 0c373b8 commit 591e1ba
Show file tree
Hide file tree
Showing 27 changed files with 731 additions and 193 deletions.
459 changes: 357 additions & 102 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions docs/diagrams/AddCommentDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":PlannerParser" as PlannerParser LOGIC_COLOR
participant ":AddCommentCommandParser" as AddCommentCommandParser LOGIC_COLOR
participant "d:AddCommentCommand" as AddCommentCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant "m:Model" as Model MODEL_COLOR
participant "Duke:Project" as Project1 MODEL_COLOR

end box

[-> LogicManager : execute("add comment c1 /from p2 /to Duke")
activate LogicManager

LogicManager -> PlannerParser : parseCommand("add comment c1 /from pa /to a")
activate PlannerParser

create AddCommentCommandParser
PlannerParser -> AddCommentCommandParser
activate AddCommentCommandParser

AddCommentCommandParser --> PlannerParser
deactivate AddCommentCommandParser

PlannerParser -> AddCommentCommandParser : parse("c1 /from p2 /to Duke")
activate AddCommentCommandParser

create AddCommentCommand
AddCommentCommandParser -> AddCommentCommand
activate AddCommentCommand

AddCommentCommand --> AddCommentCommandParser :
deactivate AddCommentCommand

AddCommentCommandParser --> PlannerParser : d
deactivate AddCommentCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
AddCommentCommandParser -[hidden]-> PlannerParser
destroy AddCommentCommandParser

PlannerParser --> LogicManager : d
deactivate PlannerParser

LogicManager -> AddCommentCommand : execute(m)
activate AddCommentCommand

AddCommentCommand -> Model : findProject(Duke)
activate Model

Model --> AddCommentCommand: Duke
deactivate Model

AddCommentCommand -> Project1: addComment(c1)

activate Project1


Project1 --> AddCommentCommand:
deactivate Project1



create CommandResult
AddCommentCommand -> CommandResult
activate CommandResult

CommandResult --> AddCommentCommand
deactivate CommandResult



AddCommentCommand --> LogicManager : r
deactivate AddCommentCommand

[<--LogicManager
deactivate LogicManager
@enduml
20 changes: 10 additions & 10 deletions docs/diagrams/AddProjectSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":PlannerParser" as PlannerParser LOGIC_COLOR
participant ":AddProjectCommandParser" as AddProjectCommandParser LOGIC_COLOR
participant "d:AddProjectCommand" as AddProjectCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
Expand All @@ -17,17 +17,17 @@ end box
[-> LogicManager : execute("add project Duke")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("add project Duke")
activate AddressBookParser
LogicManager -> PlannerParser : parseCommand("add project Duke")
activate PlannerParser

create AddProjectCommandParser
AddressBookParser -> AddProjectCommandParser
PlannerParser -> AddProjectCommandParser
activate AddProjectCommandParser

AddProjectCommandParser --> AddressBookParser
AddProjectCommandParser --> PlannerParser
deactivate AddProjectCommandParser

AddressBookParser -> AddProjectCommandParser : parse("Duke")
PlannerParser -> AddProjectCommandParser : parse("Duke")
activate AddProjectCommandParser

create AddProjectCommand
Expand All @@ -37,14 +37,14 @@ activate AddProjectCommand
AddProjectCommand --> AddProjectCommandParser :
deactivate AddProjectCommand

AddProjectCommandParser --> AddressBookParser : d
AddProjectCommandParser --> PlannerParser : d
deactivate AddProjectCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
AddProjectCommandParser -[hidden]-> AddressBookParser
AddProjectCommandParser -[hidden]-> PlannerParser
destroy AddProjectCommandParser

AddressBookParser --> LogicManager : d
deactivate AddressBookParser
PlannerParser --> LogicManager : d
deactivate PlannerParser

LogicManager -> AddProjectCommand : execute(m)
activate AddProjectCommand
Expand Down
8 changes: 4 additions & 4 deletions docs/diagrams/ArchitectureSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ Participant ":Logic" as logic LOGIC_COLOR
Participant ":Model" as model MODEL_COLOR
Participant ":Storage" as storage STORAGE_COLOR

user -[USER_COLOR]> ui : "delete 1"
user -[USER_COLOR]> ui : "delete project Duke"
activate ui UI_COLOR

ui -[UI_COLOR]> logic : execute("delete 1")
ui -[UI_COLOR]> logic : execute("delete project Duke")
activate logic LOGIC_COLOR

logic -[LOGIC_COLOR]> model : deletePerson(p)
logic -[LOGIC_COLOR]> model : deleteProject("Duke")
activate model MODEL_COLOR

model -[MODEL_COLOR]-> logic
deactivate model

logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
logic -[LOGIC_COLOR]> storage : savePlanner(planner)
activate storage STORAGE_COLOR

storage -[STORAGE_COLOR]> storage : Save to file
Expand Down
20 changes: 9 additions & 11 deletions docs/diagrams/BetterModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ skinparam arrowThickness 1.1
skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR

AddressBook *-right-> "1" UniquePersonList
AddressBook *-right-> "1" UniqueTagList
UniqueTagList -[hidden]down- UniquePersonList
UniqueTagList -[hidden]down- UniquePersonList
Planner *-right-> "1" ProjectList

UniqueTagList -right-> "*" Tag
UniquePersonList -right-> Person
ProjectList -right-> Project

Person -up-> "*" Tag
Project *--> Name
Project *--> Comment
Project *--> Member
Member *--> Name
Task *--> Name
Task *--> Member
Project *--> Task

Person *--> Name
Person *--> Phone
Person *--> Email
Person *--> Address
@enduml
26 changes: 16 additions & 10 deletions docs/diagrams/DeleteProjectSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":PlannerParser" as PlannerParser LOGIC_COLOR
participant ":DeleteProjectCommandParser" as DeleteProjectCommandParser LOGIC_COLOR
participant "d:DeleteProjectCommand" as DeleteProjectCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
Expand All @@ -17,17 +17,17 @@ end box
[-> LogicManager : execute("delete project Duke")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("delete project Duke")
activate AddressBookParser
LogicManager -> PlannerParser : parseCommand("delete project Duke")
activate PlannerParser

create DeleteProjectCommandParser
AddressBookParser -> DeleteProjectCommandParser
PlannerParser -> DeleteProjectCommandParser
activate DeleteProjectCommandParser

DeleteProjectCommandParser --> AddressBookParser
DeleteProjectCommandParser --> PlannerParser
deactivate DeleteProjectCommandParser

AddressBookParser -> DeleteProjectCommandParser : parse("Duke")
PlannerParser -> DeleteProjectCommandParser : parse("Duke")
activate DeleteProjectCommandParser

create DeleteProjectCommand
Expand All @@ -37,18 +37,24 @@ activate DeleteProjectCommand
DeleteProjectCommand --> DeleteProjectCommandParser :
deactivate DeleteProjectCommand

DeleteProjectCommandParser --> AddressBookParser : d
DeleteProjectCommandParser --> PlannerParser : d
deactivate DeleteProjectCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
DeleteProjectCommandParser -[hidden]-> AddressBookParser
DeleteProjectCommandParser -[hidden]-> PlannerParser
destroy DeleteProjectCommandParser

AddressBookParser --> LogicManager : d
deactivate AddressBookParser
PlannerParser --> LogicManager : d
deactivate PlannerParser

LogicManager -> DeleteProjectCommand : execute(m)
activate DeleteProjectCommand

DeleteProjectCommand -> Model : findProject(Duke)
activate Model

Model --> DeleteProjectCommand
deactivate Model

DeleteProjectCommand -> Model : deleteProject(Duke)
activate Model

Expand Down
32 changes: 16 additions & 16 deletions docs/diagrams/DeleteTaskSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":PlannerParser" as PlannerParser 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

[-> LogicManager : execute("delete task ui /in project Duke")
[-> LogicManager : execute("delete task ui /in Duke")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("delete task ui /in project Duke")
activate AddressBookParser
LogicManager -> PlannerParser : parseCommand("delete task ui /in Duke")
activate PlannerParser

create DeleteTaskCommandParser
AddressBookParser -> DeleteTaskCommandParser
PlannerParser -> DeleteTaskCommandParser
activate DeleteTaskCommandParser

DeleteTaskCommandParser --> AddressBookParser
DeleteTaskCommandParser --> PlannerParser
deactivate DeleteTaskCommandParser

AddressBookParser -> DeleteTaskCommandParser : parse("ui /in Duke")
PlannerParser -> DeleteTaskCommandParser : parse("ui /in Duke")
activate DeleteTaskCommandParser

create DeleteTaskCommand
Expand All @@ -38,14 +38,14 @@ activate DeleteTaskCommand
DeleteTaskCommand --> DeleteTaskCommandParser :
deactivate DeleteTaskCommand

DeleteTaskCommandParser --> AddressBookParser : d
DeleteTaskCommandParser --> PlannerParser : d
deactivate DeleteTaskCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
DeleteTaskCommandParser -[hidden]-> AddressBookParser
DeleteTaskCommandParser -[hidden]-> PlannerParser
destroy DeleteTaskCommandParser

AddressBookParser --> LogicManager : d
deactivate AddressBookParser
PlannerParser --> LogicManager : d
deactivate PlannerParser

LogicManager -> DeleteTaskCommand : execute(m)
activate DeleteTaskCommand
Expand All @@ -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
Loading

0 comments on commit 591e1ba

Please sign in to comment.