PROJECT: ClubHub


Overview

This portfolio documents my contributions to the ClubHub software engineering project, an application targeted towards University students for managing Co-Curricular Activities (CCAs). ClubHub features a centralised management system of members, finances, events and inventory. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java and has about 10 kLoC.

ClubHub is built on the code base of AddressBook-Level 4, an application used for teaching Software Engineering principles in the National University of Singapore (NUS). The project team is comprised of four Computing students, including myself. The following section gives a summary of my contributions to the project.

Summary of contributions

  • Major enhancement: Added the Item List GUI

    • What it does: The Item List GUI displays entries of items with their respective quantities and locations in a list, representing the inventory of the CCA.

    • Justification: This feature is important because it allows students to view existing and updated item entries added to the Item List.

  • Major enhancement: Added commands to manage Items in the Item List

    • What it does: These commands allow students to add, delete, and edit entries of items in the Item List. They also allow students to find specific items by typing in keywords found in item names.

    • Justification: This feature is important because it allows students to update items from their CCA inventory into the Item List. Students can then find items in the Item List quickly whenever they are needed.

  • Major enhancement: Added data storage for the Item List

    • What it does: The storage saves entries of items in the Item List into the application.

    • Justification: This feature is important because it allows students to view entries in the Item List that were recorded in previous sessions of use. The data can also be transferred from one device to another.

  • Minor enhancement: Added the ability to undo/redo all previous commands

    • What it does: This feature allows students to undo all previous commands at once. All following undo commands can then be reversed using the redoAll command. This includes all commands featured in ClubHub.

    • Justification: The ability to undo/redo all previous commands is important because it provides a convenient way for students to reverse all changes made to ClubHub in the same session of use.

  • Code contributed: [https://nuscs2113-ay1819s1.github.io/dashboard/#=undefined&search=darylnigel]

  • Other contributions:

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.

ItemList

Adding an item: addItem

Adds a item to the ItemList
Format: addItem n/ITEM_NAME q/ITEM_QUANTITY l/ITEM_LOCATION

Examples:

  • addItem n/Basketball q/7 l/Storeroom

  • addItem n/Chairs q/2 l/Clubroom

Deleting an item: deleteItem

Deletes the specified item from ItemList.
Format: deleteItem INDEX

  • Deletes the item at the specified INDEX.

  • The index refers to the index number shown in the displayed item list.

  • The index must be a positive integer 1, 2, 3, …​

Examples:

  • deleteItem 2
    Deletes the 2nd item in ItemList.

  • deleteItem 13
    Deletes the 13th item in ItemList.

Edit an item: editItem

Edits an existing item in the ItemList. Format: editItem INDEX [n/ITEM_NAME] [q/ITEM_QUANTITY] [l/ITEM_LOCATION]

  • Edits the item at the specified INDEX. The index refers to the index number shown in the displayed item list. The index must be a positive integer 1, 2, 3, …​

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

  • Existing values will be updated to the input values.

Examples:

  • editItem 2 l/Cabinet
    Edits the location of the 2nd item to be Cabinet.

  • editItem 1 n/Soccer Balls q/4
    Edits the name and quantity of the 1st item to be Soccer Balls and 6 respectively.

Increase quantity of an item: increaseItem

Increases the quantity of existing item in the ItemList. Format: increaseItem INDEX q/ITEM_QUANTITY

  • Increases the quantity of the item at the specified INDEX. The index refers to the index number shown in the displayed item list. The index must be a positive integer 1, 2, 3, …​

  • Input quantities will be added to the existing quantities.

Examples:

  • increaseItem 2 q/1
    Increases the quantity of the 2nd item by 1.

Decrease quantity of an item: decreaseItem

Decreases the quantity of existing item in the ItemList. Format: decreaseItem INDEX q/ITEM_QUANTITY

  • Decreases the quantity of the item at the specified INDEX. The index refers to the index number shown in the displayed item list. The index must be a positive integer 1, 2, 3, …​

  • Existing quantities will be subtracted by the input quantities.

  • Input quantities must be lower than the existing quantities.

Examples:

  • decreaseItem 2 q/1
    Decreases the quantity of the 2nd item by 1.

Locating items by name: findItem

Finds items whose names contain any of the given keywords.
Format: find KEYWORD [MORE_KEYWORDS]

  • The search is case insensitive. e.g Balls will match balls

  • The order of the keywords does not matter. e.g. Soccer Balls will match Balls Soccer

  • Only the name is searched.

  • Only full words will be matched e.g. Ball will not match Balls

  • Items matching at least one keyword will be returned (i.e. OR search). e.g. Soccer Balls will return Soccer Boots, Tennis Balls

Examples:

  • find Balls
    Returns balls and Soccer Balls

  • find White Soccer Balls
    Returns any item having names White, Soccer, or Balls

Listing all items : listItems

Shows a list of all items in the ClubHub.
Format: listItems

Undoing all previous commands

Restores ClubHub to the state before all previous undoable commands were executed.
Format: undoAll

Examples:

  • deleteItem 1
    deleteItem 2
    undoAll (reverses both the deleteItem 1 and deleteItem 2 commands)

Redoing all previously undone commands

Reverses all undo commands.
Format: redoAll

  • deleteItem 1
    deleteItem 2
    undo (reverses the deleteItem 2 command)
    undo (reverses the deleteItem 1 command)
    redoAll (reapplies both the deleteItem 1 and deleteItem 2 commands)

  • deleteItem 1
    redoAll
    The redoAll command fails as there are no undo commands executed previously.

  • deleteItem 1
    addItem n/Ball q/1 l/Storeroom
    undoAll (reverses the deleteItem 1 and addItem n/Ball q/1 l/Storeroom commands)
    redoAll (reapplies the deleteItem 1 and addItem n/Ball q/1 l/Storeroom commands)

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.

UndoAll/RedoAll feature

Extension of Undo/Redo feature

Step 1. The user executes many add, delete, and clear commands over a couple of hours, but decides at the end of the day that he does not want all the changes. He decides to undo all the changes by executing the undoAll command. The 'undoAll' command will call 'Model#undoAllAddressBook(), which will shift the 'currentStatePointer' to the start of the addressBookStateList, pointing it to the original address book state, and restores the address book to that state.

UndoRedoExecuteUndoAllStateListDiagram

Step 2. The user decides again that he wants all the changes after all, and decides to execute the redoAll command. Model#redoAllAddressBook() is called, shifts the currentStatePointer to the end of addressBookStateList, pointing to the furthest undone state, and restores the address book to that state.

UndoRedoExecuteRedoAllStateListDiagram

UI component

UiClassDiagram
Figure 1. Structure of the UI Component

Storage component

StorageClassDiagram
Figure 2. Structure of the Storage Component