Overview
This project portfolio provides detail of my contribution to our group (T13-2) project, SSENISUB, for CS2103.
SSENISUB is a desktop application intended for business organizations to manage information regarding its staff. SSENISUB is CLI-interactive and has a GUI created with JavaFX. It is written in Java and has about 15kLoC.
As a team member, I was in charge of implementing new commands, i.e. favourite/unfavourite and sort/sortDept/sortRatingDown/sortRatingUp. These implemented commands are helpful in increasing the efficiency of the application use by moving favourited staff to the top or the list and sorting the list of staff by the different parameters.
Summary of contributions
-
Code contributed: [RepoSense for valensia0711]
-
Major enhancement 1: added the ability to favourite and unfavourite a staff
-
What it does: Allows the user to favourite a staff (i.e. moves the specified staff to the top of the list) and also allows the user to unfavourite favourited staff (i.e. moves the specified staff back from the top)
-
Justification: The favourite feature makes the use of the application more efficient as some user would always have a few staff with whom they interact or contact frequently. By moving that particular staff to the top of the list, the amount of hassle needed to find and select the staff is omitted. On the other hand, the unfavourite feature is also needed as there are many cases that would lead to no longer frequent interaction with said favourited staff.
-
Highlights: This enhancement also affects the UI other than moving the staff to the top of the list. Favourited staff will be highlighted in yellow and will have a star next to their name.
-
Credits: [Favourite Command by CS2103-2017-T10-B1]
-
-
Major enhancement 2: added the ability to sort the staff list by different parameters
-
What it does: Allows the user to sort the staff list by three different parameters, i.e. by name, by department, and by rating
-
Justification: Sorting the list by name is significant as it will ease the process of finding a certain staff without having to know their exact name. Sorting the list by department would be really helpful for people at higher positions who are in charge of more than one departments. Sorting the list by rating would be important for managers or HRs as this is the main key needed to review staff performances, and having both options to sort it in ascending or descending order further helps for the different cases possible in an organization setting.
-
Highlights: This enhancement takes into consideration not only the surface sorting but also the minor details, e.g. sort by name command would sort the list by favourite first then sort by name, leaving the favourited staff on top e.g. sort by department command would sort the list by department then by favourite then by name e.g. sort by rating command would sort the list by rating then by favourite then by name
-
Credits: [Guide to Java 8 Comparator.comparing()]
-
-
Other contributions:
-
Project management:
-
Checked
v1.1
-v1.4
(4 releases) before its release
-
-
Enhancements to existing features:
-
Designed SSENISUB.png used in the UI right side: #42
-
-
Bug fixes:
-
Fixed bugs in favourite/unfavourite command related to undo/redo command: #100
-
-
UI changes:
-
Edited person list card UI for favourite/unfavourite command: #76
-
-
Documentation:
-
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. |
Sorting all staff by name : sort
Sorts the staff list by name.
Format: sort
Sorting all staff by department : sortDept
Sorts the staff list by department.
Format: sortDept
Sorting all staff by rating : sortRatingDown
Sorts the staff list by rating from highest to lowest.
Format: sortRatingDown
or sortRating
Sorting all staff by rating : sortRatingUp
Sorts the staff list by rating from lowest to highest.
Format: sortRatingUp
Favouriting a staff : favourite
Favourites the specified staff and moves it up to the top of the list.
Format: favourite INDEX
or fav INDEX
Examples:
-
list
favourite 2
Favourites the 2nd staff in SSENISUB. -
find Betsy
fav 1
Favourites the 1st staff in the results of thefind
command.
Unfavouriting a staff : unfavourite
Favourites the specified staff and moves it up to the top of the list.
Format: unfavourite INDEX
or unfav INDEX
Examples:
-
list
unfavourite 2
Removes the 2nd staff from favourite list. -
find Betsy
unfav 1
Removes the 1st staff in the results of thefind
command from favourite list.
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. |
Sort Feature
Introduction
We have implemented a sort command that focuses on the Logic
component. A SortCommand
class is added.
Current Implementation
This sort
command sorts the staff list by name in lexicographical order.
Given below is a sequence diagram that shows how the sort command works:
Design Considerations
Implementation of sort command
-
Alternative 1 (current choice): Sorts by favourite then by name
-
Pros: Favourited staff stays on top of the list, favourited staff still easier to find
-
Cons: The overall list is not 100% sorted by name
-
-
Alternative 2: Sorts by name then by favourite
-
Pros: Overall list sorted wholly by name, easier to find a specific person when not known whether favourited or not
-
Cons: Favourited person scattered all over in the list, defeats the purpose of having favourited staff
-
Sort By Department Feature
Introduction
This sort by department command is a further enhancement to the sort command that also focuses on the Logic
component. A SortDeptCommand
class is added.
Current Implementation
This sortDept
command sorts the staff list by department in lexicographical order.
Given below is a sequence diagram that shows how the sortDept command works:
Design Considerations
Implementation of sortDept command
-
Alternative 1 (current choice): Sorts by department then by favourite then by name
-
Pros: Easier to go through the different departments without a hassle
-
Cons: Favourited staff does not stay on top of the list
-
-
Alternative 2: Sorts by favourite then by department then by name
-
Pros: Favourited staff stay on top of the list
-
Cons: The main purpose of sorting by department is to group the staff by the different department, so there is no point in putting the favourites on top of the list
-
Sort By Rating From Highest To Lowest Feature
Introduction
This sort by rating command is a further enhancement to the sort command that also focuses on the Logic
component. A SortRatingDownCommand
class is added.
Current Implementation
This sortRatingDown
command sorts the staff list by rating from highest to lowest.
Given below is a sequence diagram that shows how the sortRatingDown command works:
Design Considerations
Implementation of sortRatingDown command
-
Alternative 1 (current choice): Sorts by rating down then by favourite then by name
-
Pros: Staff list is sorted wholly by their ratings, easier to process for the case of staff performance review as being favourited or not should not affect its rating ranking
-
Cons: Favourited staff does not stay on top of the list
-
-
Alternative 2: Sorts by favourite then by rating down then by name
-
Pros: Favourited staff stay on top of the list
-
Cons: As rating by rating is intended for the use of staff performance review, it would not be helpful to do it this way
-
The use of sortRatingDown when command alias sortRating
is called
-
Alternative 1 (current choice): Inputting sortRating sorts the staff list by rating from highest to lowest
-
Pros: This alternative is chosen as it is believed that there are more cases that make use of sorting from highest rating, e.g. job promotion review, performance-related additional wage
-
Cons: Some people might expect the default sort by rating to sort the list from lowest to highest
-
-
Alternative 2: Inputting sortRating sorts the staff list by rating from lowest to highest
-
Pros: There are cases where sort rating from lowest is needed, e.g. the need to let go of staff due to budget cuts
-
Cons: Some people might expect the default sort by rating to sort the list from highest to lowest
-
Sort By Rating From Lowest To Highest Feature
Introduction
This sort by rating command is a further enhancement to the sort command that also focuses on the Logic
component. A SortRatingDownCommand
class is added.
Current Implementation
This sortRatingUp
command sorts the staff list by rating from lowest to highest.
Given below is a sequence diagram that shows how the sortRatingUp command works:
Design Considerations
Implementation of sortRatingUp command
-
Alternative 1 (current choice): Sorts by rating up then by favourite then by name
-
Pros: Staff list is sorted wholly by their ratings, easier to process for the case of staff performance review as being favourited or not should not affect its rating ranking
-
Cons: Favourited staff does not stay on top of the list
-
-
Alternative 2: Sorts by favourite then by rating up then by name
-
Pros: Favourited staff stay on top of the list
-
Cons: As rating by rating is intended for the use of staff performance review, it would not be helpful to do it this way
-
Favourite Feature
Introduction
We have implemented a favourite command that focuses on the Logic
component. A 'FavouriteCommand` class is added.
Current Implementation
This favourite
command allows contacts to be added to a favourite list and moves the contact to the top of the list.
Given below is a sequence diagram that shows how the favourite command works:
Design Considerations
Implementation of favourite command
-
Alternative 1 (current choice): Favourite command can be called using a command alias 'fav'
-
Pros: Easier and faster command calling
-
Cons: Ambiguity in choosing command alias (can be either fave or fav)
-
-
Alternative 2: Favourite command takes in command word 'favourite'
-
Pros: Clear command word taken in
-
Cons: Slower command calling
-
Lock and Unlock Feature (coming in v2.0)
Introduction
We will implement an unlock command that focuses on the Storage
component. An UnlockCommand
class is added
and an UnlockEvent
event is also added.
Current Implementation
The unlock
command allows changes made to be saved to SSENISUB.
Without the correct (for now hardcoded) password, all the changes made (add, edit, delete)during the session will not be saved and will not be shown once the window is closed and reopened.
The following activity diagram shows how the current Unlock
command works:
Given below is an activity diagram that shows how the unlock command is intended to work:
Design Considerations
Implementation of unlock
-
Alternative 1 (current choice): Unlocking is handled as an event rather than a command.
-
Pros: Unlocking can be done at any time and event handler is used
-
Cons: Does not resemble a real unlocking function, minimal functionality
-
-
Alternative 2: Unlocking is a command that overrides all other commands
-
Pros: Makes more sense as an unlock function
-
Cons: Harder to implement
-
Unfavourite Feature
Introduction
As we have implemented a favourite command, we also have implemented an unfavourite command that focuses on the Logic
component. An 'UnfavouriteCommand` class is added.
Current Implementation
This unfavourite
command allows contacts to be removed from the favourite list.
Given below is a sequence diagram that shows how the unfavourite command works:
Design Considerations
Implementation of unfavourite command
-
Alternative 1 (current choice): Using a separate unfavourite command
-
Pros: Clear use of command
-
Cons: Adds yet another command to command list
-
-
Alternative 2: Doing a favourite command on a favourited person will unfavourite them instead
-
Pros: Easier implementation
-
Cons: Ambiguous use of this feature as the command is a favourite command
-
Favouriting a staff
-
Favourite a staff while all staff are listed
-
Prerequisites: List all staff using the
list
orsort
command. Multiple staff in the list. -
Test case:
fav 3
Expected: Third contact is moved to the top of the list. Once on top of the list, the name of the staff changes color to yellow and a star is added next to it in the list panel on the left. -
Test case:
fav 0
Expected: No staff is favourited. Error details shown in the status message. Status bar remains the same. -
Other incorrect favourite commands to try:
fav
,fav x
(where x is larger than the list size)
Expected: Similar to previous.
-
-
Favouriting a staff that is already favourited
-
Prerequisites: List all staff using the
list
orsort
command. Multiple staff in the list. First staff in the list favourited. -
Test case:
fav 1
Expected: Staff is already favourited. Error details shown in the status message. Status bar remains the same.
-
Unfavouriting a staff
-
Unfavourite a staff while all staff are listed
-
Prerequisites: List all staff using the
list
orsort
command. Multiple staff in the list. One or more staff is favourited. -
Test case:
unfav 1
Expected: First contact is moved back from the top of the list. The name of the staff changes color back from yellow and the star next to it is removed in the list panel on the left. -
Test case:
unfav 0
Expected: No staff is unfavourited. Error details shown in the status message. Status bar remains the same. -
Other incorrect unfavourite commands to try:
unfav
,unfav x
(where x is larger than the list size)
Expected: Similar to previous.
-
-
Unfavouriting a staff that is already not favourited
-
Prerequisites: List all staff using the
list
orsort
command. Multiple staff in the list. No staff in the list already favourited. -
Test case:
unfav 3
Expected: Staff is already unfavourited. Error details shown in the status message. Status bar remains the same.
-