PROJECT: Sharkie

Overview

Sharkie is a desktop expense tracker application. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java.

Summary of contributions

  • Code contributed: https://nus-cs2103-ay1920s2.github.io/tp-dashboard/#=undefined&search=jumpcutfindo

  • Major enhancement: Adapted Sharkie from AB-3 such that it can take in more prefixes as commands.

    • What it does: allows the user to use people and wallet as prefixes

    • Justification: This feature was implemented as the wallet and the contacts have similar commands but had to be differentiated.

    • Highlights: This enhancement affects existing commands and commands to be added in future.

  • Major enhancement: Added wallet budget command so that the user can add a budget for their finances.

    • What it does: allows the user to add a budget for their finances.

    • Justification: This feature was implemented to help the user keep track of their finances and prevent them from overspending.

  • Major enhancement: Upgraded the user interface to make Sharkie more visually appealing and display relevant information.

    • What it does: allows the user to easily see information related to their transactions and their address book.

    • Justification: This feature was implemented to allow people to easily see their data entered and statistics.

  • Minor enhancement: Did bugfixing on the user interface and commands throughout the course of the project.

    • What it does: enables Sharkie to run smoothly and improves user experience when using the application.

    • Justification: Bugfixing was used to ensure that the program could run properly and respond to input appropriately.

  • Other contributions:

    • User guide contribution:

      • Added "Global Commands" section to user guide

      • Added wallet budget command guide to user guide

      • Added "Command Summary" section to user guide

      • Did proof-reading and checking along with the team for user guide

    • Developer guide contribution:

      • Added wallet budget command to developer guide

      • Did proof-reading and checking along with the team for developer guide

    • Project management:

      • Team lead of the project, ensured team is up to date and on the same page for the project.

      • Ensured that itinerary of each meeting is discussed and goals of each team meeting is achieved in the meeting.

    • Community:

    • Tools:

      • Used Figma to design a mockup for the application

      • Used PlantUML to draw diagrams for the developer guide.

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.

General Commands

This section introduces the two general commands, help and exit. These commands are not specific to the people or wallet tabs of Sharkie.

Viewing help : help

Suppose you need help regarding the many features of Sharkie and how to operate it, you can use the general help command to get a link to this user guide.

Format: help

Example:

  • Suppose that you’ve started Sharkie and are unsure of what commands are available or how to use it.

    • Typing help will open our user guide.

Expected Outcome:

  • A window will pop up, providing you with a reference to our user guide.

    Opened help window.

Exiting the program : exit

Suppose you’re done with using Sharkie and wish to exit the application safely, you can use the general exit command to save your data and exit the program.

Format: exit

Example:

  • Suppose that you’ve just finished using Sharkie, and wish to close the program and save your data.

    • Typing exit will save your data and quit Sharkie.

Expected Outcome:

  • Sharkie will save your data and quit the application safely.

Setting a budget: budget

Suppose you want to set a budget for a certain month, or a budget in general for all months. The command that you would enter in this case is our wallet budget command.

Format: wallet budget $/<amount> [m/<month: mm>] [y/<year: yyyy>]

Command Format

The following are restrictions of wallet budget command, which you will need to take note of:

  • The <amount> you have set must be a valid amount.

  • The value of the <month: mm> you have set must be a positive integer between 1 - 12.

  • The value of the <year: yyyy> you have set must be a non-negative integer.

Your budget entry will overwrite any pre-existing budgets. This means that if you have previously set a budget for a specific month and year, and if you have indicated that month and year again, it will overwrite the budget that has been set.
If no month or year is specified, the default budget is set as the amount provided.

If the budget value is set to 0, Sharkie will consider it as if you have not set a budget for that month.

Example #1:

  • Suppose you want to add a default budget of "$1000" for all months.

    • The command you would enter is wallet budget $/1000.

    • This tells Sharkie that you want to set a default budget of "$1000.00".

Expected Outcome #1:

  • Sharkie sets the default budget as "$1000.00".

    Default budget has been set at $1000.00.

Example #2:

  • Suppose you want to add a budget of "$999" for March 2020.

    • The command you would enter is wallet budget $/999 m/03 y/2020.

    • This tells Sharkie that you want to set a budget of "$999.00" for March 2020.

Expected Outcome #2:

  • Sharkie sets a budget of "$999.00" for March 2020.

    Budget has been set at $999.00 for MARCH 2020.

Command Summary

If you wish to have a quick reference to the commands available in Sharkie, you can refer to the list below.

General Commands

The following are the general commands that are available in Sharkie for you to use! You do not need to use any prefixes to use these commands.

Table 1. General commands available in Sharkie.

Command

Format

Expected outcome

help

help

Opens up a window with a link to the User Guide.

exit

exit

Saves your data and safely exits

Wallet Commands

The following commands are wallet-related commands that are available in Sharkie for you to use! You will need to use the prefix wallet to use the commands.

