Skip to content

Commit

Permalink
Add sequence diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
nabonitasen committed Nov 11, 2023
1 parent 761d475 commit a187d90
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 26 deletions.
4 changes: 2 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ Step 7. The user then decides to view all bookmarked applicants by executing the

The following sequence diagram shows how the bookmark operation works:

![HideSequenceDiagram](images/HideSequenceDiagram.png)
![BookmarkSequenceDiagram](images/BookmarkSequenceDiagram.png)

The following activity diagram summarizes what happens when a user executes a `bookmark` command:

Expand Down Expand Up @@ -313,7 +313,7 @@ Step 6. A success message is displayed to the user to confirm that specified app

The following sequence diagram shows how the `view` operation works:

![HideSequenceDiagram](images/HideSequenceDiagram.png)
![ViewSequenceDiagram](images/ViewSequenceDiagram.png)

The following activity diagram summarizes what happens when a user executes a `view` command:

Expand Down
72 changes: 52 additions & 20 deletions docs/diagrams/BookmarkSequenceDIagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,69 @@ skinparam ArrowFontStyle plain

actor User

box Ui MODEL_COLOR_T1
participant ":UI" as UI RED_COLOR
box Ui UI_COLOR_T1
participant ":UI" as UI UI_COLOR

box Logic LOGIC_COLOR_T1
participant ":CompareCommand" as CompareCommand BLUE_COLOR
participant ":CompareCommandParser" as CompareCommandParser GREEN_COLOR
participant ":ParserUtil" as ParserUtil GREEN_COLOR
participant ":LogicManager" as LogicManager BLUE_COLOR
participant ":AddressBookParser" as AddressBookParser BLUE_COLOR
participant ":BookmarkCommandParser" as BookmarkCommandParser BLUE_COLOR
participant ":ParserUtil" as ParserUtil BLUE_COLOR
participant "b:BookmarkCommand" as BookmarkCommand BLUE_COLOR

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR

User -> UI: "compare 1 2"
User -> UI: "Bookmark 1 2"
activate UI

UI -> CompareCommand: Execute command
activate CompareCommand
UI -> LogicManager : execute(bookmark)
activate LogicManager

CompareCommand -> CompareCommandParser: Parse command
activate CompareCommandParser
LogicManager -> AddressBookParser : parseCommand(bookmark)
activate AddressBookParser

CompareCommandParser -> ParserUtil: Parse index
activate ParserUtil
ParserUtil -> ParserUtil: Validate indices
create BookmarkCommandParser
AddressBookParser -> BookmarkCommandParser : parseCommand(bookmark)
activate BookmarkCommandParser

BookmarkCommandParser -> ParserUtil: Input
activate ParserUtil
deactivate ParserUtil

ParserUtil --> CompareCommandParser: Valid indices
ParserUtil --> BookmarkCommandParser: Valid index
deactivate ParserUtil
CompareCommandParser --> CompareCommand: Valid indices
deactivate CompareCommandParser
CompareCommand --> UI: Valid applicants
deactivate CompareCommand
UI --> User: CompareWindow

create BookmarkCommand
BookmarkCommandParser -> BookmarkCommand: Valid index
activate BookmarkCommand

BookmarkCommand --> BookmarkCommandParser: b
deactivate BookmarkCommand

BookmarkCommandParser --> AddressBookParser: b
deactivate BookmarkCommandParser

AddressBookParser --> LogicManager: b
destroy BookmarkCommandParser
deactivate AddressBookParser

LogicManager -> BookmarkCommand: execute()
activate BookmarkCommand

BookmarkCommand -> Model: setPerson()
activate Model

Model --> BookmarkCommand
deactivate Model

BookmarkCommand --> LogicManager: result
deactivate BookmarkCommand

LogicManager --> UI: Success Message
destroy BookmarkCommand
deactivate LogicManager

UI --> User: Success Message
deactivate

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


actor User

box Ui UI_COLOR_T1
participant ":UI" as UI UI_COLOR

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager BLUE_COLOR
participant ":AddressBookParser" as AddressBookParser BLUE_COLOR
participant ":ViewCommandParser" as ViewCommandParser BLUE_COLOR
participant ":ParserUtil" as ParserUtil BLUE_COLOR
participant "b:ViewCommand" as ViewCommand BLUE_COLOR

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR

User -> UI: "view 1 2"
activate UI

UI -> LogicManager : execute(view)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(view)
activate AddressBookParser

create ViewCommandParser
AddressBookParser -> ViewCommandParser : parseCommand(view)
activate ViewCommandParser

ViewCommandParser -> ParserUtil: Input
activate ParserUtil

ParserUtil --> ViewCommandParser: Valid index
deactivate ParserUtil

create ViewCommand
ViewCommandParser -> ViewCommand: Valid index
activate ViewCommand

ViewCommand --> ViewCommandParser: b
deactivate ViewCommand

ViewCommandParser --> AddressBookParser: b
deactivate ViewCommandParser

AddressBookParser --> LogicManager: b
destroy ViewCommandParser
deactivate AddressBookParser

LogicManager -> ViewCommand: execute()
activate ViewCommand

ViewCommand -> Model: showPersonAtIndex()
activate Model

Model --> ViewCommand
deactivate Model

ViewCommand --> LogicManager: result
deactivate ViewCommand

LogicManager --> UI: Updated detail view
destroy ViewCommand
deactivate LogicManager

UI --> User: Success Message
deactivate

@enduml
Binary file added docs/images/BookmarkSequenceDIagram.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/ViewSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions docs/team/nabonitasen.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ TAfinder is a desktop address book application used by SOC professors to choose
Given below are my contributions to the project.

* **New Feature**: Added the ability to bookmark/unbookmark users.
* What it does: allows the user to bookmark/unbookmark specific applicants of their choice, and list all bookmarked applicants.
* What it does: allows the user to bookmark/unbookmark specific applicants of their choice, and list all bookmarked applicants. (List function later enhanced by Amy)
* Justification: This feature improves the product significantly because a user may want to take special note of certain applicants or may require a way to sigal which applicants have already been chosen to be a TA.
* Credits: List function later refactored by Amy.
* Highlights: This feature's development involved creating new data structures for bookmarking, extending the user interface, and ensuring seamless integration with existing application features.


* **New Feature**: Added an initial view command to display a singular applicant.
* What it does: allows the user to view a singular applicant.
Expand All @@ -21,7 +22,7 @@ Given below are my contributions to the project.
* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=nabonitasen&breakdown=true)

* **Enhancements to existing features**:
* Updated the GUI design and colour scheme.
* Updated the GUI design and entire colour scheme.
* Initial refactoring of address field to GPA field.

* **Documentation**:
Expand All @@ -34,6 +35,6 @@ Given below are my contributions to the project.
* Updated the About Us page with the information of the team.

* **Community**:
* Reviewed PRs.
* Reviewed PRs for team members.
* Reported bugs and suggestions for other teams in the class during PE-D.

0 comments on commit a187d90

Please sign in to comment.