View on GitHub

tp

Looi Kai Wen’s Project Portfolio Page

Project: FinanceIt

Overview

FinanceIt is an all-in-one desktop application that handles the finance tracking needs of university students who are comfortable with a CLI interface. In the application, it consists of 5 sub-application that helps student to manage their finance.

Summary of Contributions: Code management

  1. Project Management
    • Managed releases v1.0 - v-2.0 on GitHub (2 releases)
  2. Contributions to the project on RepoSense.
  3. Contributions to TP repository
    1. Report and maintenance of project issues and milestones
      1. Bug reporting: #16, #19, #3
      2. Features (ManualTracker): #24
    2. Pull Requests to TP for code contribution
      1. Functional code contributions:
        1. Dynamic Table Printer to be used for output throughout the software: #7
        2. Contributions to ManualTracker and EntryTracker feature: #28, #1
        3. Contributions to code quality and organisation: #99, #105, #70, #50
      2. Error Handling contributions: #14
      3. Logging contributions: #241, #273
      4. Code testing contributions: #240, #57, #45

Summary of Contributions: Documentation

Contributions to UG

Manual Tracker

Users can manage lists of entries, which are known as ledgers. Each list represents a single date of record.

Example If I wish to record my income and expenditures on 30 October 2020, I will use the program as follows: 1. Use Manual Tracker to create a ledger of date 20-10-03 2. Open the ledger of date 20-10-03 3. Use Entry Tracker to create entries to record the transactions for that particular date

Add ledger

Add a ledger to the record, representing a date.

Syntax

new {PARAM_TYPE} {PARAM} 
Param Type Param Param Format
/date Date of the ledger, and all the entries under that ledger. Input string of the date in YYMMDD, YY-MM-DD or YY-M-D

Example:

Remove ledger

Remove a specified ledger from the record, referenced by date or id on the list. This means that the user only need to specify one of the two param types, either /date or /id.

Syntax

delete {PARAM_TYPE} {PARAM}
Param Type Param Param Format
/date Date of the ledger, and all the entries under that ledger. Input string of the date in YYMMDD, YY-MM-DD or YY-M-D
/id Index of the ledger in the list, where the first ledger is of index 1. Input positive integer

Example:

Open ledger

Users will gain access into the entries associated with the specified ledger, referenced by date or id on the list. This means that the user only need to specify one of the two param types, either /date or /id.

Refer to Feature Entry Tracker onwards for further instructions.

Syntax

open {PARAM_TYPE} {PARAM}
Param Type Param Param Format
/date Date of the ledger, and all the entries under that ledger. Input string of the date in YYMMDD, YY-MM-DD or YY-M-D
/id Index of the ledger in the list, where the first ledger is of index 1. Input positive integer

Example:

Contributions to DG

Manual Tracker & Entry Tracker

Overview

Ledgers and Entries

In this feature, we represent the transactions incurred by the users as Entry instances. Instances of Entry class are categorised by the date of origin, which is represented by Ledger instances.

Entry instances are characterized by the following:

Ledger instances are characterized by the following:

Manual Tracker

The Manual Tracker is a feature that allows users to manage Ledgers with create, delete and open operations. Ledgers is a class that maintains a list of transactions that are recorded for a given date.

The Entry Tracker is fundamentally similar to the Manual Tracker, except it manages Entry instances instead of Ledger. Entry Tracker is initialized when a Ledger instance is “opened”, whereby the Entry Tracker facilitate the manipulation of the collection of Entry instances that are associated with that particular Ledger instance.

For the sake of brevity, this section will focus on the discussion of the Manual Tracker. The edit operation of the Entry Tracker will be discussed at the end of this section; it is sufficiently unique to Manual Tracker operations to merit detailed discussion.

The Manual Tracker is capable of executing the following states of operation:

States Operations
MAIN_MENU Go to main menu for users to choose the available operations
CREATE_LEDGER Create a ledger specified by date, and append it to ledgerList.
DELETE_LEDGER Delete an existing ledger, referenced by date or index.
OPEN_LEDGER Go to subroutine “Entry Tracker” for the entries recorded under the specified ledger.

