Project: FoodZoom


Hello there! I am Monika Manuela Hengki, a Computer Science student in National University of Singapore. I like building useful things that can help improve other people’s lives. Below you can find some of my contributions to one of my projects.

Overview

FoodZoom is a food delivery management desktop application for food businesses to streamline their delivery process. FoodZoom is responsive and quick as users interact with the application by typing the commands (using Command Line Interface). FoodZoom allows managers to plan order delivery routes and dispatch them to deliverymen available. Deliverymen can also quickly view their assigned delivery routes and increase their efficiency. FoodZoom is built by me and 4 other Computer Science students.

Ui
Figure 1. FoodZoom Home Page

Summary of Contribution


Given below are contributions that I made to this application.

  • Major enhancement: added the ability to assign orders to a deliveryman.

    • What it does: It allows the manager to assign multiple orders to a deliveryman. Subsequently, the order status changes from PENDING to ONGOING, which means that it can no longer be edited or reassigned to another deliveryman.

    • Justification: This feature streamlines the food delivery process as the manager can assign orders to be delivered by their deliverymen conveniently.

    • Highlights: The implementation was challenging as it required two-way association between the order and the deliveryman.

  • Minor enhancements:

    • Improved checking for the date of the order to prevent invalid dates.

    • Modified command words of some commands to unify the patterns.

  • Code contributions: RepoSense

  • Other contributions:

    • Project management:

      • Helped with the issue tracking using labels and assignees on Github.

    • Documentation:

      • Updated README file to add descriptions of the application with relevant pictures (Pull requests #3)

      • Updated User Guide and Developer Guide for the features I added

    • Community:

Contributions to User Guide

Given below are some of my contributions to the User Guide. They showcase my ability to write clear documentation targeting end-users.

Assign orders to a delivery man : /assign [Since v1.3]

Lets you assign multiple orders to a delivery man
Format: /assign d/DELIVERYMAN_INDEX o/ORDER_INDEX

  • Assigns orders at the specific ORDER_INDEX to the delivery man at the DELIVERYMAN_INDEX

  • There must be at least 1 order and 1 delivery man.

  • Add more than 1 orders by specifying more tags. e.g. o/1 o/2 o/3.

  • Orders that are Ongoing or Completed cannot be reassigned.

  • No more than 5 can be assigned to a deliveryman at one time.

Examples:

  • /order list
    /deliveryman list
    /assign d/2 o/1 o/2
    Assigns order number 1 and 2 to delivery man number 2.

Before the command is executed, the order status is Pending and the delivery man is available:

assign before
Figure 2. Before /assign command is executed

After the command is executed, the order status changes to Ongoing and the delivery man has 2 assigned orders:

assign after
Figure 3. After /assign command is executed successfully

Creating a new route: /route create [Deprecated since v1.2.1]

Creates a route with a set of orders
Format: /route create o/ORDER_ID

  • All fields need to have at least a value. e.g. o/ is not allowed.

  • Able to add more than 1 orders by specifying more tags. e.g. o/1 o/2 o/3.

Examples:

  • /route create o/1 o/3

Contributions to Developer Guide

Given below are some of my contributions to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Assign feature

Current Implementation

The /assign command allows assigning of multiple orders to a delivery man in FoodZoom.

The following sequence diagram shows the sequence flow from the LogicManager to the ModelManager when a user enter a /assign command:

AssignCommandSequenceDiagram1

Figure 3.7.1.1 Sequence diagram to illustrate Logic component interactions for /assign command.

AssignCommandSequenceDiagram2

Figure 3.7.1.2 Sequence diagram to illustrate Logic and Model component interactions for route create command.

From the sequence diagram:

  1. When LogicManager receive the execute command, it calls the parseCommand method in OrderBookParser.

  2. OrderBookParser will receive /assign as the command and instantiate AssignCommandParser to further parse the command.

  3. If the arguments specified in the /assign command are valid, a AssignCommand will be created and return back to the LogicManger

  4. LogicManager will proceed to call the execute command of AssignCommand

  5. AssignCommand will proceed to call the getFilteredOrderList and getFilteredDeliverymanList method of Model

  6. Iterate through the orderIds, if valid, add the order corresponding to that index to the set of Order.

  7. Create a new Deliveryman to be assigned from the deliveryman corresponding to the deliveryman index.

  8. Iterate through the orders, call setDeliveryman.

  9. A new route would be added and create a new CommandResult to be returned.

Design Consideration

Aspect: Relationship between Order and Deliveryman
  • Alternative 1 (current choice): Two way associations between the Order and Deliveryman

    • Pros: Performing update operations such as assigning orders or marking orders as completed and displaying information on each order and delivery man are more effective as they are aware of one another.

    • Cons: More complicated to implement the assigning of order, and subsequently other features regarding this relationship such as removing of order.

  • Alternative 2: Only the Deliveryman is aware of the Order

    • Pros: Easier to implement the feature and manage the order and deliveryman states.

    • Cons: Performing the update operations mentioned above will be ineffective, and it will be more difficult to display information on which delivery man an order is assigned to.

Create Route Feature [deprecated since v1.2.1]

This feature is deprecated as there was a design change regarding the relationship between delivery man and order. Previously, route was the middleman between delivery men and orders. Now, delivery men and orders are directly related. Route is removed as its existence will complicate implementations of other features without adding much benefit.

Current Implementation

The create route command allows creation of routes in FoodZoom. It allows creating routes based on the order ids.

The following sequence diagram shows the sequence flow from the LogicManager to the ModelManager when a user enter a /route create command:

CreateRouteCommandSequenceDiagram1

Figure 3.6.1.1 Sequence diagram to illustrate Logic component interactions for route create command.

CreateRouteCommandSequenceDiagram2

Figure 3.6.1.2 Sequence diagram to illustrate Logic and Model component interactions for route create command.

From the sequence diagram:

  1. When LogicManager receive the execute command, it calls the parseCommand method in OrderBookParser.

  2. OrderBookParser will receive /route as the command and instantiate RouteCommandParser to further parse the command.

  3. If the arguments specified in the create command are valid, a CreateRouteCommand will be created and return back to the LogicManger

  4. LogicManager will proceed to call the execute command of CreateRouteCommand

  5. CreateRouteCommand will proceed to call the getFilteredOrderList method of Model

  6. Iterate through the orderIds, if valid, add the Index and the corresponding Order to the set of Index and Order respectively.

  7. Create a Route from the set of Order

  8. A new route would be added and create a new CommandResult to be returned.

Design Consideration

Aspect: Implementation of CreateRouteCommandParser
  • Alternative 1 (current choice): RouteCommandParser is parsed first, then pass to CreateRouteCommandParser

    • Pros: Better modularization for Route commands, better cohesion, adheres to the Single Responsibility Principle.

    • Cons: More complicated file & package structure.

  • Alternative 2: CreateRouteCommand is parsed straight from OrderBookParser.

    • Pros: Easier to manage the file structure.

    • Cons: Poor modularization of the Command classes.