PROJECT: InsuRen


Overview

'Ren' in Mandarin translates to 'person' or 'people', and true to our name, this app is all about managing one’s network of clients in an organized, efficient and intuitive manner. InsuRen is geared to the needs of the modern Insurance salesman, but anyone whose business is their strong rapport with their clients will find this to be an indispensable tool.

Summary of contributions

  • Major enhancement: added the ability to view tagged contacts and to edit and delete tags

    • What it does: allows the user view all contacts with user-specified tags, as well as edit and delete tags across all contacts.

    • Justification: This feature improves the product significantly because a user can easily view relevant contacts and organise their contact book.

    • Highlights: This enhancement makes use of a new PersonContainsTagPredicate to find the relevant tagged contacts. The enhancement also has three different functionality within one command word by recognising other keywords present in the user’s command.

    • Credits: Nil

  • Code contributed: [RepoSense]

  • Other contributions:

    • Project management:

      • Managed release v1.3 on GitHub

    • Enhancements to existing features:

      • Edited ResultDisplay such that upon an invalid command, the result display text would be in a red font. (Pull request #13)

    • Documentation:

    • Community:

      • PRs reviewed (with non-trivial review comments): #39, #73, #79

      • Reported bugs and suggestions for other teams in the class (examples: 1, 2, 3)

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Using tags: tag

View contacts by tag

View all contacts in any existing tag.
Format: tag TAG_NAME [MORE_TAG_NAMES]

Shorthand: t

  • View all contacts that belong to the same tag.

Example:

  • tag Work
    Returns all contacts with the Work tag.

  • tag Work Important
    Returns all contacts with the Work or Important tags.

Edit a tag

Edit a tag, replacing all its occurrences with a new user-specified tag.
Format: tag edit EXISTING_TAG_NAME NEW_TAG_NAME

We recommend against (but do not forbid) using edit or delete (case-insensitive) as tags, as you may run into complications when using the tag edit and tag delete functionality.
  • All contacts tagged with EXISTING_TAG_NAME will have the tag replaced by NEW_TAG_NAME.

Example:

  • tag edit Work Business
    All contacts that had the Work tag have the tag changed to Business.

  • t EDIT Friends Buddies
    Usage of "edit" is not case-sensitive.

Delete a tag

Delete a tag, removing it from all contacts.
Format: tag TAG_NAME [MORE_TAG_NAMES…​] delete

  • All contacts in TAG_NAME will be removed from the tag. Contacts that were previously tagged are not deleted.

Example:

  • tag Work delete
    All contacts that were previously tagged with Work have the Work tag removed. Work tag is deleted.

  • t Work Important delete
    All contacts that were previously tagged with Work and Important have the aforementioned tags removed. Work and Important tags are deleted.

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Tag feature

Current Implementation

Each contact in Insuren can have any number of tags. The tag command allows the user to easily find contacts by tags. The user can also easily edit or delete tags using the tag command, allowing for better management of tags in Insuren.

Given below is an example usage scenario and how the tag command behaves at each step.

Step 1. The user launches the application and already has a few tagged contacts in InsuRen.

TagCommand1StateDiagram

Step 2. The user executes tag Important to retrieve all contacts tagged with Important. Tags are case-sensitive.

TagCommand2StateDiagram

Step 3. The user executes tag Family Colleague to retrieve all contacts tagged with Family or Colleague.

TagCommand3StateDiagram

Step 4. If the user wants to change all instances of the Colleague tag to Work, the user can input tag edit Colleague Work. edit is not case-sensitive.

TagCommand4StateDiagram

Step 5. If the user would like to delete the close tag, the user simply executes tag close delete. delete is not case-sensitive.

TagCommand5StateDiagram

Step 6. If the user would like to delete the Family and Colleague tags together, the user simply executes tag Family Colleague delete. Both tags will be deleted.

TagCommand6StateDiagram

All tag commands can be undone or redone with undo or redo respectively.
The following activity diagram summarizes what happens when a user executes the PictureCommand:

TagCommandActivityDiagram

The following sequence diagram shows what happens when a user executes the TagCommand:

TagCommandSequenceDiagram

Design Considerations

Aspect: How tag command works
  • Alternative 1 (current choice): Search through the address book’s list of persons to find all persons with any matching tag.

    • Pros: Consistent with find command, easy to implement.

    • Cons: Performance can be slow especially if InsuRen has many contacts as InsuRen will look through every person.

  • Alternative 2: A hashmap is used with the key values being each unique tag and the values being a list of persons associated with each tag.

    • Pros: Will have faster lookup, O(1) access time to get the list of persons associated with a tag.

    • Cons: Will use more memory storing a separate data structure. This separate data structure also has to be updated with the right list of persons every time a person’s details are edited or a person is deleted. Programming such a data structure would require significantly more effort.

Use Case: View tagged contacts

MSS

  1. User requests all contacts with any number of user-specified tags.

  2. InsuRen lists all contacts that contain any one of the user-specified tags.

    Use case ends.

Extensions

  • 1a. User enters tags that are not present in any contacts in Insuren.

    • 1a1. InsuRen shows an empty contact list.

      Use case resumes at step 1.

Use Case: Edit tags

MSS

  1. User requests to edit a tag, specifying an existing tag and a new tag name.

  2. InsuRen updates all contacts with the existing tag, changing the tag name to the new user-specified tag name.

  3. InsuRen lists all contacts whose tags have been updated.

    Use case ends.

Extensions

  • 1a. User enters tags that are not present in any contacts in Insuren.

    • 1a1. InsuRen shows an empty contact list, stating that 0 contacts have their tags changed.

      Use case resumes at step 1.

  • 1b. User does not enter any tag to edit.

    • 1b1. InsuRen shows an error message.

      Use case resumes at step 1.

  • 1c. User does not enter a new tag name.

    • 1c1. InsuRen shows an error message.

      Use case resumes at step 1.

Use Case: Delete tags

MSS

  1. User requests to delete a tag, specifying any number of tags he or she wants to delete.

  2. InsuRen finds all instances of any of the user-specified tags and deletes them from each contact.

  3. InsuRen lists all contacts whose tags have been deleted.

    Use case ends.

Extensions

  • 1a. User enters tags that are not present in any contacts in Insuren.

    • 1a1. InsuRen shows an empty contact list, stating that 0 contacts have their tags deleted.

      Use case resumes at step 1.

  • 1b. User does not enter any tag to delete.

    • 1b1. InsuRen shows an empty contact list, stating that 0 contacts have their tags deleted.

      Use case resumes at step 1.

Viewing tags

  1. Viewing all user-specified tags

    1. Prerequisites: InsuRen should have these contacts initially:

      • n/Anne Loh t/Friend

      • n/Ben Chua t/Friend

      • n/Charlie Dong t/Friend t/Buddy

      • n/David Ee t/Buddy

      • n/Euler Foo t/Buddy t/Close

      • n/Fiona Goh

    2. Test case: tag Friend
      Expected: Anne Loh, Ben Chua and Charlie Dong contacts are displayed.

    3. Test case: tag Friend Buddy
      Expected: Anne Loh, Ben Chua, Charlie Dong, David Ee and Euler Foo contacts are displayed.

    4. Test case: tag Friend Close
      Expected: Anne Loh, Ben Chua, Charlie Dong and Euler Foo contacts are displayed.

    5. Test case: tag friend Close
      Expected: Euler Foo contact is displayed.

    6. Test case: tag Friend buddy close
      Expected: Anne Loh, Ben Chua and Charlie Dong contacts are displayed.

    7. Test case: tag friend buddy close
      Expected: No contacts are displayed.

    8. Test case: tag
      Expected: Error details shown in the status message.

Editing tags

  1. Editing a user-specified tag

    1. Prerequisites: InsuRen should have these contacts initially:

      • n/Anne Loh t/Friend

      • n/Ben Chua t/Friend

      • n/Charlie Dong t/Friend t/Buddy

      • n/David Ee t/Buddy

      • n/Euler Foo t/Buddy t/Close

      • n/Fiona Goh

    2. Test case: tag edit Friend friend
      Expected: Anne Loh, Ben Chua and Charlie Dong contacts are displayed. Their tags are updated to friend.

    3. Test case: tag edit Close bestie
      Expected: Euler Foo contact is displayed. His tags are now t/Buddy t/bestie.

    4. Test case: tag edit test testing
      Expected: No contacts are displayed, no tags are edited.

    5. Test case: tag edit test
      Expected: Nothing is updated. Error details shown in the status message. Status bar remains the same.

    6. Test case: tag edit
      Expected: Nothing is updated. Error details shown in the status message. Status bar remains the same.

Deleting tags

  1. Deleting all user-specified tags

    1. Prerequisites: InsuRen should have these contacts initially:

      • n/Anne Loh t/Friend

      • n/Ben Chua t/Friend

      • n/Charlie Dong t/Friend t/Buddy

      • n/David Ee t/Buddy

      • n/Euler Foo t/Buddy t/Close t/Family

      • n/Fiona Goh t/Family

      • n/George Ho t/Family t/Dad

    2. Test case: tag delete friend
      Expected: Nothing is updated. Error details shown in the status message. Status bar remains the same.

    3. Test case: tag delete friend buddy close
      Expected: Nothing is updated. Error details shown in the status message. Status bar remains the same.

    4. Test case: tag delete Close
      Expected: Euler Foo is displayed. His tags are updated to t/Buddy. Close tag is deleted.

    5. Test case: tag delete Friend
      Expected: Anne Loh, Ben Chua and Charlie Dong contacts are displayed. They no longer have the Friend tag.

    6. Test case: tag delete Buddy Family
      Expected: Charlie Dong, David Ee, Euler Foo, Fiona Goh and George Ho contacts are displayed. They all do no have the Buddy or Family tags.

    7. Test case: tag delete = Expected: Nothing is updated. Error details shown in the status message. Status bar remains the same.

Appendix A: Non Functional Requirements

  1. InsuRen should work on any mainstream OS as long as it has Java 9 or higher installed.

  2. InsuRen should be able to hold up to 1000 clients' contact without a noticeable sluggishness in performance for typical usage.

  3. InsuRen should process a user command in 1 second or less, without any noticeable delay.

  4. InsuRen should display a clear and concise error message to provide feedback to the user when an invalid input is received.

  5. InsuRen should be backward compatible with data produced by earlier versions of Insuren.

  6. InsuRen should be open-source.

  7. InsuRen is offered as a free product.

  8. All data entries are backed-up regularly.

  9. All data entries are stored in a xml file.

  10. A user should be able to learn and use the product without any form of training.

  11. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.

  12. The UI should be responsive to changes.

  13. The product should be self-explanatory and intuitive such that an insurance agent is able to adapt to it within the first 10 minutes of using the product for the first time.

  14. When the program crashes, all data up till the point of crash will still be available upon relaunch of the program.

  15. The system should work by running on the JAR file without any installation.

  16. The system should work even if the user does not have any internet connection.

  17. The JAR file should be small in size (< 50 MB).