Skip to content

Commit

Permalink
Merge pull request #122 from Thing1Thing2/DG-updates
Browse files Browse the repository at this point in the history
DG:update diagrams and description
  • Loading branch information
sikai00 authored Oct 14, 2022
2 parents 58a8466 + 3bd40b4 commit f79fd4e
Show file tree
Hide file tree
Showing 36 changed files with 195 additions and 182 deletions.
100 changes: 50 additions & 50 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/diagrams/ArchitectureSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,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 : "delClient 1"
activate ui UI_COLOR

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

logic -[LOGIC_COLOR]> model : deletePerson(p)
logic -[LOGIC_COLOR]> model : deleteClient(c)
activate model MODEL_COLOR

model -[MODEL_COLOR]-> logic
deactivate model

logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
logic -[LOGIC_COLOR]> storage : saveMyInsuRec(myInsuRec)
activate storage STORAGE_COLOR

storage -[STORAGE_COLOR]> storage : Save to file
Expand Down
20 changes: 10 additions & 10 deletions docs/diagrams/BetterModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ 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
MyInsuRec *-right-> "1" UniqueClientList
MyInsuRec *-right-> "1" UniqueTagList
UniqueTagList -[hidden]down- UniqueClientList
UniqueTagList -[hidden]down- UniqueClientList

UniqueTagList *-right-> "*" Tag
UniquePersonList -right-> Person
UniqueClientList -right-> Client

Person -up-> "*" Tag
Client -up-> "*" Tag

Person *--> Name
Person *--> Phone
Person *--> Email
Person *--> Address
Client *--> Name
Client *--> Phone
Client *--> Email
Client *--> Address
@enduml
6 changes: 3 additions & 3 deletions docs/diagrams/CommitActivityDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ start
'Since the beta syntax does not support placing the condition outside the
'diamond we place it as the true branch instead.

if () then ([command commits AddressBook])
if () then ([command commits MyInsuRec])
:Purge redundant states;
:Save AddressBook to
addressBookStateList;
:Save MyInsuRec to
myInsuRecStateList;
else ([else])
endif
stop
Expand Down
64 changes: 32 additions & 32 deletions docs/diagrams/DeleteSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,66 @@

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR
participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR
participant ":MyInsuRecParser" as MyInsuRecParser LOGIC_COLOR
participant ":DeleteClientCommandParser" as DeleteClientCommandParser LOGIC_COLOR
participant "d:DeleteClientCommand" as DeleteClientCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

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

