Skip to content

Commit

Permalink
fix X marks for diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
Bandov committed Apr 14, 2024
1 parent a11ff7e commit 290d5e1
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 6 deletions.
12 changes: 7 additions & 5 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The *Sequence Diagram* below shows how the components interact with each other f
Each of the four main components (also shown in the diagram above),

* defines its *API* in an `interface` with the same name as the Component.
* implements its functionality using a concrete `{Component Name}Manager` class (which follows the corresponding API `interface` mentioned in the previous point.
* implements its functionality using a concrete `{Component Name}Manager` class which follows the corresponding API `interface` mentioned in the previous point.

For example, the `Logic` component defines its API in the `Logic.java` interface and implements its functionality using the `LogicManager.java` class which follows the `Logic` interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.

Expand Down Expand Up @@ -197,7 +197,7 @@ The `Person` component,
* The `Person` component,
* stores the Unique User ID or UUID of the person
* stores any number of `Attribute` objects in the `Person` object in the hash map
* does not require to have any `Attribute` objects
* is not required to have any `Attribute` objects
* The `Unique User ID` component,
* acts as the unique identifier for a person
* the UUID is generated by the system and is unique for each person
Expand All @@ -208,19 +208,21 @@ The `Person` component,

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

**Attribute** is an abstract class that represents a detail about a `Person`. All other attribute classes extend from this class.

* The `Attribute` component,
* is used to store details about a `Person`
* each attribute has a `name` and a `value`
* stored `Attribute` objects in the `Person` object in the hash map
* stores `Attribute` objects in the `Person` object in the hash map
* Has general types of attributes (`StringAttribute`, `IntegerAttribute`, `DateAttribute`)
* `StringAttribute` - stores a string value
* `IntegerAttribute` - stores an integer value
* `DateAttribute` - stores a date value
* Users are able to create their own attributes using the `StringAttribute` class
* They will have their own `String` name and `String` value
* Has specific types of attributes (e.g. `NameAttribute`, `PhoneNumberAttribute`) with unique constraints relevant to their validity
* `NameAttribute` - stores the name of the person
* `PhoneNumberAttribute` - stores the phone number of the person and must be an integer of less than 10 digits
* `NameAttribute` extends the `StringAttribute`- stores the name of the person
* `PhoneNumberAttribute` extends the `IntegerAttribute` - stores the phone number of the person and must be an integer of less than 10 digits
* `GenderAttribute` - stores the gender of the person and must be either `Male` or `Female`
* does not depend on the other components (as the `Attribute` are standalone stores of details about the `Person`)
#### Model component - Relationship
Expand Down
2 changes: 2 additions & 0 deletions docs/diagrams/AddPersonSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ activate person PERSON_COLOR

person --[PERSON_COLOR]> logic : return new Person
deactivate person
person --[Hidden]> person : model
destroy person

logic -[LOGIC_COLOR]> model : addPerson(personToAdd)
Expand All @@ -47,6 +48,7 @@ deactivate storage STORAGE_COLOR_T1

storage --[STORAGE_COLOR]> logic : save complete
deactivate storage
storage --[Hidden]> storage : model
destroy storage

logic --[LOGIC_COLOR]> ui : CommandResult("New person added. Details: Name: Bob")
Expand Down
2 changes: 2 additions & 0 deletions docs/diagrams/AttributeAdditionSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ activate attribute ATTRIBUTE_COLOR

attribute --[ATTRIBUTE_COLOR]> logic : return attribute
deactivate attribute
attribute --[HIDDEN]> attribute : model
destroy attribute

logic -[LOGIC_COLOR]> model : person.addAttribute(attribute)
Expand All @@ -44,6 +45,7 @@ deactivate storage STORAGE_COLOR_T1

storage --[STORAGE_COLOR]> logic : save complete
deactivate storage
storage --[HIDDEN]> storage : model
destroy storage

logic --[LOGIC_COLOR]> ui : CommandResult("Attribute added successfully.")
Expand Down
2 changes: 2 additions & 0 deletions docs/diagrams/AttributeEditSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ activate attribute ATTRIBUTE_COLOR

attribute --[ATTRIBUTE_COLOR]> logic : return edited attribute
deactivate attribute
attribute --[HIDDEN]> attribute : model
destroy attribute

logic -[LOGIC_COLOR]> model : person.updateAttribute(editedAttribute)
Expand All @@ -50,6 +51,7 @@ deactivate storage STORAGE_COLOR_T1

storage --[STORAGE_COLOR]> logic : save complete
deactivate storage
storage --[HIDDEN]> storage : model
destroy storage

logic --[LOGIC_COLOR]> ui : CommandResult("Attribute edited successfully.")
Expand Down
3 changes: 3 additions & 0 deletions docs/diagrams/ClearSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ clearCommand -> model : resetRelationshipDescriptors()
activate model
model --> clearCommand : relationships reset
deactivate model
model --[HIDDEN]> clearCommand
destroy model

clearCommand --> logic : CommandResult("Address book has been cleared!")
deactivate clearCommand
clearCommand --[hidden]> logic
destroy clearCommand

logic --> ui : display "Address book has been cleared!"
deactivate logic
logic --[hidden]> ui
destroy logic

ui --> user : show "Address book has been cleared!"
Expand Down
4 changes: 4 additions & 0 deletions docs/diagrams/ClearTerminalSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ controller -> dialogContainer : getChildren().clear()
activate dialogContainer
dialogContainer --> controller
deactivate dialogContainer
dialogContainer --[hidden]> controller :
destroy dialogContainer

controller -> imageContainer : setVisible(false)
Expand All @@ -32,12 +33,14 @@ controller -> imageContainer : setManaged(false)
activate imageContainer
imageContainer --> controller
deactivate imageContainer
imageContainer --[hidden]> controller :
destroy imageContainer

controller -> scrollPane : getHeight()
activate scrollPane
scrollPane --> controller : return height
deactivate scrollPane
scrollPane --[hidden]> controller :
destroy scrollPane

alt if height <= 150
Expand All @@ -50,6 +53,7 @@ controller -> cliInput : setText("")
activate cliInput
cliInput --> controller : input cleared
deactivate cliInput
cliInput --[hidden]> controller :
destroy cliInput

controller --> user : clear complete
Expand Down
2 changes: 2 additions & 0 deletions docs/diagrams/DeleteAttributeSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ loop for each attribute
person --[PERSON_COLOR]> logic : attribute deleted
deactivate person
end
destroy person

logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
activate storage STORAGE_COLOR
Expand All @@ -44,6 +45,7 @@ deactivate storage STORAGE_COLOR_T1

storage --[STORAGE_COLOR]> logic : save complete
deactivate storage
storage --[HIDDEN]> storage :
destroy storage

logic --[LOGIC_COLOR]> ui : CommandResult("Attributes deleted successfully.")
Expand Down
6 changes: 6 additions & 0 deletions docs/diagrams/DeletePersonSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ model --[MODEL_COLOR]> logic : return matching Person
deactivate model

logic -[LOGIC_COLOR]> model : deletePerson(personToDelete)
activate model MODEL_COLOR
model --[MODEL_COLOR]> logic :
deactivate model
logic -[LOGIC_COLOR]> model : deleteRelationshipsOfPerson(targetUuid)
activate model MODEL_COLOR
model --[MODEL_COLOR]> logic :
deactivate model

logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
activate storage STORAGE_COLOR
Expand Down
3 changes: 2 additions & 1 deletion docs/diagrams/FindSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ activate parser ABPARSER_COLOR
parser -[ABPARSER_COLOR]> findCommand : new FindCommand(keywords)
activate findCommand FINDCOMMAND_COLOR
deactivate parser
destroy parser

findCommand -[FINDCOMMAND_COLOR]> predicate : new NameContainsKeywordsPredicate(keywords)
activate predicate PREDICATE_COLOR

predicate -[PREDICATE_COLOR]> findCommand : predicate
deactivate predicate
predicate --[HIDDEN]> findCommand :
destroy predicate

findCommand -[FINDCOMMAND_COLOR]> model : updateFilteredPersonList(predicate)
Expand All @@ -48,6 +48,7 @@ deactivate model

findCommand -[FINDCOMMAND_COLOR]> logic : CommandResult("X persons found")
deactivate findCommand
findCommand --[HIDDEN]> :
destroy findCommand

logic -[LOGIC_COLOR]> ui : display "X persons found"
Expand Down
Binary file removed docs/diagrams/PersonClassDiagram.png
Binary file not shown.
Binary file modified docs/images/AddPersonSequenceDiagram.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/AttributeAdditionSequenceDiagram.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/AttributeEditSequenceDiagram.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/ClearSequenceDiagram.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/ClearTerminalSequenceDiagram.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/DeleteAttributeSequenceDiagram.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/DeletePersonSequenceDiagram.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/FindSequenceDiagram.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 290d5e1

Please sign in to comment.