This page aims to showcase my contribution to the project In-Credit-Ble done in tandem with the software engineering module (CS2103T). I will first give an introduction to In-Credit-Ble, followed by highlighting the key contributions that i have made in the application. Lastly, I will be including the relevant sections of the User Guide(UG) and Development Guide(DG) that I documented.
Overview
In-Credit-Ble is a Finance Tracker created in order to assist fellow university students who have difficulty keeping track of their daily expenses due to the multitude of micro-transactions that they encounter in their daily life. By creating a finance tracker with an intuitive and easy-to-use User Interface (UI), we hope to help these students by providing them with a hassle-free platform to manage their expenses.
In-Credit-Ble was developed by a team of five students from the National University of Singapore as part of a Software Engineering module (CS2103T). In a short span of 3 months, we understood the basic structure of a software and adapted the source code of an address book into our finance tracker application. I will be documenting my contributions to this project through the major and minor features implemented for In-Credit-Ble.
Summary of Contributions
This section will provide a summary of my contributions to In-Credit-Ble. |
Features Enhancements
Major Enhancement: Implementation of the search feature
I added the ability to find records based on name, category or dates.
What it does: The search
command allows the user to search for entries based on keyword that correspond to the
entries' name, category or date depending on the user’s choice. The total sum of money spent on all the
filtered entries of the search is also displayed to allow user to know how much money he/ she has spent on a
particular type of transaction.
Justification: In the midst of numerous entries that the user has recorded in the application, this function will allow the user to filter out certain transactions record that he/ she is interested in or wants to review. Having the total sum of money spent on these records will allow the user to have a better understanding of his/ her spending for a particular category, date or item.
Highlights: This enhancement can be triggered using the 'search' command. This feature is also expandable in filtering out different kind of records by adding additional predicates in which the user can search with (eg. Searching based on amount).
Minor Enhancement:
-
Introduced the function to add, edit or delete the
description
parameter of the entries using the already implementededit
command.-
What it does: Allows user to make changes to the description of the any of the entries that he/ she has inputted into In-Credit-Ble.
-
Justification: This functionality allow the user to make any changes to the description easily, without having the need to create a new entry. Furthermore, being able to delete the description will allow the user to remove unnecessary information shown on the record card in In-Credit-Ble so that he/ she can view his/ her transaction easier.
-
Highlights: This enhancement can be triggered using the
edit
command. In order to make changes to the description, the user can add the necessary changes after the description prefix(r/
). If the user wants to remove the description, he/ she can input the description prefix with nothing after it.
-
-
Improved the
Spend
command to take in current date by default.-
What it does: If the user does not key in the
date
field when using thespend
command, the current date will automatically be taken as thedate
instead. -
Justification: Since a transaction will usually be inputted into In-Credit_Ble on the day of the transaction, having this function allow the user to key in one less parameter when recording his/ her numerous transactions, making it easier and enticing to record his/ her transactions.
-
Highlights: This enhancement can be triggered using the
spend
command. Having this functionality will make addition of entries easier and more accurate.
-
Other Notable Contributions:
-
Enhancements to existing features:
-
Updated the restrictions for
amount
,date
to prevent the user from inputted an unwanted value for the 2 fields by accident. (Pull request: #68, #191) -
Changed all instances of person to record when adapting the address book application to the finance tracker application. (Pull request #58)
-
Wrote the automated tests for the
set
command and added additional tests forallocate
command. (Pull Request: #194)
-
-
Documentation:
-
Issue Managements:
-
Resolved issues surfaced by peers after testing the codes.
-
-
Community:
-
PR Reviews: To view the pull requests reviewed by me, click here.
-
Code Contribution
Please click on this link to see the code that I contributed to In-Credit-Ble → Code Contributions.
Contributions to the User Guide
This next section will include my contribution to the User Guide. This showcases my ability in documenting a reader-friendly User Guide that is designed for new users of In-Credit-Ble to understand the different functionality available in our application. |
I documented the edit
and search
command in the user guide. These portions highlight the functions,
usage and other relevant information about the 2 commands and is explained in ways that a new user will be able to
grasps.
1) Description of Search Command
Searching an entry based on name/category/date: search
. The total sum of money spent on all the results of the search will also be shown.
Make use of the list command to show the full list of entries again after filtering the entries using the search
command.
|
Alias: find
Format: search FLAG KEYWORD [MORE_KEYWORDS]
|
2) Description of Edit Command
Editing an entry: edit
Index refers to the index number shown in the list.
Alias: e
Format: edit INDEX [n/NAME] [$/AMOUNT] [d/DATE] [c/CATEGORY] [r/DESCRIPTION]
You can remove the description of any entries by inputting an empty parameter for description.
|
Contributions to the Developer Guide
This last section will include my contribution to the Developer Guide. It showcases my ability in writing technical documentation and also demonstrates the technical depth of my code contribution. |
Application Design
I constructed the class diagrams for the different components of the In-Credit-Ble and explained the interaction
within these components. This will allow developers who wish to contribute to our project to easily understand how our
application is designed. Due to page constraints, I will only be showing the edits that I made to the |
Logic component
API :
Logic.java
-
Logic
uses theFinanceTrackerParser
class to parse the user command. -
This results in a
Command
object which is executed by theLogicManager
. -
The command execution can affect the
Model
( adding a record). -
The result of the command execution is encapsulated as a
CommandResult
object which is passed back to theUi
. -
In addition, the
CommandResult
object can also instruct theUi
to perform certain actions, such as displaying help to the user.
Model component
API : Model.java
The Model
component,
-
stores a
UserPref
object that represents the user’s preferences. -
stores the Finance Tracker data.
-
exposes an unmodifiable
ObservableList<Record>
that can be 'observed' the UI can be bound to this list so that the UI automatically updates when the data in the list change. -
does not depend on any of the other three components.
Implementation of Search Command
I also documented the design of |
Search feature
This feature allows the user to filter out specific expenses based on keywords that correspond to the name, category or date.
This implementation is under Logic
and Model
Component.
Current Implementation
The search command uses predicates that implement the java.util.Predicate
interface. These predicates are
used to filter the records that are inputted into the finance tracker. Each of these predicates contain a List<String>
of keywords and a test()
command that is used to test if a record satisfy the conditions set in the predicate. These predicates are found in the Model
component.
Types of predicate |
Functions |
|
Filters out records by a given category |
|
Filters out records by a given date |
|
Filters out records with names that matches a keyword |
Below is the UML sequence diagram and a step-by-step explanation of an example usage scenario.
-
User enters a search command (
search -cat food
). The command is received by the UI components and the methodLogicManger#execute()
is called. -
The command is received by
FinanceTrackerParser
, which then creates aSearchCommandParser
Object and callsSearchCommandParser#parse()
method. -
Depending on the
-FLAG
that is entered by the user,SearchCommandParser
will create different predicates objects that correspond to the-FLAG
.-
If
-cat
is inputted,CategoryContainsKeywordsPredicate
will be created. -
If
-date
is inputted,DateContainsKeywordPredicate
will be created. -
If
-name
is inputted,NameContainsKeywordPredicate
will be created.
-
-
A
SearchCommand
Object with the correct predicate Object as parameter is created and returned to theFinanceTrackerParser
and then to theLogicManager
. -
LogicManager
then callsSearchCommand#execute()
, which callsModel#updateFilteredExpenseList()
method to update the predicate ofFilterList<Record>
.FilterList<Record>
now contains a new set of records which is filtered by the new predicate. -
SearchCommand
then callsgetFilteredRecordList
method to access the filtered records in anObservableList<Record>
in order to calculate the sum of the money that is spent in all the filtered records. -
Then the record list panel will show a set of records according to the keywords. A
CommandResult
is then created and returned toLogic Manager
.
Design Consideration
This feature can be implemented in different ways in terms of how the records are found.
-
Alternative 1 : Check through all records and select those with the matched keywords based on the flag.
-
Pros: Easy to implement without changing original architecture.
-
Cons: Slow. Tends to take a long time to search through large number of records.
-
-
Alternative 2 : Each time a new category/date is called when making a record, create a new list. Each of these lists will hold all the records that correspond to these category or dates.
-
Pros: Very efficient, each time the command is called, just need to retrieve the list of the wanted field.
-
Cons: Need to change the original architecture of storage to introduce storing of different list corresponding to each tag. Will take up more space if there is many different tags.
-
We have implemented Alternative 1 as we want the search function to be more dynamic and more generic to accept different kind of search in the future implementation. If we were to choose Alternative 2, the search conditions will only be restricted to category and date where it is likely for different records to have the same value (eg. same date or same category). However, it is not feasible to create a different list for every single name that is inputted into the finance tracker.