PROJECT: Hallper


1) Overview

The purpose of this portfolio is to document the contributions I have done to the project and provide an overview of what the project is about.

This project is undertaken by myself and four other Computer Science students as part of our Software Engineering module. Titled as Hallper, our project is a desktop application specially designed for the Junior Common Room Committee (JCRC). The JCRC is a student representative body from every Hall in National University of Singapore, responsible for managing student affairs. Hallper aims to facilitate the JCRC in its day-to-day management by providing a combined platform that encompasses different functions that are mainly used by the JCRC. This allows the JCRC to carry out its duties more efficiently and systematically.

To use Hallper, the user keys in specific commands to create emails, calendar events and manage the Hall’s budget — all of the main concerns of the JCRC addressed on a single platform.

2) Summary of contributions

These are my personal contributions to the project:

  • Major enhancement 1: added the budget feature

    • What it does: It allows the user to allocate budgets to the CCAs and key in future transactions to keep track of each CCA’s spending.

    • Justification: This feature improves Hallper’s functionality where it provides an extra option to assist the user in managing finances and monitor the hall’s budget more easily. By centralising the different CCAs' spending onto a centralised platform, the user can manage hall finances in a more straightforward manner.

    • Highlights: The budget feature adds on to the existing address book and creates a separate budget book to store new information regarding the CCAs, their budget and spending. The tags used in the address book are used to link the address book and budget book together. The budget feature requires in-depth understanding of the source code as it adds and deletes CCAs and transactions, similar to adding and deleting a person in an address book.

  • Major enhancement 2: added the budget window

    • What it does: It opens up another window that displays the list of CCAs available and their transaction history.

    • Justification: This feature improves the user experience as the user can obtain the financial information of each CCA easily. The separate window allows the user to go back to the main Hallper window easily when he wants to look up for a person in the address book. The separate windows allow the user to tend to financial matters while searching for the person-in-charge concurrently.

    • Highlights: This budget window requires a deep understanding of Java FXML API, JavaFX and XML, and how they work together. It is challenging as it requires interaction with the main window.

  • Minor enhancement: added a F2 button to allow the user to switch between the budget window and the main Hallper window.

  • Code contributed: [ RepoSense ]

  • Other contributions:

    • Documentation:

      • Updated About Us: (Pull request: #1, #8, #10, #16)

      • Organised the User Guide to make it more reader friendly: #113

      • Vetted the User Guide, Developer Guide and About Us: (Pull request: #162)

    • Enhancement:

      • Increased the code coverage from 68% to 81%: (Pull request: #162)

    • Community:

      • Provided feedback for the other group’s project: (Issue: #265, #269, #270)

3) 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.

Adding a cca: create

Adds a CCA to Hallper.
Format: create n/NAME_OF_CCA budget/ALLOCATED_BUDGET

You can add in the name of the head and vice-head after you create the CCA.

undo and redo command does not apply to create.

Examples:

  • create n/Netball budget/500

  • create n/Basketball F budget/400

Updating a cca : update

Updates an existing CCA in Hallper.
Format: update c/CCA_NAME [n/NEW_CCA_NAME] [h/NAME_OF_HEAD] [vh/NAME_OF_VICE_HEAD] [budget/BUDGET] [trans/ENTRY_NUMBER] [date/DATE] [amount/AMOUNT] [remarks/REMARKS]

  • At least one of the optional fields must be provided.

  • When trans/ is included, at least one of the fields in the transaction entry must be provided. The transaction fields are date, amount and remarks.

  • Existing values will be updated to the input values.

  • The CCA specifed must exist in the Hallper.

  • The names of the head and vice head must exist in the Hallper.

  • The transaction number specified with trans/ must exist.

  • undo and redo command does not apply to update.

Examples:

  • update c/basketball n/basketball m h/Alex vh/Peter budget/700
    Updates basketball to basketball m, budget to 700 and its head and vice-head to Alex and Peter respectively.

  • update c/Netball trans/2 date/30.05.2018 amount/-200 remarks/Purchase of Equipment
    Updates the date, amount and remarks of the 2nd transaction entry of Netball with 30.05.2018, -200 and Purchase of Equipment respectively.

  • update c/track n/Track F h/Alice vh/June Ong budget/500 trans/1 date/28.02.2018 amount/100 remarks/Fund Raising
    Updates track to Track F, its budget to 500 and its head and vice-head to Alice and June Ong respectively, and updates the date, amount and remarks of the 1st transaction entry to 28.02.2018, 100 and Fund Raising respectively.

Viewing all the ccas' budget : budget

Opens up a Budget Book in a new window.
Format: budget [c/CCA_NAME]

BudgetWindowEmpty

Figure 4.5.6.1: Budget Window with a blank screen

BudgetWindowCca

Figure 4.5.6.2: Budget Window showing the transaction history of Softball

  • budget shows the list of CCAs existing in Hallper.

  • If c/ is used, the new window will open up, showing the transaction information of the CCA specified.

  • Otherwise, the new window will open up and show a blank screen until a CCA is selected from the CCA panel.

BudgetWindowCcaPanel

Figure 4.5.6.3: CCA panel of the Budget Window

The CCA specifed must exist in the Hallper.

Examples:

  • budget
    Opens up the Budget Window.

  • budget c/Softball
    Opens up the Budget Window, showing the transaction history of Softball.

4) 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.

Create Command

The create mechanism is facilitated by BudgetBook and BudgetBookStorage. When a CCA is created, it is stored in a UniqueCcaList in the BudgetBook, and in a .xml file in the local directory. It implements the following command:

  • BudgetBook#addCca(Cca toAdd) — Adds a non existing CCA into the BudgetBook in Model.

  • BudgetBook#commitBudgetBook() — Saves a current version of the budget book in the VersionedBudgetBook.

These operations are exposed in the Model interface as:

  • Model#addCca(Cca cca)

  • Model#hasCca(CcaName name)

  • Model#hasCca(Cca cca)

  • Model#commitBudgetBook()

Given below is an example usage scenario and how the create cca mechanism behaves at each step.

Step 1. The user creates a new CCA by including the CCA name and the budget allocated to the CCA.

Step 2. create command checks for existing CCA name using BudgetBook#hasCca(Cca toAdd). If a CCA with the same name exists, the CCA is not created. Otherwise, it is added into the BudgetBook in the Model.

Step 3. BudgetBook#addCca(Cca cca) then invokes ModelManger#indicateBudgetBookChange() to raise a BudgetBookChangedEvent, which is handled by EventsCenter.

Step 4. BudgetBookChangedEvent is then handled by StorageManager#handleBudgetBookChangedEvent(BudgetBookChangedEvent event). StorageManager#saveBudgetBook(ReadOnlyBudgetBook data) is then called to update the existing ccabook.xml file with the new CCA.

The following sequence diagram shows how the create operation works:

CreateCcaCommandSequenceDiagram

Figure 4.4.1.1: Sequence diagram for create command

Budget Command

The budget mechanism is facilitated by BudgetBook and BudgetBookStorage. It opens up a separate window to display the CCA information and its transaction history. It implements the following command:

  • `EventsCenter#getInstance() — Gets the instance of the EventsCenter.

  • `EventsCenter#post(E event) — Posts an event to the event bus.

Given below is an example usage scenario and how the budget mechanism behaves at each step.

Step 1. The user enters the budget command with or without a specified CCA.

Step 2. When a CCA is specified, BudgetCommand(CcaName ccaName) is called. Otherwise, BudgetCommand() is called and the CcaName is null.

Step 3. If the CCA is specified, the budget command checks whether the CCA specified exist.

Step 4. budget command then raises a ShowBudgetViewEvent, which is handled by EventsCenter.

Step 5. ShowBudgetViewEvent is handled by MainWindow#handleShowBudgetEvent(ShowBudgetViewEvent event) and invokes MainWindow#handleBudget(CcaName ccaName). This opens the budget window through BudgetWindow#show(CcaName ccaName).

Step 6. It then checks whether the CCA name is present in BudgetWindow#fillInnerParts(CcaName ccaName). If CCA name is present, BudgetBrowserPanel(ccaName) is called and the specified CCA information will be displayed. Otherwise, BudgetBrowserPanel() will be called and a blank page will be showed.

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

BudgetCommandActivityDiagram

Figure 4.4.1.4: Activity diagram for budget command

Design Considerations

Aspect: Choice of local storage format
  • Alternative 1 (current choice): Saves in .xml format.

    • Pros: Easy to create, understand, move and translate into other environments. International data standard for storing information.

    • Cons: Parsing XML software is slow and cumbersome. Uses large amounts of memory due to the verbosity and incurs cost of parsing large XML files.

  • Alternative 2: Save in .json format.

    • Pros: Faster in parsing information as compared to .xml.

    • Cons: JSON has no error handling. Therefore when the code fails to insert information, the code will not throw any error.