Skip to content

Commit

Permalink
Merge pull request #294 from mingyuanc/291-final-edit-dg
Browse files Browse the repository at this point in the history
Final edit for DG
  • Loading branch information
mingyuanc authored Nov 13, 2023
2 parents cb23e25 + 148c607 commit c4c5560
Show file tree
Hide file tree
Showing 18 changed files with 596 additions and 520 deletions.
818 changes: 444 additions & 374 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions docs/diagrams/AddFinalState.puml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
@startuml
title Final state

object Root
object "<u>:Root</u>" as Root

object group1 {
object "<u>:Group</u>" as group1 {
name = "group 1"
id = grp-001
}

object group2 {
object "<u>:Group</u>" as group2 {
name = "group 2"
id = grp-001
id = grp-002
}

object student1 {
object "<u>:Student</u>" as student1 {
name = "John"
id = 1234Y
email = "IloveDrawingDiagrams@gmail.com"
email = "ilovedrawingdiagrams@gmail.com"
phone = "09881765"
address = "NUS"
}

object student2 {
object "<u>:Student</u>" as student2 {
name = "Mary"
id = 9876A
email = "IloveCoding@gmail.com"
email = "ilovecoding@gmail.com"
phone = "12345678"
address = "Malaysia"
}

object student3 {
object "<u>:Student</u>" as student3 {
name = "Bob"
id = 2000Y
email = "bobby@example.com"
Expand Down
16 changes: 8 additions & 8 deletions docs/diagrams/AddInitialState.puml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
@startuml
title Initial state

object Root
object "<u>:Root</u>" as Root

object group1 {
object "<u>:Group</u>" as group1 {
name = "group 1"
id = grp-001
}

object group2 {
object "<u>:Group</u>" as group2 {
name = "group 2"
id = grp-001
id = grp-002
}

object student1 {
object "<u>:Student</u>" as student1 {
name = "John"
id = 1234Y
email = "IloveDrawingDiagrams@gmail.com"
email = "ilovedrawingdiagrams@gmail.com"
phone = "09881765"
address = "NUS"
}

object student2 {
object "<u>:Student</u>" as student2 {
name = "Mary"
id = 9876A
email = "IloveCoding@gmail.com"
email = "ilovecoding@gmail.com"
phone = "12345678"
address = "Malaysia"
}
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 : "rm 0001Y"
activate ui UI_COLOR

ui -[UI_COLOR]> logic : execute("delete 1")
ui -[UI_COLOR]> logic : execute("rm 0001Y")
activate logic LOGIC_COLOR

logic -[LOGIC_COLOR]> model : deletePerson(p)
logic -[LOGIC_COLOR]> model : remove student with id 0001Y
activate model MODEL_COLOR

model -[MODEL_COLOR]-> logic
deactivate model

logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
logic -[LOGIC_COLOR]> storage : saveProfBook(root)
activate storage STORAGE_COLOR

storage -[STORAGE_COLOR]> storage : Save to file
Expand Down
18 changes: 0 additions & 18 deletions docs/diagrams/CommitActivityDiagram.puml

This file was deleted.

26 changes: 13 additions & 13 deletions docs/diagrams/CreateDeadlineCommandSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,41 @@ end box

box Model MODEL_COLOR_T1
participant ":ModelManager" as ModelManagerStatic MODEL_COLOR
participant "opr:TaskOperation" as TaskOperation MODEL_COLOR
participant "opr:ChildOperation" as ChildOperation MODEL_COLOR
participant ":Student" as Student MODEL_COLOR
end box

[-> CreateDeadlineCommand : execute()
activate CreateDeadlineCommand

CreateDeadlineCommand -> ModelManagerStatic : taskOperation(path)
CreateDeadlineCommand -> ModelManagerStatic : groupChildOperation(path)
activate ModelManagerStatic

create TaskOperation
ModelManagerStatic -> TaskOperation
activate TaskOperation
create ChildOperation
ModelManagerStatic -> ChildOperation
activate ChildOperation

TaskOperation --> ModelManagerStatic : opr
deactivate TaskOperation
ChildOperation --> ModelManagerStatic : opr
deactivate ChildOperation

ModelManagerStatic --> CreateDeadlineCommand :opr
deactivate ModelManagerStatic

CreateDeadlineCommand -> TaskOperation : addAllTask(task)
activate TaskOperation
CreateDeadlineCommand -> ChildOperation : addAllTask(task)
activate ChildOperation

loop for each student in group
TaskOperation -> Student : addTask(task)
ChildOperation -> Student : addTask(task)
activate Student


Student --> TaskOperation
Student --> ChildOperation
deactivate Student
end

TaskOperation --> CreateDeadlineCommand
ChildOperation --> CreateDeadlineCommand

destroy TaskOperation
destroy ChildOperation

[<--CreateDeadlineCommand
destroy CreateDeadlineCommand
Expand Down
12 changes: 6 additions & 6 deletions docs/diagrams/DeadlineFinalState.puml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
@startuml
title Group 1's Initial state
title Group 1's Final state

object group1
object "<u>:Group</u>" as group1

object student1 {
object "<u>:Student</u>" as student1 {
name = "ben"
id = 1212A
}

object student2 {
object "<u>:Student</u>" as student2 {
name = "jerry"
id = 2727B
}

object deadline1 {
object "<u>:Deadline</u>" as deadline1 {
description = "Assignment 1"
deadline = 2023-12-12 2359
}

object deadline2 {
object "<u>:Deadline</u>" as deadline2 {
description = "Assignment 1"
deadline = 2023-12-12 2359
}
Expand Down
8 changes: 4 additions & 4 deletions docs/diagrams/DeadlineInitialState.puml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
@startuml
title Group 1's Initial state

object group1
object "<u>:Group</u>" as group1

object student1 {
object "<u>:Student</u>" as student1 {
name = "ben"
id = 1212A
}

object student2 {
object "<u>:Student</u>" as student2 {
name = "jerry"
id = 2727B
}

object deadline1 {
object "<u>:Deadline</u>" as deadline1 {
description = "Assignment 1"
deadline = 2023-12-12 2359
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":ProfBookParser" as ProfBookParser LOGIC_COLOR
participant ":DeleteTaskCommandParser" as DeleteTaskCommandParser LOGIC_COLOR
participant "d:DeleteTaskCommand" as DeleteTaskCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":ModelManager" as ModelManagerStatic MODEL_COLOR
participant "opr:TaskOperation" as TaskOperation MODEL_COLOR
end box

[-> LogicManager : execute("rmt 1")
activate LogicManager
Expand All @@ -40,52 +35,25 @@ deactivate DeleteTaskCommand

DeleteTaskCommandParser --> ProfBookParser : d
deactivate DeleteTaskCommandParser

'Hidden arrow to position the destroy marker below the end of the activation bar.
DeleteTaskCommandParser -[hidden]-> ProfBookParser
destroy DeleteTaskCommandParser

ProfBookParser --> LogicManager : d
deactivate ProfBookParser

LogicManager -> DeleteTaskCommand : execute(state)
LogicManager -> DeleteTaskCommand : execute("state")
activate DeleteTaskCommand

DeleteTaskCommand -> ModelManagerStatic : taskOperation(new Path("~/grp-001"))
activate ModelManagerStatic

create TaskOperation
ModelManagerStatic -> TaskOperation
activate TaskOperation

TaskOperation --> ModelManagerStatic : opr
deactivate TaskOperation

ModelManagerStatic --> DeleteTaskCommand :opr
deactivate ModelManagerStatic

DeleteTaskCommand -> TaskOperation : opr.deleteTask(1)
activate TaskOperation

TaskOperation --> DeleteTaskCommand

destroy TaskOperation

DeleteTaskCommand -> ModelManagerStatic : updateList()
activate ModelManagerStatic

ModelManagerStatic --> DeleteTaskCommand
deactivate ModelManagerStatic

create CommandResult
DeleteTaskCommand -> CommandResult
activate CommandResult

CommandResult --> DeleteTaskCommand : result
deactivate CommandResult
ref over DeleteTaskCommand
Execution of DeleteTaskCommand
end ref

DeleteTaskCommand --> LogicManager : result
deactivate DeleteTaskCommand

[<--LogicManager
deactivate LogicManager

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

box Logic LOGIC_COLOR_T1
participant "d:DeleteTaskCommand" as DeleteTaskCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":ModelManager" as ModelManagerStatic MODEL_COLOR
participant "opr:TaskOperation" as TaskOperation MODEL_COLOR
end box

mainframe **sd** Execution of DeleteTaskCommand

activate DeleteTaskCommand

DeleteTaskCommand -> ModelManagerStatic : taskOperation(displayPath)
activate ModelManagerStatic

create TaskOperation
ModelManagerStatic -> TaskOperation
activate TaskOperation

TaskOperation --> ModelManagerStatic : opr
deactivate TaskOperation

ModelManagerStatic --> DeleteTaskCommand :opr
deactivate ModelManagerStatic

DeleteTaskCommand -> TaskOperation : opr.deleteTask(1)
activate TaskOperation

TaskOperation --> DeleteTaskCommand

destroy TaskOperation

DeleteTaskCommand -> ModelManagerStatic : updateList()
activate ModelManagerStatic

ModelManagerStatic --> DeleteTaskCommand
deactivate ModelManagerStatic

create CommandResult
DeleteTaskCommand -> CommandResult
activate CommandResult

CommandResult --> DeleteTaskCommand : result
deactivate CommandResult
@enduml
2 changes: 1 addition & 1 deletion docs/diagrams/EditCommandSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ deactivate RootChildOperation
ModelManagerStatic --> EditCommand :opr
deactivate ModelManagerStatic

EditCommand -> RootChildOperation : editChild(groupId, editedField)
EditCommand -> RootChildOperation : editChild(groupId, editDescriptor)
activate RootChildOperation

RootChildOperation -> oldGroup : getName()
Expand Down
Loading

0 comments on commit c4c5560

Please sign in to comment.