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, and has about 10 kLoC.
Summary of contributions
-
Major enhancement:
-
Added the ability to list out all transactions in the wallet (Pull Request: #115)
-
What it does: allows the user to list out all transactions in the transactions list.
-
Justification: This feature improves the product significantly because it allows the user to view all their transactions in their wallet, for example, after filtering their list with our wallet find command, using wallet list will list out the full list of transactions again.
-
Highlights: The implementation was challenging as it required changes to the UI, due to the need to add a tab view to view the Wallet and Contact List separately. I implemented the base structure for this, which is later edited and enhanced by my group mate.
-
-
Added the ability to edit the transactions in the wallet (Pull Request: #110)
-
What it does: allows the user to edit the transactions in the wallet.
-
Justification: This feature improves the product significantly because it allows the user to edit the details of existing transactions, in case of any mistakes made or updates needed.
-
Highlights: Different error cases need to be identified and handled for the implementation.
-
-
Added the ability to delete the transactions in the wallet (Pull Request: #102)
-
What it does: allows the user to delete transactions in the wallet.
-
Justification: This feature improves the product significantly because it allows the user to remove unwanted transactions in the wallet.
-
-
Added the ability to find transactions in the wallet (Pull Request: #117)
-
What it does: allows the user to search for transactions in the wallet, with either the description, amount, date or tag field.
-
Justification: This feature improves the product significantly because it allows the user to search for transactions, with either the description, amount, date or tag field.
-
Highlights: This feature was challenging as the different areas to search with need to be considered, and the need to identify and handle multiple error cases.
-
-
-
Minor enhancement:
-
Added the ability to clear all transactions in the wallet (Pull Request: #248)
-
-
Code Contribured:
-
Other contributions:
-
Project management:
-
Set deliverable and deadlines for the group, ensuring that each member have a fair share of work, and deadlines are adhered to.
-
-
Enhancements to features:
-
Documentation:
-
Updated the User Guide to include more commands, updated Quick Start, and updated ContactUs: (Pull Request: #52)
-
Did cosmetic tweaks to existing contents of the User Guide and Quick Start: (Pull Request: #54)
-
Added UserStories and Product Scope to Developer Guide, and update content of User Guide: (Pull Request: #61)
-
Updated User Guide and Developer Guide formatting, and updated FAQ: (Pull Request: #66)
-
Edited Logic section of Developer Guide: (Pull Request: #127)
-
Added wallet edit command implementation and UML diagrams to Developer Guide: (Pull Request: #135)
-
Updated Developer Guide according to feedback given: (Pull Request: #184)
-
-
Community:
-
PRs reviewed (with non-trivial review comments) : (Pull Request: #71, #95, #101, #118, #140)
-
Reported bugs and suggestions for other teams in the class (examples: DG Suggestions, Mock Practical)
-
-
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. |
Quick Start
The following steps will help you get Sharkie up and running in no time on your desktop.
-
Ensure you have Java 11 or above installed in your computer.
-
Download the latest Sharkie.jar.
-
Copy the file to the folder you want to use as the home folder for Sharkie.
Make sure that your Sharkie.jar is in a folder that does not require administrator access. If not, it might not be able to function properly. -
Double-click the file to start the app. The GUI should appear in a few seconds.
Figure 1. Opening Sharkie for the first time -
If you are logging in for the first time, key in your name, phone and your email, and press Enter or click on the "Submit" button.
Figure 2. After inputting user information -
A confirmation PIN will be sent to your email. Please key in the confirmation PIN and click on the "Confirm" button. If you did not receive a confirmation PIN after 1 minute, please click on the "Resend PIN" button to get a new PIN.
-
If you are logging in for the first time, Sharkie is already pre-loaded with sample data.
You can use the people clear
command andwallet clear
command to remove the data in the wallet and people tabs respectively. -
You can type a command in the command box and press Enter to execute it.
e.g. Typinghelp
and pressing Enter will open the help window.You can check out [Commands] for detailed descriptions and usages of each command.
For a more succinct summary of the commands you can use in Sharkie, you can check out [command-summary]. -
Some example commands you can try to get you started:
-
people add
n/John Doe p/98765432 e/johnd@example.com
: Adds a contact named "John Doe" to the contact list. -
people delete
3
: Deletes the 3rd contact shown in the current list. -
wallet expense
n/Gift for friend $/88 d/12/12/2020 t/Shopping
: Adds an expense with name "Gift for friend", with an amount "$88", with date "12/12/2020" and tag "Shopping" into the wallet. -
wallet find
n/rice
: Returns a list of expenses or incomes with keyword "rice". -
exit
: Exits the app.
-
Listing all transactions: list
Suppose you want to see the full list of transactions, the command you would enter is our wallet list
command.
Format: wallet list
Confused over what a transaction is? Find out more about what is a transaction. |
Example:
-
Suppose you have just executed the
wallet find
command. Now, you would like to see the full list of transactions in the wallet again.-
The command you would enter is
wallet list
. -
This lists out all the transactions you have in your wallet.
-
Expected Outcome:
-
Sharkie will list all the transactions you have entered into the wallet.
Listed all transactions.
Editing a transaction: edit
Suppose you want to edit the details of an income or expense in your wallet, the command you would enter is our wallet edit
command.
Format: wallet edit <transaction’s index> [n/<description>] [d/<date: dd/mm/yyyy>] [$/<amount>] [t/<tag>]
Command Format
The following are the restrictions of wallet edit
command, which you would need to take note of:
-
The
<transaction’s index>
must be stated, and it must exist in the list of transactions. -
The index must be a positive integer: 1, 2, 3, …
-
At least one of
[n/<description>]
,[d/<date: dd/mm/yyyy>]
,[$/<amount>]
,[t/<tag>]
should be stated. Multiple fields are allowed as well.
Confused over what a transaction is? Find out more about what is a transaction. The <transaction’s index> above refers to the index number shown in the displayed transaction list in Sharkie. It indicates a
specific transaction in the wallet.Still confused? Find out more about what is a transaction’s index. |
Example #1:
-
Suppose you want to edit the first transaction in the transaction list, "Dack rce -$4400.00", because you misspelled the name and wrote the wrong price.
-
The command you would enter is
wallet edit 1 n/Duck rice $/4.00
. -
This tells Sharkie that you want to edit the description and price of the first transaction shown in the wallet.
-
Expected Outcome #1:
-
The transaction you have selected will be modified to contain the new description and price you entered.
Edited Transaction: Duck rice Description: Duck rice Amount: $4.00 Date: 2020-03-30 Tag: [Food]
Example #2:
-
Suppose you want to edit the date and tag of the first transaction, "Duck rice", because you forgot to input the date and tag.
-
The command you would enter is
wallet edit 1 d/10/04/2020 t/food
. -
This tells Sharkie that you want to edit the date and tag of the first transaction shown in the wallet.
-
Expected Outcome #2:
-
The transaction you have selected will be modified to contain the new date and tag you entered.
Edited Transaction: Duck rice Description: Duck rice Amount: $4.00 Date: 2020-10-04 Tag: [Food]
Finding an income or expense: find
Suppose you want to find transactions with certain keywords or date within the transaction list in the wallet, the command you would enter is our wallet find
command.
Format: wallet find n/<keyword> [<keyword> …]
or wallet find $/<keyword> [<keyword> …]
or wallet find d/<keyword> [<keyword> …]
or wallet find t/<keyword> [<keyword> …]
Command Format
The following are the restrictions of wallet find
command, which you would need to take note of:
-
The
<keyword>
can be either of type[n/<description>]
,[d/<date: dd/mm/yyyy>]
,[$/<amount>]
, or[t/<tag>]
. -
You cannot search for multiple prefixes in one command. However, finding multiple
<keyword>
of the same prefix is allowed. -
At least 1
<keyword>
must be input. -
The
<keyword>
is case-insensitive for finding of description (n/
) and tag (t/
). -
The
<keyword>
need not be in full for finding of description (n/
) and tag (t/
). For examplewallet find n/ri
will also display transactions with the keyword "rice". -
For finding of amount (
$/x
), the amount entered, "x", must be an integer. -
For finding of amount (
$/x
), "x" being an integer, the transactions displayed will range from amounts of "$x.00" to "$x.99".
Confused over what a transaction is? Find out more about what is a transaction. |
Example #1:
-
Suppose you want to search for transactions with description containing keyword "rice" or "soup":
-
The command you would enter is
wallet find n/rice soup
. -
This tells Sharkie that you want to look for transactions with description "rice" or "soup".
-
Expected Outcome #1:
-
All transactions with description containing keyword "rice" and transactions with description containing keyword "soup" will be listed out.
3 transactions listed!
Example #2:
-
Suppose you want to search for transactions with amount ranging between "$7.00" to "$7.99" or "$30.00" to "$30.99".
-
The command you would enter is
wallet find $/7 30
. -
This tells Sharkie that you want to look for transactions with cost or income from "$7.00" to "$7.99" or "$30.00" to "$30.99".
-
Expected Outcome #2:
-
All transactions with with amount from "$7.00" to "$7.99" and amount from "$30.00" to "$30.99" will be listed out.
3 transactions listed!
Example #3:
-
Suppose you want to search for transactions with tag "food" or "shopping".
-
The command you would enter is
wallet find t/food shopping
. -
This tells Sharkie that you want to look for transactions with the tag "food" or "shopping".
-
Expected Outcome #3:
-
All transactions with tag "food" and transactions with tag "shopping" will be listed out.
5 transactions listed!
Deleting an income or expense: delete
Suppose you want to delete a transaction, the command you would enter is our wallet delete
command.
Format: wallet delete <transaction’s index>
Command Format
The following are the restrictions of wallet delete
command, which you would need to take note of:
-
The
<transaction’s index>
must be stated, and it must exist in the list of transactions. -
The index must be a positive integer: 1, 2, 3, …
-
Only 1 transaction can be deleted each time. Multiple deletions in one command is not allowed.
Confused over what a transaction is? Find out more about what is a transaction. The <transaction’s index> above refers to the index number shown in the displayed transaction list in Sharkie. It indicates a
specific transaction in the wallet.Still confused? Find out more about what is a transaction’s index. |
Example:
-
Suppose you want to remove the first transaction, "Duck rice", from your wallet.
-
The command you would enter is
wallet delete 1
. -
This tells Sharkie that you want to delete the first transaction shown in the wallet.
-
Expected Outcome:
-
The transaction you have selected will be removed from the transaction list.
Deleted Transaction: Duck rice Description: Duck rice Amount: $4.00 Date: 2020-03-30 Tag: [Food]
Clearing all transactions : clear
Suppose you want to clear all the data (transactions and budgets) in wallet, the command you would enter is our wallet clear
command.
Format: wallet clear
Data cleared, which includes the transactions and budget data, cannot be restored after using wallet clear command. |
Example:
-
Suppose you want to clear all the preset transactions in the wallet.
-
The command you would enter is
wallet clear
. -
This tells Sharkie that you want to clear all transactions in the wallet.
-
Expected Outcome:
-
All the transactions and budgets you have entered into the wallet will be removed.
Wallet has been cleared!
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. |
Logic component
API :
Logic.java
-
Logic
uses theSharkieParser
class to parse the user command.-
SharkieParser
will check the command entered against a pattern defined inSharkieParser
. -
It refers to
CliPrefix
to determine whether the command entered is apeople
related command, awallet
related command or aglobal
command. -
If the command entered passes these checks, it then parses the command using the respective
XYZCommandParser
to retrieve the command to be executed.
-
-
This results in a
Command
object which is executed by theLogicManager
.-
Each command has its own
XYZCommand
that inherits fromCommand
, implementing different actions to be executed.
-
-
The command execution can affect the
Model
(e.g. adding a person, adding a transaction, filtering a list of transactions, reminders etc.). -
The result of the command execution is encapsulated as a
CommandResult
object which is passed back to theUi
.-
The
Ui
processes theCommandResult
and outputs the information to theResultDisplay
class.
-
-
In addition, the
CommandResult
object can also instruct theUi
to perform certain actions, such as displaying help to the user.-
Other
Ui
components are also updated on the successful obtaining of aCommandResult
byUi
.
-
Given below is the Sequence Diagram for interactions within the Logic
component for the execute("people delete 1")
API call.
delete 1
Command
The lifeline for PeopleDeleteCommandParser should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
|
Wallet Edit Command
The edit
command is implemented in the class, WalletEditCommand
.
This command can be accessed from Logic#execute()
. It edits the transaction
, indicated by the index specified, with the new details supplied by the command.
The following activity diagram illustrates what happens when the user executes a wallet edit
command:
Implementation of wallet edit
command
-
When entering the wallet edit command, the user have to specify at least one of
Description
,Amount
,Date
orTag
. Multiples can be inputted as well. -
WalletEditCommandParser
is executed to create anEditTransactorDescriptor
to hold the values to edit the transaction with. -
WalletEditCommandParser
then passes theeditTransactorDescriptor
to create aWalletEditCommand
. -
In
WalletEditCommand
class, the list oftransactions
is obtained from theModel
viaModel#getFilteredTransactionsList()
and the indicated transaction is extracted from the list. -
The
transaction
selected is modified based on the field to edit and the new details entered by the user, which are stored ineditTransactorDescriptor
-
A new
transaction
modified from thetransaction
selected is created withcreateEditedTransaction
method inWalletEditCommand
-
This new
transaction
replace the initialtransaction
at the indicated index viaModel#setTransaction()
and thefilteredTransactions
in theModel
is updated.
The following sequence diagram summarizes what happens during the execution of a wallet edit
command:
wallet edit
command
The lifeline for WalletEditCommand , WalletEditCommandParser and EditTransactionDescriptor should end at the destroy marker (X) but due to a limitation of PlantUML,
the lifeline reaches the end of diagram.
|
Design Considerations
Aspect: Choosing which transaction
to edit from the list of transactions.
-
Alternative 1 (current choice): Get the index from the list of transactions currently displayed, and not original index in the full transactions list, which can be displayed by
wallet list command
.-
Pros: Easy to see which
transaction
is to be edited. -
Cons: Filtered list needs to be constantly updated.
-
-
Alternative 2: Always edit based on the index from original list, which can be displayed by
wallet list command
.-
Pros: Index is always consistent.
-
Cons: Harder to remember which index represents which transaction.
-
Product Scope
Target user profile:
-
has a need to record expenses and income
-
has a need to keep to a certain budget every month
-
wants to view statistic of spending
-
has a need to record debts and loans
-
want to be reminded of his/her own debts
-
wants to remind his/her friends to pay back their debts
-
has a lot of friends to keep track of in contact book
-
prefer desktop apps over other types
-
can type fast
-
prefers typing over mouse input
-
is reasonably comfortable using CLI apps
Value proposition:
-
records expenses/debts faster than a typical mouse/GUI driven app
-
visual display of data with diagrams instead of just text
User Stories
Priorities: High (must have) - * * *
, Medium (nice to have) - * *
, Low (unlikely to have) - *
Priority | As a/an … | I want to … | So that … |
---|---|---|---|
|
university student that buys a lot of stuff |
keep track of my spending |
I do not overspend |
|
student with fixed monthly allowance |
track my spendings in a month |
I will make sure I save money every month |
|
person with bad mental calculation |
auto deduct money I owe from money the person owes me |
I don’t need to do the math myself |
|
user |
find a person by name |
locate details of persons without having to go through the entire list |
|
computer science student |
type instead of click |
it is more convenient |
|
student that always goes out with friends |
split shared spendings |
I make sure everyone pays back |
|
poor university person who borrows money from many people |
know who I owe money to |
I can pay them back when I have money |
|
person with a lot of friend’s |
keep track of who owes me what on which day |
I can ask them to pay me back |
|
calculative person |
keep track of how much exactly my friends owe me |
I can get all my money back |
|
student who needs to pay bills |
get reminded of when to pay them |
I don’t get my utilities cut/chased out of house etc. |
|
student with tight budget |
set a budget and be notified when nearing it |
I won’t overspend |
|
thrifty student |
set savings goals |
I can have achievable, trackable savings |
|
unmotivated person |
get motivation to spend less/save more |
I have the willpower to manage my finances |
|
user |
hide private contact details by default |
minimize chance of someone else seeing them by accident |
|
a student who lives far from school |
keep track of how much i spend on transport |
I know whether to get concession |
|
friend |
have my friend track how much I owe them |
do not have to keep track of it myself |
|
student who travel with friends |
keep track of how much each person spent in the trip |
there won’t be any money issue during the trip |
|
student that always forget to pay my friend back |
set a deadline and reminder |
I will pay my friend back |
|
forgetful student |
send people automated reminders when they owe me money |
I won’t lose any money |
|
a lazy person |
I can ask for my money back from a few friends in a click |
I can save time asking them one by one |
|
student who does not dare to request money from friends |
send notifications to my friends |
I can get my money back |
|
student with no control |
know if I hit my budget |
I will be guilty and thus try and control myself |
|
student who does part time job |
track how much I earn in a month |
I’m proud of myself |
|
student who prefers visual data |
visualise my income/spendings in a graph/chart |
it is easier to keep track of my expenditures |
|
student that needs to explain their spendings to their parents |
show them the chart of my everyday spendings |
It is convenient and more visual |
|
organised student |
categorise my spendings |
I know the proportions of my spendings |
|
student with a huge wardrobe |
keep track of my expenditure on clothing |
I can control my shopaholic tendencies |
|
student on diet |
track how much I spend on food |
I would control myself from spending too much on food |
|
rich student |
keep track of what I bought |
I can show off to my friends |
|
rich student who always lends people money |
take note of who owes me money |
I can track them and ask them for it back |
|
someone with few friends |
keep track of who I paid for or who paid for me first |
I know who are my friends, and the frequency I go out with them |
|
tech-savvy loan shark |
I want to conveniently record who owes me money |
I can remind them to pay back through email |
|
tech-savvy loan shark |
I want a convenient way to calculate interest rate |
I don’t have to do it manually |
Listing all transactions
-
Listing all the transactions in the wallet.
-
Prerequisites: The transactions list must not be empty.
-
Test case:
wallet list
Expected: All transactions in wallet listed out.
-
Editing a transaction
-
Editing a specific transaction.
-
Prerequisites: The transaction to be edited exist in the wallet. At least 1 field to be edited must be inputted. The new details provided to edit the transaction with must be different from the corresponding details in the old transaction.
-
Test case:
wallet edit 1 n/Chicken Rice
Expected: The first transaction is now updated with new description Chicken Rice. A success message shown in the result display. -
Test case:
wallet edit 1 n/Dinner $/12.00 d/02/02/2020 t/food
Expected: The first transaction is now updated with new description Dinner with amount $12.00, recorded under the date 02/02/2020 with tag Food. A success message shown in the result display. -
Test case:
wallet edit 0 n/Chicken Rice
Expected: The transaction is not edited. Error details shown in the result display. -
Other incorrect edit commands to try:
-
wallet edit
, -
wallet edit 1
, -
wallet edit 1 n/
, -
wallet edit 1 $/
, -
wallet edit 1 d/
, -
wallet edit 1 t/
, -
wallet edit 1 d/yyyy/mm/dd
, (where the order of day month and year is not correct) -
wallet edit 1 d/x
, (where x is not a date) -
wallet edit x n/Dinner $/12.00 d/02/01/2020
(where x is larger than the transaction list size), -
wallet edit x $/12.00
(where x is a negative number), -
wallet edit x $/12.00
(where x is a non-integer), -
wallet edit 1 n/Dinner $/x
(where x is greater 92233720368547758.07), -
wallet edit 1 n/Dinner $/x
(where x has more than 2 decimal places) or -
wallet edit 1 n/Dinner $/x
(where x is not a number).
Expected: Similar to previous
-
-
Finding transactions
-
Finding transactions containing the <keyword> provided.
-
Prerequisites: The transaction list must not be empty. The keyword can only be either of type [n/<description>], [d/<date>], [$/<amount>], or [t/<tag>]. At least 1 keyword to search with must be inputted.
-
Test case:
wallet find n/chicken duck
Expected: All transactions with description containing either chicken or duck are displayed. A success message shown in the result display. -
Test case:
wallet find $/3 12
Expected: All transactions with amount in the range of $3.00 to $3.99 or $12.00 to $12.999 are displayed. A success message shown in the result display. -
Test case:
wallet find d/20/12/2020 30/12/2020
Expected: All transactions with date falling on 20/12/2020 or 30/12/2020 are displayed. A success message shown in the result display. -
Test case:
wallet find t/food shopping
Expected: All transactions with tag containing either food or shopping are displayed. A success message shown in the result display. -
Test case:
wallet find n/Chicken d/20/12/2020
Expected: Find command do not run. Error details shown in the result display. -
Other incorrect find commands to try:
-
wallet find
, -
wallet find n/
, -
wallet find $/
, -
wallet find d/
, -
wallet find t/
, -
wallet find n/Dinner $/12.00 d/02/01/2020 t/food
-
wallet find $/x
(where x is a negative number), -
wallet find $/x
(where x is a non-integer), -
wallet find $/x
(where x is greater 92233720368547758.07), -
wallet find d/x
(where x is not a date), -
wallet find d/yyyy/mm/dd
(where date is in the wrong format)
Expected: Similar to previous
-
-
Deleting a transaction
-
Deleting a transaction.
-
Prerequisites: The transaction which you want to delete exists in the transactions list.
-
Test case:
wallet delete 1
Expected: First transaction is deleted from the list. Details of the deleted contact shown in the result display. -
Test case:
wallet delete 0
Expected: No transaction is deleted. Error details shown in the result display. -
Other incorrect delete commands to try:
-
wallet delete
, -
wallet delete x
(where x is not a number), -
wallet delete x
(where x is larger than the person list size), -
wallet delete x
(where x is a negative number) or -
wallet delete x
(where x is a non-integer value)
Expected: Similar to previous.
-
-
Clearing all transactions
-
Clear all the data in the wallet, including income, expense and budget.
-
Prerequisites: There must be transactions or budget data in the wallet.
-
Test case:
wallet clear
Expected: All transactions and budget data in wallet is deleted.
-