Overview
MYMorise — Manage Your Money(MYM) is a desktop application for those who prefer tracking personal expenses on their computers. With MYMorise, you can easily see your daily expenses as well as a summary, along with other useful functionalities. More importantly, MYMorise is optimized for those who prefer to work with Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI) created with JavaFX. It is written in Java, and has about 20 kLoC.
Summary of contributions
-
Major enhancement: added the ability to create/edit and delete budgets
-
What it does: allows the user to better manage their expenses by having customizable budgets to track their expenses for them.
-
Justification: This feature is fundamental in an application that tracks expenses. It is important for users to be able to track how much they are spending according to how much has been set aside (budget)
-
Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis on every aspect of the app and design alternatives. The implementation too was challenging as it required changes to all existing commands.
-
Credits: AddressBook Level 3
-
-
Minor enhancements:
-
Updated certain existing commands to work well with the major enhancement without creating separate commands.
These commands include: AddExpense, Delete, Clear, ListDefaultExpenses, EditExpenseCommand.
Example: Delete command will be able to delete an expense or a budget depending on what the user is viewing instead of creating a separate DeleteBudget command.
-
-
Other contributions:
Code Contributed
Full code contributed can be found at RepoSense
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. |
Budget Feature
Listing all budgets in the budget list : listBudgets
Shows a list of all budgets.
Format: listBudgets
An example is provided to show how the listBudgets command will result after the call.
Viewing a budget : view
Views an existing budget in the budget list.
Format: view INDEX
An example is provided to show how the View command will result after the call.
Adding a budget : budget
Specifies a budget for a period beginning from the specified start date to an end date.
Format: budget n/NAME a/AMOUNT [c/CURRENCY] d/STARTDATE ed/ENDDATE
A budget with no currency specified will have the default currency set. |
User may input time in the format "HHMM" in the [d/DATE] portion to specify current date with specified time |
Examples:
-
budget n/Japan Travel a/4000 c/USD d/9/10/2019 ed/19/10/2019
Sets a budget of SGD4000 for the period from Wed, 9th Oct 2019 to Sat, 19th Oct 2019. -
budget n/January 2019 Budget a/800 c/SGD d/1/1/2019 ed/31/1/2019
Sets a budget of SGD800 for the period from Tue, 1st Jan 2019 to Thu, 31st Jan 2019.
An example is provided to show how the budget command will result after the call.
Editing a budget : editBudget
Edits an existing budget in the budget list.
Format: editBudget INDEX [n/NAME] [a/AMOUNT] [c/CURRENCY]…
Examples:
-
editBudget 1 n/Japan Travel a/4000
Edits the name and the amount of the first budget toJapan Travel
and4000
respectively. -
editBudget 2 c/USD
Edits the currency of the second budget toUSD
only. Other fields remain unchanged.
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. |
Budget Feature
Overview
The Budget feature allows users to track their expenses in relation to the budget set. Expenses created by the user after a budget is set and falls into a budget period will automatically be added into that budget.
The feature allows the user to view a list of all the budgets created in the app. From the list of budgets, users may view any specific budget showing all the expenses allocated into the budget, along with the amount left in the budget. Users may add, delete, edit a budget as well as the expenses inside the budget.
Implementation
The BudgetList
stores all the budgets created in the App. To facilitate the adding, deleting and editing of budgets, the BudgetList provides a
few operations such as:
BudgetList#addBudget(budget)
- Add a new budget into the list of budgets in the budget list.
BudgetList#setBudget(budget, editedBudget)
- Edit a current existing budget to a different budget
BudgetList#removeBudget(budget)
- Remove a specified budget
Given below is an activity diagram to show how a budget is added.
Given below is an activity diagram to show how an expense is added after the implementation of budget.
Given below is a sequence diagram to show when a Delete command is called.
Given below is a class diagram of a Budget.
Notice that the budget consists of 2 Amounts and 2 Dates.
The 2 Amounts refer to the Budget Amount set by the user and the Budget Amount
currently left after deducting all expenses in the budget.
The 2 Dates refer to the Start Date of the Budget and the End Date of the budget. All expenses added after the budget is created,
and fall within this 2 dates, will be automatically added into the budget.
Given below is an example of a object diagram of a newly created Budget.
The Budget consists of an ExpenseList which holds all expenses added into the Budget.
Design Consideration
There were 2 main design choices we had to choose from for the implementation of the Budget Feature.
Aspect: A single source of truth
The model consists of an expense list and a budget list.
-
Alternative 1: Have a master expense list to store all expenses created and a budget list that consist of an internal expense list that stores copies of the expenses from master expense list that fall into the budget. In this option, commands that affect expenses, will require an update in the master expense list and the expense lists inside budgets affected.
-
Pros: Easy to implement, easy to keep track of a overall expenses.
-
Cons: Multiple objects of the same expense. An update to an expense in the overall expense list will require a same update to the same expense located in the budget. May result in bugs when commands affect expenses.
-
-
Alternative 2: Have a default expense list that stores only expenses that do not fall into a budget, and a budget list that consist of an internal expense list that stores the expenses that fall into a budget when the expense is added or edited. In this option, there is only 1 copy of any expense created by the user. Any edit or delete of an expense affects directly to the original expense object.
-
Pros: Achieve a single source of truth. Does not introduce possible bugs that may be present if there were multiple copies of the same expense.
-
Cons: More complex to implement. In order to view all expenses in the app, the program will have to loop through the default expense list and the expense lists of every single budget.
-
Alternative 2 was chosen. Reason is because a single source of truth would eliminate duplicate entries of the same data. This would also reduce the possibility of bugs that may come with duplicate entries.