Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update UG and DG with Delete and Stats features, Fix some PED Documentation Bugs #139

Merged
merged 13 commits into from
Nov 8, 2023
Merged
269 changes: 181 additions & 88 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

254 changes: 154 additions & 100 deletions docs/UserGuide.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/diagrams/BetterModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ Person *--> Name
Person *--> Phone
Person *--> Email
Person *--> Address
Person *--> Housing
Person *--> Availability
Person *--> AnimalType
@enduml
71 changes: 71 additions & 0 deletions docs/diagrams/DeleteMultipleSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

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 ":CommandResult" as CommandResult LOGIC_COLOR
end box

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

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

LogicManager -> AddressBookParser : parseCommand("delete 1 2 3")
activate AddressBookParser

create DeleteCommandParser
AddressBookParser -> DeleteCommandParser
activate DeleteCommandParser

DeleteCommandParser --> AddressBookParser
deactivate DeleteCommandParser

AddressBookParser -> DeleteCommandParser : parse("1 2 3")
activate DeleteCommandParser

create DeleteCommand
DeleteCommandParser -> DeleteCommand
activate DeleteCommand

DeleteCommand --> DeleteCommandParser : d
deactivate DeleteCommand

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

AddressBookParser --> LogicManager : d
deactivate AddressBookParser

LogicManager -> DeleteCommand : execute()
activate DeleteCommand

loop until all selected persons are deleted
DeleteCommand -> Model : deletePerson(person)
activate Model
Model --> DeleteCommand
deactivate Model
end

create CommandResult
DeleteCommand -> CommandResult
activate CommandResult

CommandResult --> DeleteCommand
deactivate CommandResult

DeleteCommand --> LogicManager : result
deactivate DeleteCommand

[<--LogicManager
deactivate LogicManager
@enduml
21 changes: 15 additions & 6 deletions docs/diagrams/ModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Class Email
Class Name
Class Phone
Class Tag
Class Availability
Class Housing
Class AnimalType

Class I #FFFFFF
}
Expand All @@ -36,12 +39,15 @@ ModelManager -right-> "1" UserPrefs
UserPrefs .up.|> ReadOnlyUserPrefs

AddressBook *--> "1" UniquePersonList
UniquePersonList --> "~* all" Person
Person *--> Name
Person *--> Phone
Person *--> Email
Person *--> Address
Person *--> "1..2"Name
Person *--> "1"Phone
Person *--> "1"Email
Person *--> "1"Address
Person *--> "*" Tag
Person *--> "1 " Availability
Person *--> "1" Housing
Person *--> "1" AnimalType
AnimalType --> "1" Availability

Person -[hidden]up--> I
UniquePersonList -[hidden]right-> I
Expand All @@ -50,5 +56,8 @@ Name -[hidden]right-> Phone
Phone -[hidden]right-> Address
Address -[hidden]right-> Email

ModelManager --> "~* filtered" Person
ModelManager --> "~* Filtered"Person
UniquePersonList -left-> "~*all " Person


@enduml
41 changes: 41 additions & 0 deletions docs/diagrams/StatsAvailSelfInvDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@startuml
!include style.puml

skinparam ArrowFontStyle plain

mainframe **sd** get availability statistics

participant "a:StatsAvailCommand" as StatsAvailCommand LOGIC_COLOR

StatsAvailCommand -> StatsAvailCommand : getAvailableFosterers(list)
activate StatsAvailCommand
StatsAvailCommand --> StatsAvailCommand : availableFosterers
deactivate StatsAvailCommand

StatsAvailCommand -> StatsAvailCommand : getAbleDogCount(availableFosterers)
activate StatsAvailCommand
StatsAvailCommand --> StatsAvailCommand : ableDogCount
deactivate StatsAvailCommand

StatsAvailCommand -> StatsAvailCommand : getAbleCatCount(availableFosterers)
activate StatsAvailCommand
StatsAvailCommand --> StatsAvailCommand : ableCatCount
deactivate StatsAvailCommand

StatsAvailCommand -> StatsAvailCommand : calculatePercentage(availableCount, total)
activate StatsAvailCommand
StatsAvailCommand --> StatsAvailCommand
deactivate StatsAvailCommand

StatsAvailCommand -> StatsAvailCommand : calculatePercentage(ableDogCount, availableCount)
activate StatsAvailCommand
StatsAvailCommand --> StatsAvailCommand
deactivate StatsAvailCommand

StatsAvailCommand -> StatsAvailCommand : calculatePercentage(ableCatCount, availableCount)
activate StatsAvailCommand
StatsAvailCommand --> StatsAvailCommand
deactivate StatsAvailCommand
|||

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

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":StatsCommandParser" as StatsCommandParser LOGIC_COLOR
participant "a:StatsAvailCommand" as StatsAvailCommand 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("stats avail")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("stats avail")
activate AddressBookParser

create StatsCommandParser
AddressBookParser -> StatsCommandParser
activate StatsCommandParser

StatsCommandParser --> AddressBookParser
deactivate StatsCommandParser

AddressBookParser -> StatsCommandParser : parse("avail")
activate StatsCommandParser

create StatsAvailCommand
StatsCommandParser -> StatsAvailCommand
activate StatsAvailCommand

StatsAvailCommand --> StatsCommandParser : a
deactivate StatsAvailCommand

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

AddressBookParser --> LogicManager : a
deactivate AddressBookParser

LogicManager -> StatsAvailCommand : execute()
activate StatsAvailCommand

StatsAvailCommand -> Model : getFilteredPersonList()
activate Model

Model --> StatsAvailCommand : list
deactivate Model

ref over StatsAvailCommand
get availability statistics
end ref

create CommandResult
StatsAvailCommand -> CommandResult
activate CommandResult

CommandResult --> StatsAvailCommand
deactivate CommandResult

StatsAvailCommand --> LogicManager : result
deactivate StatsAvailCommand

[<--LogicManager
deactivate LogicManager
@enduml
15 changes: 15 additions & 0 deletions docs/diagrams/StatsClassDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@startuml
!include style.puml
skinparam arrowThickness 1.1
skinparam arrowColor LOGIC_COLOR
skinparam classBackgroundColor LOGIC_COLOR

Class StatsCommand
Class "{abstract}\nCommand" as Command

StatsCommand -up-|> Command
StatsAvailCommand -up-|> StatsCommand
StatsCurrentCommand -up-|> StatsCommand
StatsHousingCommand -up-|> StatsCommand

@enduml
Binary file modified docs/images/BetterModelClassDiagram.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 added docs/images/DeleteMultipleSequenceDiagram.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/ModelClassDiagram.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 added docs/images/StatsAvailSelfInvDiagram.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 added docs/images/StatsAvailSequenceDiagram.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 added docs/images/StatsClassDiagram.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/screenshots/HelpWindow.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 added docs/images/screenshots/StatsAllAvail.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 added docs/images/screenshots/StatsTotalPercent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import seedu.address.commons.util.ToStringBuilder;

/**
* Represents zero or more sorted, unique Index objects.
* Represents one or more sorted, unique Index objects.
* <p>
* All Index objects in Indices have to be either zero-based or one-based. Similar to {@code Index},
* it should be used right from the start when parsing new user input that allows for more than
Expand Down
Loading