PROJECT: SSENISUB


Hello! I am Daniel Khoo. Year 2, Computer Science Student at National University of Singapore (NUS). This project portfolio serves to document what I have contributed to the project SSENISUB, a Software Engineering project (CS2103).

Overview

SSENISUB is a desktop business management application designed to manage staffs' information within an organisation. SSENISUB is built by a team of 5 students namely Daniel Khoo, Terence Goh, Ashburn Tan, Ngeow Xiu Qi and Valensia Sebastiani.

  • Features of SSENISUB:

    • Allows staff to find contact information of their co-staff and supervisor easily.

    • Allows staff to set privacy on their sensitive information such as phone number and home address.

    • Allows HR to add/edit/delete contact information.

    • Allows manager to give rating and feedback on their staff’s performance.

    • Allows manager to favourite the staff to place it on top of the list.

User interacts with SSENISUB mainly using the Command Line Interface (CLI).

My main responsibility in this project is to enhance the commands (add, edit, find)

I also played a key role in designing the UI, to make a better experience for the user on the whole. The UI was also further improved to display the details of the staff. A few UI event triggers have also been implemented. The picture below shows the main page of SSENISUB.

Ui
Figure 1. SSENISUB Main Page

Summary of contributions

Given below are sections I contributed to the Application. They showcase my ability to write and manage the code within the project.

  • Code contributed: RepoSense

  • Major enhancement 1: Added the ability to add staff

    • What it does: HR staff can add staff with this feature.

    • Justification: This feature provides HR department a better management of staffs in the organisation.

    • Highlights: This enhancement adds new commands into the application, and requires in-depth analysis of design analysis with regards to information storage. In the upcoming v2.0, users with different level of authorisations are only allowed to use certain commands, this command would only be accessible to HR department.

  • Major enhancement 2: Added the ability to edit existing staff

    • What it does: This feature allows the staff and HR staff to make any amendments to any staff they have created previously in the SSENISUB.

    • Justification: HR staff could add the staff with the wrong information, this feature will allow the HR staff to make any edits to the staff’s information. In addition, information such as phone number or home address or manager can change over time thus, this feature will allow staff to make any edits only to their own information.

    • Highlights: This enhancement delete and re-create a new Person object. In the upcoming v2.0, users with different level of authorisations are only allowed to use certain commands, this command would only be accessible to HR department and staff itself.

  • Major enhancement 3: Added the ability to find existing staff

    • What it does: This feature allows all users to find existing staff in the list with only name, email, department and manager parameters.

    • Justification: This feature will help users to find any particular staff information easily instead of scrolling through the long list of staff. Also, when a staff is planning for an event for the department and needs a list of names, this feature will be able to find all staff according to the department. Lastly, in the event when a manager needs to give a rating or feedback to the staff, he can find all staff that is under him so that he will not overlook on any staff.

    • Highlights: This enhancement changes the INDEX accordingly in the User Interface. Any command that relies on INDEX needs to keep it in mind.

  • Other contributions:

    • Project management:

    • Enhancements to existing features:

      • Updated the UI (Pull request #44, #50)

      • Wrote additional tests for existing features to increase coverage from 94.1% to 94.3% (Pull request #106)

    • Bug fixes:

      • Fixed UI bugs (Pull request #104, #108)

      • Fixed Phone Field bug that can accept less than 3 digits (Pull request #103)

    • Documentation:

      • Updated existing contents of the About Us: (Pull request #1)

      • Updated existing contents of the README: (Pull request #31, #36)

      • Updated existing contents of the User Guide: (Pull request #13, #65, #113)

      • Updated existing contents, diagrams and manual test cases of the Developer Guide: (Pull request #37, #118, #134)

    • Community:

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.

Adding a staff: add

Adds a staff to SSENISUB
Format: add n/NAME [p]p/PHONE_NUMBER [p]e/EMAIL [p]a/ADDRESS d/DEPARTMENT m/MANAGER [t/TAG]…​

A staff can have any number of tags (including 0)
Phone numbers and Email addresses are unique, you will not be able to add a new staff with a pre-existing Phone number or Email address within SSENISUB

Examples:

  • add n/John Doe p/98765432 e/johnd@example.com a/John Street, Block 123, #01-01 d/Accounting m/Marcus Lim t/staff

  • add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/81729817 d/Marketing m/Edmund Tan t/staff

Locating staff by name: find-n

Finds staff whose names contain any of the given keywords.
Format: find-n KEYWORD [MORE_KEYWORDS]

  • The search is case insensitive, e.g hans will match Hans

  • The order of the keywords does not matter, e.g. Hans Bo will match Bo Hans

  • Only the name is searched.

  • Only full words will be matched, e.g. Han will not match Hans

  • Staff matching at least one keyword will be returned (i.e. OR search), e.g. Hans Bo will return Hans Gruber, Bo Yang

Examples:

  • find-n John
    Returns John and John Doe

  • find-n Betsy Tim John
    Returns any staff having names Betsy, Tim, or John

Locating staff by email: find-e

Finds staff whose email contain any of the given keywords.
Format: find-e KEYWORD [MORE_KEYWORDS]

  • The search is case insensitive, e.g hans@example.com will match Hans@example.com

  • The order of the keywords does not matter, e.g. hans@example.com dan@example.com will match dan@example.com hans@example.com

  • Only the email is searched.

  • Only full words will be matched, e.g. Han@example.com will not match Hans@example.com

Examples:

Locating staff by department: find-d

Finds staff whose department contain any of the given keywords.
Format: find-d KEYWORD [MORE_KEYWORDS]

  • The search is case insensitive, e.g accounting will match AccountinG

  • The order of the keywords does not matter, e.g. Accounting Tech will match Tech Accounting

  • Only the department is searched.

  • Only full words will be matched, e.g. Account will not match Accounting

  • Staff matching at least one keyword will be returned (i.e. OR search)

Examples:

  • find-d Accounting
    Returns any staff in Accounting Department John

  • find-d Accounting Tech
    Returns any staff in Accounting or Tech Department John, Betsy, Tim

Locating staff by manager: find-m

Finds manager whose names contain any of the given keywords.
Format: find-m KEYWORD [MORE_KEYWORDS]

  • The search is case insensitive. e.g hans will match Hans

  • The order of the keywords does not matter. e.g. Hans Bo will match Bo Hans

  • Only the manager is searched.

  • Only full words will be matched e.g. Han will not match Hans

  • Manager matching at least one keyword will be returned (i.e. OR search). e.g. Hans Bo will return Hans Gruber, Bo Yang

Examples:

  • find-m John
    Returns john and John Doe

  • find-m Betsy Tim John
    Returns any manager having names Betsy, Tim, or John

Editing a staff : edit

Edits an existing staff in SSENISUB.
Format: edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [s/SALARY] [oth/OTHOUR] [otr/OTRATE] [de/DEDUCTIBLES] [d/DEPARTMENT] [m/MANAGER] [t/TAG]…​

  • Edits the staff at the specified INDEX. The index refers to the index number shown in the displayed staff list. The index must be a positive integer 1, 2, 3, …​

  • At least one of the optional fields must be provided.

  • Staff has 4 additional editable fields: salary, overtime hours (ot hours), overtime rate (ot rate) and pay deductibles.

  • Existing values will be updated to the input values.

  • When editing tags, the existing tags of the staff will be removed, i.e. adding of tags is not cumulative.

  • You can remove all the staff’s tags by typing t/ without specifying any tags after it.

Examples:

  • edit 1 p/91234567 e/johndoe@example.com s/1000
    Edits the phone number, email address, salary of the 1st staff to be 91234567, johndoe@example.com and 1000 respectively.

  • edit 2 n/Betsy Crower t/
    Edits the name of the 2nd staff to be Betsy Crower and clears all existing tags.

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.

Add Feature

Current Implementation

The add command allows HR users to add staff into SSENISSUB. It will ensure that there will be no duplicate with any existing staff.

The following sequence diagram shows the sequence flow from the LogicManager to the ModelManager when a HR user enter a add command:

AddSequenceDiagram

Figure 3.4.1.1 Sequence Diagram for add command

From the sequence diagram:

  1. When Logic Manager receives the execute command from the app, it calls the parseCommand method in SsenisubParser.

  2. SsenisubParser will receive add as the command and instantiate AddCommandParser to parse the rest of the command.

  3. If the arguments specified are valid, a AddCommand would be created and returned by to the LogicManager.

  4. LogicManager would proceed to call execute of the AddCommand.

  5. A new staff would be added and a successful CommandResult would be returned and displayed.

SSENISSUB’s staff is stored with name, phone, email address, home address, department, manager name and can be search and listed only with names.

All fields are checked against respective validations with each model. If the provided command either does not have any field, or field with invalid input, a ParseException would be thrown.

Design Considerations

Implementation of AddCommandParser
  • Alternative 1 (current choice): add is parsed first, then the rest of the arguments as AddCommandParser

    • Pros: Better modularization for commands

    • Cons: More classes will be needed = more code to be written

  • Alternative 2: add is parsed straight from SsenisubParser

    • Pros: Reduces the number of classes needed = less code to be written

    • Cons: Poor modularization for commands

Adding a staff

  1. Prerequisites: Phone and email must be unique, it should not been used for any existing staff.

    1. Test case: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 d/Tech m/Ben t/staff
      Expected: The command result panel should display that the person has been added with all the details. Timestamp in the status bar is updated.

    2. Test case: add n/John-Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 d/Tech m/Ben t/staff
      Expected: Error message will be shown in the command result panel - Names should only contain alphabetical characters and spaces, and it should not be blank. Timestamp in the status bar remains the same.

  2. Prerequisites: Phone or email exists in SSENISUB

    1. Test case: add n/Johnny p/98765432 e/johnny@example.com a/311, Clementi Ave 2, #02-25 d/Tech m/Ben t/staff
      Expected: Error message will be shown in the command result panel - This phone number is already in use. Timestamp in the status bar remains the same.

Selecting a staff

  1. Selecting a staff while all staff are listed

    1. Prerequisites: List all staff using the list command. Multiple staff in the list.

      1. Test case: select 1
        Expected: The details of the selected staff would be displayed on the staff display panel.

      2. Other correct select commands to try: select x (where x is larger than 0 but less than the list size)
        Expected: Similar to previous.

      3. Test case: select 0
        Expected: No staff would be selected and would display invalid message in the command result panel.

      4. Other incorrect select commands to try: select, select x (where x is 0 or lesser than 0 or larger than the list size)
        Expected: Similar to previous.

Finding staff

  1. Finding staff by name

    1. Prerequisites: Having at least 1 staff.

      1. Test case: Valid name
        Command: find-n John
        Expected: Staff/s with name John will be shown on the left panel.

      2. Other correct find by name commands to try: find-n Valid name (where valid name contain alphabetical characters that are in SSENISUB)
        Expected: Similar as previous

      3. Test case: Invalid name
        Command: find-n 123
        Expected: No staff will be shown on the left panel.

      4. Other find by name commands to try: find-n Invalid name (where invalid name contain alphanumeric characters or names that are not in SSENISUB)
        Expected: Similar as previous

      5. Test case: Empty value
        Command: find-n
        Expected: Error message is shown in the command result panel.