Architecture in Context

Logic Manager and Parser

Class Function
InputParser Breaks input string by user into commandString and a sequence of paramTypes-param pairs.

The latter subsequence of the string is passed into ParamParser for further processing.

Information obtained from input parsing will be used to populate an instantiated CommandPacket instance, which will then be passed to the entity that called the parsing function.
ParamParser Process the sequence of paramTypes-param pairs and populate the paramMap in the instantiated CommandPacket instance.
ManualTracker Refer to section.
EntryTracker Omitted for brevity.

Functions with Sequence Diagrams

Entry Tracker: Edit of entries
The editing of details within the entry is performed in two phases: Entry Retrieval and Entry Edit.

  1. Phase 0: Instruction retrieval
    1. At EntryTracker.handleMainMenu(), the user’s input is registered via java.util.Scanner instance.
    2. Input is parsed by InputParser.parseInput(), and EntryTracker.packet is set to the returned CommandPacket instance.
    3. The commandString of the CommandPacket instance is evaluated, and the corresponding handle method() is executed.
      In this case, handleEditEntry() will be called.
  2. Phase 1: Entry retrieval(Sequence Diagram)
    1. At handleEditEntry(), the following processes will be executed:
      1. A singleton instance of RetrieveEntryHandler is retrieved. The input String array will be passed into retrieveEntryHandler.setRequiredParams() to set required params for a successful parse.
      2. retrieveEntryHandler.handlePacket(packet) is called to handle params in the packet.
        1. Refer to the section on Param Handling for more details pertaining to general param handling.
        2. For retrieveEntryHandler, the handleSingleParam abstract method will be implemented as shown in the following table.
        3. From EntryTracker, call entryList.getItemAtCurrIndex to retrieve the entry specified by the index set to modify earlier.

Param Handling Behavior

ParamType ParamType String Expected Param Operation Verification method
PARAM.INDEX “/index” Valid index on the list
from 1 onwards.
Call entryList.setIndexToModify()
to set index of retrieved item.
ParamChecker.checkAndReturnIndex(packet)

Sequence Diagram

  1. Phase 2: Entry edit (Sequence Diagram)
    1. Following Phase 1, the following processes will be executed:
      1. The singleton instance of EditEntryHandler is retrieved. There is no need to call EditEntryHandler.setRequiredParams() ; this command does not require params to modify. Instead, it acceps any params supplied and performs the edit accordingly.
      2. editeEntryHandler.setPacket(packet) is called to set packet.
    2. EditEntryHandler.handlePacket() is called to handle params in the packet.
      1. Refer to the section on Param Handling for more details pertaining to general param handling.
      2. For EditEntryHandler, the handleSingleParam abstract method will be implemented as shown in the following table.

Param Handling Behavior

ParamType ParamType String Expected Param Operation Verification method
PARAM.AMOUNT “/amt” Positive Double in 2 decimal places Call entryList.setAmount() to set amount ParamChecker.checkAndReturnDoubleSigned(packet)
PARAM.TIME “/time” Various format of time in string, eg. “15:00” Call entryList.setTime() to set index of retrieved item. ParamChecker.checkAndReturnTime(packet)
PARAM.INC “-i” Income entry type flag Call entryList.setEntryType(EntryType.INC) to set index of retrieved item. nil
PARAM.EXP “-e” Expense entry type flag Call entryList.setEntryType(EntryType.EXP) to set index of retrieved item. nil
PARAM.DESCRIPTION “/desc” Description in string, ‘;’ character is illegal. Call entryList.setDescription() to set index of retrieved item. ParamChecker.checkAndReturnDescription(packet)
PARAM.CATEGORY “/cat” A set of strings that corresponds with entry type Call entryList.setCategory() to set index of retrieved item. ParamChecker.checkAndReturnCategories(packet)

Sequence Diagram