[-> LogicManager : execute("delete 1")
[-> LogicManager : execute("delClient 1")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("delete 1")
activate AddressBookParser
LogicManager -> MyInsuRecParser : parseCommand("delClient 1")
activate MyInsuRecParser

create DeleteCommandParser
AddressBookParser -> DeleteCommandParser
activate DeleteCommandParser
create DeleteClientCommandParser
MyInsuRecParser -> DeleteClientCommandParser
activate DeleteClientCommandParser

DeleteCommandParser --> AddressBookParser
deactivate DeleteCommandParser
DeleteClientCommandParser --> MyInsuRecParser
deactivate DeleteClientCommandParser

AddressBookParser -> DeleteCommandParser : parse("1")
activate DeleteCommandParser
MyInsuRecParser -> DeleteClientCommandParser : parse("1")
activate DeleteClientCommandParser

create DeleteCommand
DeleteCommandParser -> DeleteCommand
activate DeleteCommand
create DeleteClientCommand
DeleteClientCommandParser -> DeleteClientCommand
activate DeleteClientCommand

DeleteCommand --> DeleteCommandParser : d
deactivate DeleteCommand
DeleteClientCommand --> DeleteClientCommandParser : d
deactivate DeleteClientCommand

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

AddressBookParser --> LogicManager : d
deactivate AddressBookParser
MyInsuRecParser --> LogicManager : d
deactivate MyInsuRecParser

LogicManager -> DeleteCommand : execute()
activate DeleteCommand
LogicManager -> DeleteClientCommand : execute()
activate DeleteClientCommand

DeleteCommand -> Model : deletePerson(1)
DeleteClientCommand -> Model : deleteClient(1)
activate Model

Model --> DeleteCommand
Model --> DeleteClientCommand
deactivate Model

create CommandResult
DeleteCommand -> CommandResult
DeleteClientCommand -> CommandResult
activate CommandResult

CommandResult --> DeleteCommand
CommandResult --> DeleteClientCommand
deactivate CommandResult

DeleteCommand --> LogicManager : result
deactivate DeleteCommand
DeleteClientCommand --> LogicManager : result
deactivate DeleteClientCommand

[<--LogicManager
deactivate LogicManager
Expand Down
6 changes: 3 additions & 3 deletions docs/diagrams/LogicClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ skinparam classBackgroundColor LOGIC_COLOR

package Logic {

Class AddressBookParser
Class MyInsuRecParser
Class XYZCommand
Class CommandResult
Class "{abstract}\nCommand" as Command
Expand All @@ -27,8 +27,8 @@ Class HiddenOutside #FFFFFF
HiddenOutside ..> Logic

LogicManager .right.|> Logic
LogicManager -right->"1" AddressBookParser
AddressBookParser ..> XYZCommand : creates >
LogicManager -right->"1" MyInsuRecParser
MyInsuRecParser ..> XYZCommand : creates >

XYZCommand -up-|> Command
LogicManager .left.> Command : executes >
Expand Down
43 changes: 28 additions & 15 deletions docs/diagrams/ModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,59 @@ skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR

Package Model <<Rectangle>>{
Class "<<interface>>\nReadOnlyAddressBook" as ReadOnlyAddressBook
Class "<<interface>>\nReadOnlyMyInsuRec" as ReadOnlyMyInsuRec
Class "<<interface>>\nReadOnlyUserPrefs" as ReadOnlyUserPrefs
Class "<<interface>>\nModel" as Model
Class AddressBook
Class MyInsuRec
Class ModelManager
Class UserPrefs

Class UniquePersonList
Class Person
Class UniqueClientList
Class Client
Class Address
Class Email
Class Name
Class Phone
Class Tag

Class UniqueMeetingList
Class Meeting
Class Description
Class MeetingDate
Class MeetingTime
}

Class HiddenOutside #FFFFFF
HiddenOutside ..> Model

AddressBook .up.|> ReadOnlyAddressBook
MyInsuRec .up.|> ReadOnlyMyInsuRec

ModelManager .up.|> Model
Model .right.> ReadOnlyUserPrefs
Model .left.> ReadOnlyAddressBook
ModelManager -left-> "1" AddressBook
Model .left.> ReadOnlyMyInsuRec
ModelManager -left-> "1" MyInsuRec
ModelManager -right-> "1" UserPrefs
UserPrefs .up.|> ReadOnlyUserPrefs

AddressBook *--> "1" UniquePersonList
UniquePersonList --> "~* all" Person
Person *--> Name
Person *--> Phone
Person *--> Email
Person *--> Address
Person *--> "*" Tag
ModelManager -->"~* filtered" Client

MyInsuRec *-> "1" UniqueClientList
UniqueClientList -> "~* all" Client
Client *--> Name
Client *--> Phone
Client *--> Email
Client *--> Address
Client *--> "*" Tag

MyInsuRec *--> "1" UniqueMeetingList
UniqueMeetingList --> "~* all" Meeting
Meeting *--> Description
Meeting *--> MeetingDate
Meeting *--> MeetingTime
Meeting <-> Client

Name -[hidden]right-> Phone
Phone -[hidden]right-> Address
Address -[hidden]right-> Email

ModelManager -->"~* filtered" Person
@enduml
8 changes: 4 additions & 4 deletions docs/diagrams/ParserClasses.puml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Class XYZCommand

package "Parser classes"{
Class "<<interface>>\nParser" as Parser
Class AddressBookParser
Class MyInsuRecParser
Class XYZCommandParser
Class CliSyntax
Class ParserUtil
Expand All @@ -19,12 +19,12 @@ Class Prefix
}

Class HiddenOutside #FFFFFF
HiddenOutside ..> AddressBookParser
HiddenOutside ..> MyInsuRecParser

AddressBookParser .down.> XYZCommandParser: creates >
MyInsuRecParser .down.> XYZCommandParser: creates >

XYZCommandParser ..> XYZCommand : creates >
AddressBookParser ..> Command : returns >
MyInsuRecParser ..> Command : returns >
XYZCommandParser .up.|> Parser
XYZCommandParser ..> ArgumentMultimap
XYZCommandParser ..> ArgumentTokenizer
Expand Down
22 changes: 11 additions & 11 deletions docs/diagrams/StorageClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Class JsonUserPrefsStorage
Class "<<interface>>\nStorage" as Storage
Class StorageManager

package "AddressBook Storage" #F4F6F6{
Class "<<interface>>\nAddressBookStorage" as AddressBookStorage
Class JsonAddressBookStorage
Class JsonSerializableAddressBook
Class JsonAdaptedPerson
package "MyInsuRec Storage" #F4F6F6{
Class "<<interface>>\nMyInsuRecStorage" as MyInsuRecStorage
Class JsonMyInsuRecStorage
Class JsonSerializableMyInsuRec
Class JsonAdaptedClient
Class JsonAdaptedTag
}

Expand All @@ -29,15 +29,15 @@ HiddenOutside ..> Storage

StorageManager .up.|> Storage
StorageManager -up-> "1" UserPrefsStorage
StorageManager -up-> "1" AddressBookStorage
StorageManager -up-> "1" MyInsuRecStorage

Storage -left-|> UserPrefsStorage
Storage -right-|> AddressBookStorage
Storage -right-|> MyInsuRecStorage

JsonUserPrefsStorage .up.|> UserPrefsStorage
JsonAddressBookStorage .up.|> AddressBookStorage
JsonAddressBookStorage ..> JsonSerializableAddressBook
JsonSerializableAddressBook --> "*" JsonAdaptedPerson
JsonAdaptedPerson --> "*" JsonAdaptedTag
JsonMyInsuRecStorage .up.|> MyInsuRecStorage
JsonMyInsuRecStorage ..> JsonSerializableMyInsuRec
JsonSerializableMyInsuRec --> "*" JsonAdaptedClient
JsonAdaptedClient --> "*" JsonAdaptedTag

@enduml
16 changes: 8 additions & 8 deletions docs/diagrams/UiClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Class UiManager
Class MainWindow
Class HelpWindow
Class ResultDisplay
Class PersonListPanel
Class PersonCard
Class ClientListPanel
Class ClientCard
Class StatusBarFooter
Class CommandBox
}
Expand All @@ -32,26 +32,26 @@ UiManager .left.|> Ui
UiManager -down-> "1" MainWindow
MainWindow *-down-> "1" CommandBox
MainWindow *-down-> "1" ResultDisplay
MainWindow *-down-> "1" PersonListPanel
MainWindow *-down-> "1" ClientListPanel
MainWindow *-down-> "1" StatusBarFooter
MainWindow --> "0..1" HelpWindow

PersonListPanel -down-> "*" PersonCard
ClientListPanel -down-> "*" ClientCard

MainWindow -left-|> UiPart

ResultDisplay --|> UiPart
CommandBox --|> UiPart
PersonListPanel --|> UiPart
PersonCard --|> UiPart
ClientListPanel --|> UiPart
ClientCard --|> UiPart
StatusBarFooter --|> UiPart
HelpWindow --|> UiPart

PersonCard ..> Model
ClientCard ..> Model
UiManager -right-> Logic
MainWindow -left-> Logic

PersonListPanel -[hidden]left- HelpWindow
ClientListPanel -[hidden]left- HelpWindow
HelpWindow -[hidden]left- CommandBox
CommandBox -[hidden]left- ResultDisplay
ResultDisplay -[hidden]left- StatusBarFooter
Expand Down
8 changes: 4 additions & 4 deletions docs/diagrams/UndoRedoState0.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ skinparam ClassBorderColor #000000
title Initial state

package States {
class State1 as "__ab0:AddressBook__"
class State2 as "__ab1:AddressBook__"
class State3 as "__ab2:AddressBook__"
class State1 as "__mir0:MyInsuRec__"
class State2 as "__mir1:MyInsuRec__"
class State3 as "__mir2:MyInsuRec__"
}
State1 -[hidden]right-> State2
State2 -[hidden]right-> State3
hide State2
hide State3

class Pointer as "Current State" #FFFFF
class Pointer as "Current State" #FFFFFF
Pointer -up-> State1
@end
Loading

0 comments on commit f79fd4e

Please sign in to comment.