Loh Ching Wei, Joshua - Project Portfolio

PROJECT: SHOCO

Overview

SHOCO is a Command Line Interface (CLI) application which allows users to manage their shopping lists and budget information. It is written in Java and has about 5 kLoC.

Summary of Contributions

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.

3.2 Display feature

This feature involves displaying the shopping list and budget details to the user.

3.2.1 Current implementation

The display feature is implemented using a DisplayCommand class which extends the Command class.

The process is as follows:

  1. Duke receives user input from Ui.
  2. Duke calls Parser#parseCommand() to instantiate a DisplayCommand object based on that user input.
  3. Duke then calls DisplayCommand#execute().
  4. DisplayCommand#execute() makes a call to ShoppingList#getTotalCost() to find the cost of the items.
  5. DisplayCommand#execute() then calls Budget#getAmount() and Budget#getRemainingBudget() to find the current budget and the remaining budget.
  6. The results are then printed to console.

The following sequence diagrams below show how the display feature works. Note the Ui class is omitted to emphasise the other classes:

alt text

alt text

3.2.2 Design considerations

Aspect: Data structure to support the display feature

Reason for choosing alternative 1: With each command type having its own class, we could work better in parallel and also be able to trace functionality bugs more easily if each command class deals with its own functionality.


3.9 Clear list feature

This feature involves clearing all items in the shopping list.

3.9.1 Current implementation

The clear list feature is implemented using a ClearCommand class which extends the Command class.

The process is as follows:

  1. Duke receives user input from Ui.
  2. Duke calls Parser#parseCommand() to instantiate a ClearCommand object based on that user input.
  3. Duke then calls ClearCommand#execute().
  4. ClearCommand#execute() makes a call to ShoppingList#clearList().

The following sequence diagram below shows how the clear list feature works. Note the Ui class is omitted to emphasise the other classes:

alt text

3.9.2 Design considerations

Aspect: Data structure to support the clear list feature

Reason for choosing alternative 1: With each command type having its own class, we could work better in parallel and also be able to trace functionality bugs more easily if each command class deals with a different functionality.