ShannonWong - Project Portfolio

PROJECT: SHOCO

Overview

SHOCO is a desktop application used for the managing and planning of shopping lists and budget. Users interact with it through the use of a command-line interface (CLI) and the program is written in Java.

Summary of Contributions

Contributions to the User Guide

Shown below are the sections that I have contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

By: Team SHOCOTech

Since: Feb 2020

Creators: Tan Kok Joon, Labi Trisha Angelica Vergara, Loh Ching Wei, Joshua, Phoon Jia Juin, Wong Jin En, Shannon

Marking an item as bought: MARK

Marks an item from the list at the specified index as bought. When first added initially, the item will have the status [X] to indicate that it is un-marked. After marking the item as bought, the status of item becomes [B].

Format: MARK INDEX

Example of the usage:

  1. MARK 5
    • This marks the 5th item in your list as bought.
    • The status of the 5th item is now [B]

 

🠝 back to top

Un-marking a marked item: UNMARK

Un-marks a marked-as-bought item from the list at the specified index. After being marked as bought, the item will have the status [B] to indicate that it is marked as bought. After un-marking the marked-as-bought item, the status of the item becomes [X].

Format: UNMARK INDEX

Example of the usage:

  1. UNMARK 3
    • This marks the 3rd item in your list as not bought yet.
    • The status of the 3rd item is now [X]

Resetting a budget: RES

Resets the budget to be $0.00 for the user.

Format: RES


Contributions to the Developer Guide

Shown 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.

By: Team SHOCOTech

Since: Feb 2020

Creators: Tan Kok Joon, Labi Trisha Angelica Vergara, Loh Ching Wei, Joshua, Phoon Jia Juin, Wong Jin En, Shannon

2. Overview of the SHOCO application

The overview of the main classes in the application are shown in the class diagram below. Omitted are the classes for the features implemented, the LoadData class, WriteData class, FileUtil class and CommandLineTable class.

3.6 Mark and Unmark feature

3.6.1 Current Implementation

The mark and unmark feature is implemented using the MarkCommand and UnmarkCommand class which extends the main Command class with an index representing that of the item to be marked or unmarked as bought in the list.

The process is as follows:

  1. Duke first receives user input from Ui
  2. Duke creates a Parser object and calls its Parser#parseCommand() method to instantiate a MarkCommand / UnmarkCommand object based on the user input
  3. Duke then calls the MarkCommand#execute() / UnmarkCommand#execute() method.
  4. MarkCommand#execute() / UnmarkCommand#execute() makes a call to the ShoppingList#markAsBought() / ShoppingList#unmarkAsBought() method with the specified index.

The following sequence diagram below shows how the Mark feature (Diagram 1) and Unmark feature (Diagram 2) works. Note the Ui class is omitted in the sequence diagram to emphasise on the other classes:

Diagram 1:

alt text

Diagram 2:

alt text

3.6.2 Design Considerations
Aspect: Data structure to support the Mark and Unmark Feature

Reasons for choosing alternative 1: By having an individual class on it’s own, any bugs found in the mark and unmark feature can be found easier and therefore helps to resolve the issue more efficiently. Also, with the feature being implemented in an object-oriented style, reading and tracing the application code would be easier, thus making adding future features to the mark and unmark feature easier as well.

3.10 Reset budget feature

3.10.1 Current implementation

The reset budget feature is implemented using a ResetBudgetCommand class which extends the main Command class with a variable representing the budget amount.

The process is as follows:

  1. Duke first receives user input from the Ui class.
  2. Duke creates a Parser object and calls Parser#parseCommand() method to instantiate a ResetBudgetCommand object based on that user input.
  3. Duke then calls the ResetBudget#execute() method.
  4. ResetBudget#execute() makes a call to the Budget#resetBudget() method to set the existing budget to $0.00.

The following sequence diagram below shows how the reset budget feature works. Note the Ui class is omitted in the sequence diagram to emphasise on the other classes:

alt text

3.10.2 Design considerations
Aspect: Data structure to support the reset budget feature

Reason for choosing alternative 1: By implementing each command type in a separate class, any bugs associated with a particular functionality will not affect other functionalities that significantly. It would also make it easier for us to work in parallel.

Appendix D: Instructions for Manual Testing

Set and Reset a budget

  1. Reset the budget

    i. Test case: RES

     Expected: Budget has been reset to $0.00
    

     

    ii. Other incorrect reset budget commands to try: RES xxx (where xxx is not a number).

     Expected: An error message and the correct usage of the RES command is shown.
    

Mark and Un-mark an item

  1. Marking an item

    Assumption: there are more than 5 but less than a hundred items in the list.

    i. Test case: MARK 5

     Expected: The fifth item in the list is mark as bought, denoted as [B].
    

     

    ii. Test case: MARK -10

     Expected: An error message stating that the item does not exist in the list is shown.
    

     

    iii. Test case: MARK 100

     Expected: An error message stating that the item does not exist in the list is shown.
    

     

    iv. Other incorrect MARK commands to try: MARK xxx (where xxx is not a number).

      Expected: An error message stating to provide a single numerical index number is shown.
    

     

  2. Un-marking an item

    Assumption: there are more than 5 and less than a hundred items in the list.

    i. Test case: UNMARK 5

      Expected: The fifth item in the list is marked as not bought yet, denoted as [X].
    

     

    ii. Test case: UNMARK -10

    Expected: An error message stating that the item does not exist in the list is shown.
    

     

    iii. Test case: UNMARK 100

    Expected: An error message stating that the item does not exist in the list is shown.
    

     

    iv. Other incorrect UNMARK commands to try: UNMARK xxx (where xxx is not a number).

     Expected: An error message stating to provide a single numerical index number is shown.