PROJECT: guiltTrip()


Overview

Craving for a nice bowl of Mala but can’t seem to save up enough for it? guiltTrip() is the perfect platform for those aspiring to be able to afford their Mala, finally!

Summary of contributions

  • Major enhancement: added * The ability to set reminders.*

    • What it does: allows the user to receive notifications for upcoming events (such as making a future purchase) or other user-specified events.

    • Justification: This feature improves the product significantly because users will be able to keep track and better regulate their spendings.

    • Highlights: This enhancement was highly extensive to implement. Due to their stateful nature, reminders have to appropriately and efficiently respond to the wide variety of changes made to the guilTrip() databank while minimising coupling as much as possible. A efficient and more or less self contained system was required.

  • Minor enhancement:

    • TimeUtil which periodically updates the app with the current local date.

    • Implemented Add, Edit, Delete and Search functions for Wish entry class.

  • Code contributed: [Response code]

  • Other contributions: Enhancements to existing features: *Replace Time with Date class (Pull requests #84) Documentation: *Updated AboutUs Documentation. (Pull requests #37)

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.

Reminders

Add Reminder: addReminder

Adds new GeneralReminder. Format: addReminder n/<Message> [typ/<EntryType>] [l.b/<LowerBound>] [u.b/<UpperBound>] [start/<Start Date>] [end/<End Date>] [tg/<tags>]

Examples:

  • `addReminder n/Don’t be broke. l.b/10 u.b/20 start/2019/01/01 end/2019/12/30'

Set Reminder: setReminder

Sets new EntryReminder for selected Entry specified by the type and index in the corresponding list. Format: `setReminder <Reminder Index> n/<Message> p/<Period> f/<frequency>

Examples:

  • ` setReminder 1 typ/expense n/Mala p/1d f/daily '

Select Reminders : selectReminder

selectReminder

select reminder to edit.

Format: selectReminder <Reminder Index>

Example:

  • selectReminder 1

Edit Reminder : editReminder

Edits conditions of a GeneralReminder or period/ frequency of an EntryReminder selected.

User must first select a reminder to modify before he can edit said reminder.

Note that the entry type of the General reminder is not edited as the developers feel the user is more likely to create a new reminder instead of completely modifying the nature of the reminder.

Format: editReminder [n/<Message>] [l.b/<LowerBound>] [u.b/<UpperBound>] [start/<Start Date>] [end/<End Date>] [tg/<tags>] editReminder [n/<Message>] [p/<period>] [f/<frequency>]

Example:

  • editReminder n/Don’t be broke.

  • `editReminder l.b/5 u.b/10 `

  • editReminder f/monthly

Remove Condition from Reminder : 'removeCondition`

Removes condition from GeneralReminder.

User must first select a reminder to modify before he can edit said reminder. Note that the entry type of the General reminder cannot be removed.

Format: removeCondition <Reminder Index>

Example:

  • removeCondition 1

Delete Reminder : deleteReminder

Deletes the selected Reminder.

Format: deleteReminder

WishList

Add Wish : addWishlist

Adds a new item to your current wishlist

Format: addWish n/<Description> cat/<Category> amt/<Price> d/<Date>

Examples:

  • add typ/Wish n/deck mala cat/food amt/5.60 d/2019 10 28

  • add typ/Wish n/deck mala cat/food amt/5.60 d/01/01/2020

List Wish : listWish

Lists all the wishes on the main panel.

Format: listWish

Edit Wish : editWish

edit the description, date, or tags of your wishes.

Format: editWishlist <index> [n/<Description>] [cat/<Category>] [amt/<Price>] [d/<Date>] [tag/<Tag>]

Examples:

  • editWishlist 1 n/1 try the chinatown ri ri hong mala!

  • editWishlist 1 amt/20 tag/mala tag/expensive

Delete Wish : deleteWish

Deletes the item at the stated index from your current wishlist

Format: deleteWish <index>

Examples:

  • deleteWishlist 3

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.

Reminders

Implementation

The reminders implementation is facilitated by the reminder class, and heavily makes use of the observable pattern to keep track with property changes in the GuilTrip model to display messages in a timely fashion.

ReminderClassDiagram
There are 2 types of reminders. General and entry reminders.

General reminders are not tied to any specific entry, and sent the user notifications whenever an entry matching the user specified conditions is entered in the app. These specified conditions include entry type, a lower and upper quota for the entry amount, a specified time period in which an entry takes place, or a list of tags which the entry must have.

GRS
The sequence diagram above illustrates what happens when an entry fulfils all conditions in an entry.

STEP 1) When an expense is logged in to GuiltTrip.java, in addition to being stored in the Expense List, the expense is also passed into the Condition Manager, which iterates through its list of conditions to see which conditions are met by the entry.

STEP 2) Each condition makes use of a self-implemented ObservableSupport class that enables it to function as an Observable object, with the reminders being its listeners.

STEP 3) When a condition is met, it notifies the reminder it belongs to. The reminders keep track of the number of conditions met, and only when all conditions are met does it make use of ObservableSupport to notify the reminderlist about a change in its status.

STEP 4) The reminder list generates a notification corresponding to the reminder and adds it to an observable list which is displayed by the Ui.

STEP 5) The number of conditions met is reset a the end of the process so the reminders may continue to produce notifications when subsequent entries meeting the requirements are keyed into the system.

An entry reminder targets a specific expense/ income or wish. It is set to send notifications at a specified period at specified intervals before the date of the event.

ERS
The sequence diagram above illustrates what happens when an it is time for an entry reminder to send a notification.

STEP 1) This is made possible with TimeUtil, which is a singleton class with a single instance checking the local date at periodic intervals and updating its listeners (Using the ObservableSupport) of the current date.

STEP 2) All entry reminders are listeners of TimeUtil. When the updated current date equals the date to send a notification, it notifies the reminder list which generates a corresponding notification and sets the next date to notify the user.

STEP 3) Once the date of the event itself has passed, the reminder is deactivated and not saved the next time GuiltTrip is closed.

Design Considerations:

  • Alternative 1 (current method): Users must first select a reminder before they can edit or remove reminders.*

    • Pros: Easier to implement. By automatically toggling the reminder list view on when selecting a reminder, the user also will see what reminder they have selected before they proceed to make any changes. (As opposed to selecting and modifying the reminder in a single command).

    • Cons: Involves one more step. Not as efficient.

  • Alternative 2 Users commands require an index argument to indicate the reminder to modify.

    • Pros: Faster as it involves one less step. May be more convenient for users who frequently forget to first select reminder to modify.

    • Cons: Aforementioned benefits are mitigated as reminders are hidden in default GUI settings, and most users will have to open up the reminderList to know which reminder to modify anyway.