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

Add Use Cases #19

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
362 changes: 354 additions & 8 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,28 +290,374 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise)

**Use case: Add a new person**

**MSS**

1. User requests to add a new person to JENGA.
2. JENGA prompts user for details of new person.
3. User enters the necessary information.
4. JENGA adds person with the provided details.
5. JENGA displays new person added and confirmation message.

Use case ends.

**Extensions**

* 3a. User enters incomplete or invalid information.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

**Use case: Delete a person**

**MSS**

1. User requests to list persons
2. AddressBook shows a list of persons
3. User requests to delete a specific person in the list
4. AddressBook deletes the person
1. User requests to list persons.
2. JENGA displays a list of persons.
3. User selects a specific person in the list to delete by providing the person’s UUID.
4. JENGA deletes the person.
5. JENGA displays confirmation message.

Use case ends.

**Extensions**

* 2a. The list is empty.

Use case ends.
* 2a1. JENGA informs the user the list is empty.

Use case ends.

* 3a. Given UUID is invalid or does not exist.

* 3a1. JENGA shows an error message.

Use case resumes at step 4.

**Use case: Add an attribute to a person**

**MSS**

1. User requests to add an attribute to a person.
2. JENGA prompts user to enter the person’s UUID and attribute details.
3. User enters UUID and attribute information.
4. JENGA adds attribute details to specific person’s profile.
5. JENGA displays attribute in person’s profile and confirmation message.

Use case ends.

**Extensions**

* 3a. Attribute details are invalid.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

* 3b. Given UUID is invalid or does not exist.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

**Use case: Edit to add an attribute to a person**

**MSS**

1. User requests to edit to add an attribute to a person.
2. JENGA prompts user to enter the person’s UUID and attribute details to add.
3. User enters UUID and attribute information.
4. JENGA adds attribute details to specific person’s profile.
5. JENGA displays attribute in person’s profile and confirmation message.

Use case ends.

**Extensions**

* 3a. Attribute details are invalid.

* 3a1. JENGA shows an error message.

* 3a. The given index is invalid.
* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

* 3b. Given UUID is invalid or does not exist.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

**Use case: Edit to delete an attribute to a person**

**MSS**

1. User requests to edit to delete an attribute to a person.
2. JENGA prompts user to enter the person’s UUID and attribute to delete.
3. User enters UUID and attribute information.
4. JENGA deletes attribute in specific person’s profile.
5. JENGA displays confirmation message.

Use case ends.

**Extensions**

* 3a. Attribute details are invalid.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

* 3b. Given UUID is invalid or does not exist.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

**Use case: Delete a person**

**MSS**

1. User requests to delete a person.
2. JENGA prompts user for details of person.
3. User enters person’s UUID.
4. JENGA deletes person.
5. JENGA displays confirmation message.

Use case ends.

**Extensions**

* 3a. Given UUID is invalid or does not exist.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

**Use case: Find persons by attribute**

**MSS**

* 3a1. AddressBook shows an error message.
1. User requests to find persons by attribute.
2. JENGA prompts user for attribute and attribute value(s).
3. User enters attribute name and attribute value(s).
4. JENGA displays list of persons with each of the specified attributes.

Use case resumes at step 2.
Use case ends.

**Extensions**

* 3a. Attribute details are invalid or does not exist.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

* 4a. The list is empty.

* 4a1. JENGA informs the user the list is empty.

Use case ends.

**Use case: Find persons by relationship to User**

**MSS**

1. User requests to find persons by relationship.
2. JENGA prompts user for relationship to User.
3. User enters relationship type.
4. JENGA displays list of persons with specified relationship to User.

Use case ends.

**Extensions**

* 3a. Relationship is invalid or does not exist.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

**Use case: Add a relationship between two persons**

**MSS**

1. User requests to add a relationship between two persons.
2. JENGA prompts user for UUIDs of both persons and relationship type.
3. User enters both persons UUID and relationship type.
4. JENGA creates a relationship with the provided details.
5. JENGA displays new relationship added under both persons’ profiles and confirmation message.

Use case ends.

**Extensions**

* 3a. Relationship type is invalid.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

* 3b. Given UUIDs are invalid or does not exist.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

**Use case: Edit a relationship between two persons**

**MSS**

1. User requests to edit a specific relationship between two persons.
2. JENGA prompts user for UUIDs of both persons and previous and new relationship type.
3. User enters both persons UUID and previous and new relationship type.
4. JENGA edits the specified relationship with the provided details.
5. JENGA displays edited relationship under both persons’ profiles and confirmation message.

Use case ends.

**Extensions**

* 3a. Relationship types are invalid.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

* 3b. Given UUIDs are invalid or does not exist.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

**Use case: Delete a relationship between two persons**

**MSS**

1. User requests to delete a specific relationship between two persons.
2. JENGA prompts user for UUIDs of both persons and relationship type.
3. User enters both persons UUID and specified relationship type.
4. JENGA deletes specified relationship.
5. JENGA displays confirmation message.

Use case ends.

**Extensions**

* 3a. Relationship type is invalid.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

* 3b. Given UUIDs are invalid or does not exist.

* 3a1. JENGA shows an error message.

* 3a2. JENGA prompts User to enter the correct and complete information.

Steps 3a1-3a2 are repeated until the data entered are correct.

Use case resumes from step 4.

Use case ends.

**Use case: Exit JENGA**

**MSS**

1. User requests to exit JENGA.
2. JENGA displays goodbye message.
3. JENGA saves current data.
4. JENGA closes the application window.

Use case ends.

*{More to be added}*

Expand Down
Loading