tp

Money Tracker: A Team Project for TIC4001

View on GitHub

Developer Guide

System design

This section provides an overview of how the Money Tracker app is designed.

Architecture



The Architecture Diagram given above explains the high-level design of the Money Tracker App.

MoneyTracker is the Main class. It is responsible for:

The App consists of the following components.

Design & implementation of features

This section describes how certain features are designed and implemented.

Design & Implementation of add expense feature

The add expense operation is implemented using AddExpenseCommand, which extends Command. Upon receiving an input string that has adde as the first word, the MoneyTracker object will instantiate an AddExpenseCommand object with the fullCommand string, which is the input entered by the user. The MoneyTracker object will then call the execute method in the AddExpenseCommand object with the following arguments:

  1. transactions: a TransactionList object;
  2. ui: a Ui object;
  3. storage: a Storage object;
  4. budget: a Budget object;
  5. categories: a CategoryList object.

Finally, the execute method will execute the following steps:

  1. Calls Parser#createExpense(fullCommand) to get an Expense object expense;
  2. Calls transactions#addTransaction(expense, category) to add expense to transactions;
  3. Calls storage#saveTransactions(transactions) to save all transactions to text file;
  4. Calls ui#printAddTransaction(transactions) to print out the details of expense.

The following sequence diagram shows the object interactions when the MoneyTracker object calls the execute method of the AddExpenseCommand object:
AddExpenseSequenceDiagram

The following activity diagram shows what happens when a user executes an add expense command:
AddExpenseActivityDiagram

Design of Command Component: List, ListCategory

How the architecture components interact with each other

The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command list /cSalary.

The Class Diagram below shows how the components interact with each other for the scenario where the user issues the command list /cSalary.

The Command Component: List, ListCategory

Implementation of Command Component: List, ListCategory

[Enhanced] list feature

Enhanced Implementation

The enhanced list feature was implement for ListCommand. It extends ListCommand with more flexibility and variety. The users can enter the list command to filter the result as what they require such as list by income category, by expense category, by year month, by type. Also, the order of filter condition is flexible.

These operations are exposed in the ListCommand() class.

The following sequence diagram shows how the list operation works:

The following activity diagram summarizes what happens when a user executes a list command:

Design consideration:

Aspect: How to check the list command rules

Design of Command Component: report / report MONTH

How the architecture components interact with each other

The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command report / report MONTH.

The Class Diagram below shows how the components interact with each other for the scenario where the user issues the command report / report MONTH.

Implementation of Command Component: report / report MONTH

This section describes some noteworthy details on how certain features are implemented.

[Enhanced] report / report MONTH feature

Enhanced Implementation

The enhanced list feature was implement for ReportCommand. It extends ReportCommand with more flexibility and variety. The users can enter the report command to review the result as what their transactions detail such as month total expense , month total income, highest transactions by income / expense, highest category by income / expense category, highest frequency category by income / expense category. Also, the last six months transactions report by income / expense.

These operations are exposed in the ReportCommand() class.

Design consideration:

Aspect: How to check match every transactions to correct categories and generate the result with descending order.

Implement of Function: Summary

How the architecture components interact with each other

The Sequence Diagram below shows how the components interact with each other for the scenario where the user start the program and get the Expense Summary.

When the program started the Transaction will load the data store in data folder and put in arraylist, the Summary class will take the data from Transaction and use LocalDate libary to check if the data is within the Month. After take all the expense/income in the same month the Ui class will use printSummary function to display the monthly income/expense on welcome page.

These operations are exposed in the Summary class.

Design consideration:

Aspect: How to confirm the transaction in same month.

Product scope

Target user profile

This app targets young working adults in Singapore who are living on a tight budget and would like to have better insight into their spending habits.

Value proposition

This app allows users to track their incomes and expenses. This helps them to stay within their budget and make timely adjustments to their spending habits when necessary.

User Stories

Version As a … I want to … So that I can …
v1.0 potential user download the app get a feel what the app can do
v1.0 potential user browse through the user guide get an overview of what are the commands available
v1.0 new user access the user guide refer to it when I forget how to use the app
v1.0 new user add an income keep track of my incomes
v1.0 new user add an expense keep track of my expenses
v1.0 new user add an income category group my incomes under this category
v1.0 new user add an expense category group my expense under this category
v1.0 new user list my incomes and expenses view all my monetary transactions
v1.0 user list my income and expense categories view all my income and expense categories
v1.0 user clear all my data start afresh with the app
v1.0 expert user list my incomes and/or expenses based on a specified month view my filtered transactions
v2.0 user view my total income and expense of the month upon app startup get an overview of my incomes and expenses
v2.0 user view a report on my incomes and expenses for a specified month get a deep insight of my incomes and expenses
v2.0 user set a monthly budget get notified when I exceed 50%, 75% and 100% of my budget
v2.0 expert user edit an income or expense category change the name of the category
v2.0 expert user edit an income or expenses change any of its parameters such as amount and date
v2.0 expert user list my incomes and/or expenses based on a specified category view my filtered transactions
v3.0 expert user view the total incomes and expenses for the past six months see the trend of my monthly incomes and expenses
v3.0 user view my upcoming transactions upon app startup know which of my transactions are due soon

Non-Functional Requirements

  1. The app should work on any mainstream OS with Java 11 or above installed.
  2. The response time for each command should not exceed 3 seconds.
  3. A user with average typing speed should be able to enter any one command within 10 seconds.
  4. After using each command for at least 3 times, a user with no cognitive disability should be able to use all the app features without having to reference the user guide.

Glossary

Instructions for manual testing

Download budget.txt, categories.txt and transactions.txt here. Go to Money Tracker’s root folder in the current computer. Create a folder named data if it does not exist. Copy the downloaded txt files to this folder.