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:
-
Enhancement:
-
Increased the code coverage from 68% to 81%: (Pull request: #162)
-
-
Community:
-
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. |
|
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]
|
Examples:
-
update c/basketball n/basketball m h/Alex vh/Peter budget/700
Updatesbasketball
tobasketball m
, budget to700
and its head and vice-head toAlex
andPeter
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 ofNetball
with30.05.2018
,-200
andPurchase 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
Updatestrack
toTrack F
, its budget to500
and its head and vice-head toAlice
andJune Ong
respectively, and updates the date, amount and remarks of the 1st transaction entry to28.02.2018
,100
andFund Raising
respectively.
Viewing all the ccas' budget : budget
Opens up a Budget Book in a new window.
Format: budget [c/CCA_NAME]
Figure 4.5.6.1: Budget Window with a blank screen
Figure 4.5.6.2: Budget Window showing the transaction history of Softball
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 ofSoftball
.
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 theBudgetBook
inModel
. -
BudgetBook#commitBudgetBook()
— Saves a current version of the budget book in theVersionedBudgetBook
.
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:
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:
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.
-