Table 2. Wallet commands available in Sharkie.

Command

Format

Expected outcome

budget

wallet budget $/<amount> [m/<month>] [y/<year>]

Sets a budget for you for the month selected.

clear

wallet clear

Removes all your transactions entered in your wallet.

delete

wallet delete <transaction’s index>

Removes the transaction selected at that index from the wallet.

edit

wallet edit <transaction’s index> [n/<name>] [d/<date>] [$/<amount>] [t/<tag>]

Edits your transaction in the wallet at the index selected with your given arguments.

expense

wallet expense n/<description> $/<amount> [d/<date: dd/mm/yyyy>] [t/<tag>]

Creates an expense and adds it to your wallet.

find

wallet find n/<keyword>
or wallet find $/<keyword> [<keyword> …​]
or wallet find d/<keyword> [<keyword> …​]
or wallet find t/<keyword> [<keyword> …​]

Finds your transaction(s) within your wallet using the arguments you have provided.

income

wallet income n/<description> $/<amount> [d/<date: dd/mm/yyyy>] [t/<tag>]

Creates an income and adds it to your wallet.

list

wallet list

Lists all your transactions that have been recorded by Sharkie in the wallet.

People Commands

The following commands are people-related commands that are available in Sharkie for you to use! You will need to use the prefix people to use the commands.

Table 3. People commands available in Sharkie.

Command

Format

Expected outcome

add

people add n/<name> p/<phone number> e/<email address>

Adds a contact to your contact list, with the particulars that you have entered.

clear

people clear

Clears all your contacts in your contact list.

delete

people delete <person’s index>

Deletes your contact at the index you have selected.

edit

people edit <person’s index> [n/<name>] [p/<phone number>] [e/<email address>]

Edits your contact in the contact list at the index selected with the given arguments.

find

people find n/<keyword> [<keyword>…​]
or people find p/<keyword> [<keyword>…​]
or people find e/<keyword> [<keyword>…​]
or people find t/<keyword> [<keyword>…​]

Finds your contact(s) within your contact list using the arguments you have provided.

lend

people lend <person’s index> n/<description> $/<amount> [d/<date:dd/mm/yyyy>]

Records a loan to your contact at the index selected in your contact list.

list

people list

Lists all your contacts that have been recorded by Sharkie in the contact list.

owe

people owe <person’s index> n/<description> $/<amount> [d/<date:dd/mm/yyyy>]

Records a debt to your contact at the index selected in your contact list.

received

people received <person’s index> [i/<loan’s index>]

Removes the loan at the index selected for your contact selected.

remind

people remind <person’s index>

Sends an email to the contact at the index you have selected, reminding them of any withstanding debts that have to be paid back to you.

remindall

people remindall

Sends an email to all your contacts with any withstanding debts, reminding them to pay you back.

returned

people returned <person’s index> [i/<debt’s index>]

Removes the debt at the index selected for your contact selected.

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.

Wallet Budget Command

The budget command is implemented in the class, WalletBudgetCommand.

This command can be accessed from Logic#execute(). It adds a budget using the parameters as specified by the user.

The following activity diagram illustrates what happens when a user executes the wallet budget command:

WalletBudgetActivityDiagram
Figure 1. Activity diagram of the execution of wallet budget command

Implementation of wallet budget command

  1. In WalletBudgetCommand class, the Budget produced by WalletBudgetCommandParser is examined to determine if it is a default budget, or if it is a normal budget.

    1. If the Budget is a default budget, the BudgetList is updated in the Model via Model#setDefaultBudget(). This sets the default budget as the one given.

    2. If the Budget is not a default budget, the BudgetList is updated in the Model via Model#setBudget(). This adds the budget given to a list of budgets with their Month and Year specified.

  2. The list of Budget in the Wallet is modified based the arguments input by the user.

  3. If a Budget with the same arguments given already exists, it will be overwritten by the one given.

  4. A CommandResult is returned at the end of the execution.

The following sequence diagram summarizes what happens during the execution of a wallet budget command:

WalletBudgetSequenceDiagram
Figure 2. Sequence diagram of the wallet budget command
The lifeline for WalletBudgetCommandParser and WalletBudgetCommand should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.

Design Considerations

Aspect: Selection of Budget to set: default or specific month / year
  • Alternative 1 (current choice): If the month and year of the budget is specified, the specific Budget will be set. Otherwise, the default Budget will be set.

    • Pros: Easy to differentiate during command processing whether we want a default Budget or a specific one.

    • Cons: All Budget except default Budget all contain a redundant isDefault boolean

  • Alternative 2: Allow the user to specify if they want a default Budget set, or a specific Budget instead.

    • Pros: Clearer way to distinguish between default Budget and specific Budget

    • Cons: Requires more prefixes / suffixes to be added to Parser in order to parse extra arguments.