Refer to the guide Setting up and getting started.
The Architecture Diagram given above explains the high-level design of the App.
Given below is a quick overview of main components and how they interact with each other.
Main components of the architecture
Main (consisting of classes Main and MainApp) is in charge of the app launch and shut down.
The bulk of the app's work is done by the following four components:
UI: The UI of the App.Logic: The command executor.Model: Holds the data of the App in memory.Storage: Reads data from, and writes data to, the hard disk.Commons represents a collection of classes used by multiple other components.
How the architecture components interact with each other
The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command delete 1.
Each of the four main components (also shown in the diagram above),
interface with the same name as the Component.{Component Name}Manager class which follows the corresponding API interface mentioned in the previous point.For example, the Logic component defines its API in the Logic.java interface and implements its functionality using the LogicManager.java class which follows the Logic interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
The sections below give more details of each component.
The API of this component is specified in Ui.java
The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, PersonListPanel, StatusBarFooter etc. All these, including the MainWindow, inherit from the abstract UiPart class which captures the commonalities between classes that represent parts of the visible GUI.
The UI component uses the JavaFx UI framework. The layout of these UI parts are defined in matching .fxml files that are in the src/main/resources/view folder. For example, the layout of the MainWindow is specified in MainWindow.fxml
The UI component,
Logic component.Model data so that the UI can be updated with the modified data.Logic component, because the UI relies on the Logic to execute commands.Model component, as it displays Person object residing in the Model.API : Logic.java
Here's a (partial) class diagram of the Logic component:
The sequence diagram below illustrates the interactions within the Logic component, taking execute("delete 1") API call as an example.
Note: The lifeline for DeleteCommandParser should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
How the Logic component works:
Logic is called upon to execute a command, it is passed to an AddressBookParser object which in turn creates a parser that matches the command (e.g., DeleteCommandParser) and uses it to parse the command.Command object (more precisely, an object of one of its subclasses e.g., DeleteCommand) which is executed by the LogicManager.Model when it is executed (e.g. to delete a person).Model) to achieve.CommandResult object which is returned back from Logic.Here are the other classes in Logic (omitted from the class diagram above) that are used for parsing a user command:
How the parsing works:
AddressBookParser class creates an XYZCommandParser (XYZ is a placeholder for the specific command name e.g., AddCommandParser) which uses the other classes shown above to parse the user command and create a XYZCommand object (e.g., AddCommand) which the AddressBookParser returns back as a Command object.XYZCommandParser classes (e.g., AddCommandParser, DeleteCommandParser, ...) inherit from the Parser interface so that they can be treated similarly where possible e.g, during testing.API : Model.java
The Model component,
Person objects (which are contained in a UniquePersonList object).Person objects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiable ObservableList<Person> that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.UserPref object that represents the user’s preferences. This is exposed to the outside as a ReadOnlyUserPref objects.Model represents data entities of the domain, they should make sense on their own without depending on other components)Note: An alternative (arguably, a more OOP) model is given below. It has a Tag list in the AddressBook, which Person references. This allows AddressBook to only require one Tag object per unique tag, instead of each Person needing their own Tag objects.

API : Storage.java
The Storage component,
AddressBookStorage and UserPrefsStorage, which means it can be treated as either one (if only the functionality of only one is needed).Model component (because the Storage component's job is to save/retrieve objects that belong to the Model)JsonAdaptedDriver to convert between the Driver model object and its JSON form.Classes used by multiple components are in the seedu.address.commons package.
This section describes some noteworthy details on how certain features are implemented.
The following sequence diagram shows how an assign operation goes through the Logic component:
Separate sequence diagram showing how the assignment of all subscribers:
The following class diagram shows the structure of the clustering logic:
The AssignCommand calls ClusterAssigner#groupIntoClusters() to get the partitioned list of lists of Persons. It will then call Model#setPerson() to edit all the Persons in the address book. The clustering logic uses GeographicalComparator, DistrictMapper and DistrictRanker to sort subscribers geographically from west to east before partitioning.
During validation, Client2Door treats two drivers as duplicates if either their names match or their phone numbers match. This business-level identity check is separate from Driver#equals(), which remains strict and requires both name and phone number to match.
The following sequence diagram shows how a deleteBox operation goes through the Logic component:
The following activity diagram summarizes what happens when a user executes a deletebox command:
A notable behaviour of DeleteBoxCommand is that if a subscriber has no remaining boxes after deletion, the subscriber is automatically deleted from the address book as well. Driver assignments are also cleared in this case.
FilterCommand supports two filtering modes: filtering by box name and filtering by assigned driver name. The mode is determined at parse time — if the d/ prefix is provided, a DriverAssignedToPersonPredicate is used; otherwise, a PersonHasBoxPredicate is used. Both are case-insensitive.
The ExportCommand generates an HTML file containing the current delivery assignments, grouped by driver.
A key constraint is that all subscribers must have an assigned driver before export can proceed. If any subscriber is missing a driver, the command fails with an error.
The following activity diagram summarizes what happens when a user executes an export command:
The proposed undo/redo mechanism is facilitated by VersionedAddressBook. It extends AddressBook with an undo/redo history, stored internally as an addressBookStateList and currentStatePointer. Additionally, it implements the following operations:
VersionedAddressBook#commit() — Saves the current address book state in its history.VersionedAddressBook#undo() — Restores the previous address book state from its history.VersionedAddressBook#redo() — Restores a previously undone address book state from its history.These operations are exposed in the Model interface as Model#commitAddressBook(), Model#undoAddressBook() and Model#redoAddressBook() respectively.
Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.
Step 1. The user launches the application for the first time. The VersionedAddressBook will be initialized with the initial address book state, and the currentStatePointer pointing to that single address book state.
Step 2. The user executes delete 5 command to delete the 5th person in the address book. The delete command calls Model#commitAddressBook(), causing the modified state of the address book after the delete 5 command executes to be saved in the addressBookStateList, and the currentStatePointer is shifted to the newly inserted address book state.
Step 3. The user executes add n/David … to add a new person. The add command also calls Model#commitAddressBook(), causing another modified address book state to be saved into the addressBookStateList.
Note: If a command fails its execution, it will not call Model#commitAddressBook(), so the address book state will not be saved into the addressBookStateList.
Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the undo command. The undo command will call Model#undoAddressBook(), which will shift the currentStatePointer once to the left, pointing it to the previous address book state, and restores the address book to that state.
Note: If the currentStatePointer is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The undo command uses Model#canUndoAddressBook() to check if this is the case. If so, it will return an error to the user rather
than attempting to perform the undo.
The following sequence diagram shows how an undo operation goes through the Logic component:
Note: The lifeline for UndoCommand should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Similarly, how an undo operation goes through the Model component is shown below:
The redo command does the opposite — it calls Model#redoAddressBook(), which shifts the currentStatePointer once to the right, pointing to the previously undone state, and restores the address book to that state.
Note: If the currentStatePointer is at index addressBookStateList.size() - 1, pointing to the latest address book state, then there are no undone AddressBook states to restore. The redo command uses Model#canRedoAddressBook() to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
Step 5. The user then decides to execute the command list. Commands that do not modify the address book, such as list, will usually not call Model#commitAddressBook(), Model#undoAddressBook() or Model#redoAddressBook(). Thus, the addressBookStateList remains unchanged.
Step 6. The user executes clear, which calls Model#commitAddressBook(). Since the currentStatePointer is not pointing at the end of the addressBookStateList, all address book states after the currentStatePointer will be purged. Reason: It no longer makes sense to redo the add n/David … command. This is the behavior that most modern desktop applications follow.
The following activity diagram summarizes what happens when a user executes a new command:
Aspect: How undo & redo executes:
Alternative 1 (current choice): Saves the entire address book.
Alternative 2: Individual command knows how to undo/redo by itself.
delete, just save the person being deleted).Target user profile:
Value proposition (Client2Door):
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As a … | I want to … | So that I can… |
|---|---|---|---|
* * * | unfamiliar user | see usage instructions | refer to instructions when I forget how to use Client2Door |
* * * | unfamiliar user | access a help page of commands (user guide) | know what each command does and how to use them |
* * * | small business owner | add a new customer with contact details, address, and subscription information | manage deliveries and customer communication |
* * * | small business owner | view current subscribers for the month | plan monthly deliveries efficiently |
* * * | small business owner | search customers by name/phone/address keyword | find details quickly during calls or delivery attempts |
* * * | small business owner | view a customer's delivery address and details | deliver orders accurately |
* * * | driver with limited road experience | open directions (Google Maps link) to my next location | reach the next stop efficiently |
* * * | small business owner | check off customers who have received their monthly box | track completed deliveries for the month |
* * * | small business owner | delete customers with expired subscriptions | keep the customer list updated each month |
* * * | CLI-lover | use keyboard commands as much as possible | reduce time wasted navigating with a mouse |
* * | new business owner | access the app with a password | protect client confidentiality and trust |
* * | small business owner | edit a customer delivery entry | correct mistakes and handle last-minute changes |
* * | small business owner | add remarks to a delivery (e.g. reason for failed delivery) | avoid repeating the same mistakes |
* * | small business owner | import and export customers and order details | avoid retyping existing data |
* * * | small business owner | assign drivers to subscribers for a delivery run | distribute deliveries across my drivers efficiently |
* * * | small business owner | export driver delivery assignments to a shareable file | send each driver their delivery list without manual copying |
* * * | small business owner | add, edit, and delete subscription boxes for a subscriber | keep each subscriber's order details accurate and up to date |
* * * | small business owner | filter subscribers by box type or assigned driver | quickly review which subscribers belong to a specific group |
* * | small business owner | group customers staying in the same block/estate/area | complete all deliveries in that area without revisiting |
* * | small business owner who prefers commands over a graphical interface | generate a route grouped by location using a single command | minimize repeated trips easily |
* * | small business owner | highlight blatantly erroneous entries | reduce administrative workload (data checking) |
* | small business owner | hide private customer details | minimize chance of someone else seeing them by accident |
* | long-time user | delete specific addresses (subscribers) | keep subscribers viewable while removing non-subscribers |
* | long-time user | view a decent-looking UI | make everyday usage less mundane while keeping information viewable |
(For all use cases below, the System is the Client2Door and the Actor is the Startup Owner, unless specified otherwise)
Use case: UC01 — Add a subscriber
MSS
Startup owner requests to add a subscriber.
Client2Door adds the subscriber to the active subscriber list.
Client2Door displays a success message and updated subscriber list.
Use case ends.
Extensions
1a. Startup owner enters an invalid command word (e.g., typo, misspelling).
1a1. Client2Door shows an error message indicating the command is invalid.
Use case ends.
1b. Startup owner enters an invalid command format (e.g., parameters issue).
1b1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
1c. Startup owner enters an invalid phone number (e.g., incorrect number of digits).
1c1. Client2Door shows invalid phone number error message.
Use case ends.
1d. Startup owner enters an invalid email address.
1d1. Client2Door shows invalid email error message.
Use case ends.
1e. Startup owner enters an invalid postal code.
1e1. Client2Door shows invalid postal code error message.
Use case ends.
1f. Startup owner adds a duplicate subscriber.
1f1. Client2Door shows duplicate subscriber error message.
Use case ends.
Use case: UC02 — Delete a subscriber
MSS
Startup owner requests to delete a subscriber at specific index in list.
Client2Door deletes the specified subscriber.
Client2Door displays success message and the updated subscriber list.
Use case ends.
Extensions
1a. Startup owner enters an invalid index.
1a1. Client2Door shows invalid index error message.
Use case ends.
1b. Startup owner enters an invalid command format (e.g., parameters issue).
1b1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
Use case: UC03 — List subscribers
MSS
Startup owner requests to list all active subscribers.
Client2Door displays all subscribers and all stored details.
Use case ends.
Extensions
1a. Startup owner enters an invalid command word (e.g., typo, misspelling).
1a1. Client2Door shows an error message indicating the command is invalid.
Use case ends.
1b. Startup owner enters an invalid command format (e.g., parameters issue).
1b1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
2a. The subscriber list is empty.
2a1. Client2Door displays no subscribers
Use case ends.
Use case: UC04 — Assign drivers to subscribers
MSS
Startup owner requests to assign drivers to subscribers.
Startup owner enters the assign command with one or more drivers, each with a name and phone number.
Client2Door validates the command and driver details.
Client2Door groups the current subscribers into clusters, with each cluster being assigned a driver.
Client2Door displays a success message and updated subscriber list.
Use case ends.
Extensions
1a. Startup owner enters an invalid command word (e.g., typo, misspelling).
1a1. Client2Door shows an error message indicating the command is invalid.
Use case ends.
2a. Startup owner enters an invalid command format (e.g., missing or malformed parameters).
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
2b. Startup owner enters an invalid driver name.
2b1. Client2Door shows an invalid name error message.
Use case ends.
2c. Startup owner enters an invalid driver phone number (e.g., incorrect number of digits).
2c1. Client2Door shows an invalid phone number error message.
Use case ends.
2d. Startup owner specifies duplicate drivers (i.e. two drivers share the same name or the same phone number).
2d1. Client2Door shows a duplicate driver error message.
Use case ends.
4a. Client2Door is unable to complete the subscriber clustering or assignment process.
4a1. Client2Door shows a failure message indicating that driver assignment failed.
Use case ends.
Use case: UC05 — View help
MSS
Startup owner requests to view the help information.
Client2Door displays the help information.
Use case ends.
Extensions
1a. Startup owner enters an invalid command word (e.g., typo, misspelling).
1a1. Client2Door shows an error message indicating the command is invalid.
Use case ends.
Use case: UC06 — Edit a subscriber
MSS
Startup owner requests to edit a subscriber.
Startup owner specifies the subscriber with the updated field(s).
Client2Door updates the subscriber details.
Client2Door displays a success message and updated subscriber list.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
2b. Startup owner provides invalid updated field value(s).
2b1. Client2Door shows an error message indicating the invalid field value(s).
Use case ends.
2c. Startup owner does not provide any field to update.
2c1. Client2Door shows an error message indicating that at least one field must be provided.
Use case ends.
Use case: UC07 — Update a subscriber remark
MSS
Startup owner requests to update a subscriber's remark.
Startup owner specifies the subscriber and the new remark.
Client2Door updates the subscriber's remark.
Client2Door displays a success message and updated subscriber list.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
2b. Startup owner enters an invalid remark (e.g., too long of a remark)
2b1. Client2Door shows an error message indicating the remark format is invalid.
Use case ends.
Use case: UC08 — Find subscribers
MSS
Startup owner requests to find subscribers by keyword.
Startup owner provides one or more keywords.
Client2Door searches for matching subscribers.
Client2Door displays the matching subscribers.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
3a. No subscribers match the keywords.
3a1. Client2Door shows an empty result list.
Use case ends.
Use case: UC09 — Update delivery status
MSS
Startup owner requests to update a subscriber's delivery status.
Startup owner specifies the subscriber and the new status.
Client2Door updates the subscriber's delivery status.
Client2Door displays a success message and updated subscriber list.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
2b. Startup owner provides an invalid delivery status.
2b1. Client2Door shows an error message indicating the status is invalid.
Use case ends.
Use case: UC10 — Filter subscribers
MSS
Startup owner requests to filter subscribers.
Startup owner provides one or more filter criteria.
Client2Door filters the subscriber list.
Client2Door displays the matching subscribers.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
3a. No subscribers match the filter criteria.
3a1. Client2Door shows an empty result list.
Use case ends.
Use case: UC11 — Add box subscriptions to a subscriber
MSS
Startup owner requests to add one or more box subscriptions to a subscriber.
Startup owner specifies the subscriber and box subscription detail(s).
Client2Door adds the box subscription(s) to the specified subscriber.
Client2Door displays a success message and updated subscriber list.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
2b. Startup owner specifies an invalid subscriber.
2b1. Client2Door shows an error message indicating the subscriber cannot be found.
Use case ends.
2c. Startup owner provides invalid box subscription detail(s).
2c1. Client2Door shows an error message indicating the box subscription detail(s) are invalid.
Use case ends.
Use case: UC12 — Edit a box subscription
MSS
Startup owner requests to edit a subscriber's box subscription.
Startup owner specifics the box and its updated field(s).
Client2Door updates the box subscription.
Client2Door displays a success message and updated subscriber list.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
2b. Startup owner specifies an invalid box.
2b1. Client2Door shows an error message indicating the box cannot be found.
Use case ends.
2c. Startup owner does not provide any field to update.
2c1. Client2Door shows an error message indicating that at least one field must be provided.
Use case ends.
Use case: UC13 — Delete box subscriptions from a subscriber
MSS
Startup owner requests to delete one or more box subscriptions from a subscriber.
Startup owner specifies the box subscription(s) to delete.
Client2Door deletes the specified box subscription(s).
Client2Door displays a success message and updated subscriber list.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
2b. Startup owner specifies a box that does not exist.
2b1. Client2Door shows an error message indicating the box cannot be found.
Use case ends.
3a. The deleted box subscription(s) were the subscriber's last remaining box subscription(s).
3a1. Client2Door deletes the subscriber from the active subscriber list.
Use case ends.
Use case: UC14 — Export delivery assignments
MSS
Startup owner requests to export delivery assignments.
Startup owner optionally provides a file path.
Client2Door generates the export file.
Client2Door displays a success message indicating the export location.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
3a. There are no delivery assignments to export.
3a1. Client2Door shows an error message indicating that export cannot be performed.
Use case ends.
3b. Client2Door is unable to generate or save the export file.
3b1. Client2Door shows an error message indicating that export failed.
Use case ends.
Use case: UC15 — Import subscribers from CSV
MSS
Startup owner requests to import subscribers from a CSV file.
Startup owner provides a CSV file.
Client2Door reads the CSV file and imports valid subscribers.
Client2Door displays a success message and updated subscriber list.
Use case ends.
Extensions
2a. Startup owner enters an invalid command format.
2a1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
2b. Startup owner provides an invalid file.
2b1. Client2Door shows an error message indicating the file is invalid.
Use case ends.
3a. The CSV file cannot be found.
3a1. Client2Door shows an error message indicating that the file cannot be found.
Use case ends.
3b. The CSV file contains invalid or duplicate rows.
3b1. Client2Door skips the invalid or duplicate rows and reports them.
Use case ends.
3c. No valid subscribers can be imported from the CSV file.
3c1. Client2Door shows a message indicating that no subscribers were imported.
Use case ends.
Use case: UC16 — Clear all subscribers
MSS
Startup owner requests to clear all subscribers.
Client2Door removes all subscribers from the active subscriber list.
Client2Door displays a success message and an empty subscriber list.
Use case ends.
Extensions
1a. Startup owner enters an invalid command word (e.g., typo, misspelling).
1a1. Client2Door shows an error message indicating the command is invalid.
Use case ends.
1b. Startup owner enters an invalid command format.
1b1. Client2Door shows an error message indicating the format is invalid.
Use case ends.
Environment Requirements
17 or above installed.Performance & Capacity Requirements
Usability & Accessibility Requirements
Data Requirements
Reliability & Error Handling
Maintainability & Extensibility
Security & Privacy
Documentation
Box: A physical subscription box to be delivered to a subscriber.
CLI (Command Line Interface): A text-based interface where users interact with the system by typing commands instead of using graphical controls.
Cluster: A group of subscribers geographically grouped together and assigned to a single driver for efficient delivery.
Delivery status: The current state of a subscriber's delivery, which can be PENDING, PACKED, or DELIVERED.
Driver: A delivery driver assigned to a cluster of subscribers for a delivery session.
Mainstream OS: A widely used operating system such as Windows, macOS, or Linux.
Postal code: A 6-digit Singapore postal code (e.g., 521123) used to identify a subscriber's delivery address.
Startup owner: The primary user of the system, typically a small business owner managing customer subscriptions and deliveries.
Subscriber: A customer with an active subscription who is expected to receive recurring deliveries.
Subscription information: Details of a subscriber's box subscription, consisting of a box name and the number of months subscribed.
Given below are instructions to test the app manually.
Note: These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.
Initial launch
Open a terminal and navigate to the folder using cd. For example:
Windows (Command Prompt):
cd C:\MyBusiness\Client2Door
java -jar Client2Door.jar
Mac / Linux (Terminal):
cd ~/Client2Door
java -jar Client2Door.jar
java -jar Client2Door.jarSaving window preferences
Resize the window to an optimum size. Move the window to a different location. Close the window.
Re-launch the app the same way as the first time.
Expected: The most recent window size and location is retained.
Adding a subscriber while all subscribers are being shown
Prerequisites: List all subscribers using the list command. Ensure there is no existing subscriber with the same details.
Test case: add n/John Doe p/91234567 e/johndoe@email.com a/Blk 123 Tampines St 11 #05-67 Singapore 521123 b/box-1:2
Expected: New subscriber is added to the list. Details of the added subscriber shown in the status message.
Test case: add n/John Doe p/91234567 e/johndoe@email.com a/Blk 123 Tampines St 11 #05-67 Singapore 521123 b/box-1:2
Expected: No subscriber is added as there is a duplicate subscriber. Error details shown in the status message. State of address book remains the same.
Other incorrect add commands to try: add, add n/John Doe, add n/John Doe p/91234567 e/invalid-email a/Blk 123 Tampines St 11 #05-67 Singapore 521123 b/box-1:2, add n/John Doe p/91234567 e/johndoe@email.com a/No postal code b/box-1:2
Expected: Similar to previous.
Editing a subscriber while all subscribers are being shown
Prerequisites: List all subscribers using the list command. At least one subscriber in the list.
Test case: edit 1 p/97777777 e/alexyeoh_new@email.com
Expected: First subscriber is updated with the new phone number and email. Updated details shown in the status message.
Test case: edit 1 r/prefers evening delivery
Expected: First subscriber's remark is updated. Updated details shown in the status message.
Test case: edit 0 p/91234567
Expected: No subscriber is edited. Error details shown in the status message. State of address book remains the same.
Other incorrect edit commands to try: edit, edit 1, edit x p/91234567, edit 1 e/invalid-email, edit 1 a/No postal code
Expected: Similar to previous.
Deleting a subscriber while all subscribers are being shown
Prerequisites: List all subscribers using the list command. At least one subscriber in the list.
Test case: delete 1
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message.
Test case: delete 0
Expected: No subscriber is deleted. Error details shown in the status message. State of address book remains the same
Other incorrect delete commands to try: delete, delete x, ... (where x is larger than the list size)
Expected: Similar to previous.
Updating a subscriber's remark while all subscribers are being shown
Prerequisites: List all subscribers using the list command. At least one subscriber in the list.
Test case: remark 1 r/leave at door and ring bell
Expected: First subscriber's remark is updated. Updated details shown in the status message.
Test case: remark 0 r/some remark
Expected: No subscriber is updated. Error details shown in the status message. State of address book remains the same.
Other incorrect remark commands to try: remark 1 no prefix, remark x r/test, remark 1
Expected: Similar to previous.
Adding one or more boxes to an existing subscriber
Prerequisites: A subscriber named Alex Yeoh exists.
Test case: addbox n/Alex Yeoh b/box-3:4
Expected: box-3 is added to Alex Yeoh with the appropriate subscription duration. Updated details shown in the status message.
Test case: addbox n/Alex Yeoh b/box-4:2 b/box-5:2
Expected: Both boxes are added to Alex Yeoh. Updated details shown in the status message.
Test case: addbox n/Unknown Person b/box-1:2
Expected: No box is added. Subscriber not found error shown.
Other incorrect addbox commands to try: addbox, addbox n/Alex Yeoh, addbox n/Alex Yeoh b/box-1, addbox n/Alex Yeoh b/:2, addbox n/Alex Yeoh b/box-1:0
Expected: Similar to previous.
Editing a box belonging to a subscriber
Prerequisites: A subscriber named Alex Yeoh exists with a box named box-1.
Test case: editbox n/Alex Yeoh b/box-1 nb/box-2
Expected: box-1 under Alex Yeoh is renamed to box-2. Updated details shown in the status message.
Test case: editbox n/Alex Yeoh b/box-1 ex/3
Expected: box-1 under Alex Yeoh has its subscription duration updated. Updated details shown in the status message.
Test case: editbox n/Alex Yeoh b/nosuchbox nb/box-2
Expected: No box is edited. Box not found error shown.
Test case: editbox n/Alex Yeoh b/box-1
Expected: No box is edited. Error details shown in the status message as no editable field is provided.
Other incorrect editbox commands to try: editbox, editbox n/Alex Yeoh, editbox n/Alex Yeoh b/box-1 ex/0, editbox n/Unknown Person b/box-1 nb/box-2
Expected: Similar to previous.
Deleting a box from a subscriber with multiple boxes
Prerequisites: A subscriber named Alex Yeoh exists with at least two boxes.
Test case: deletebox n/Alex Yeoh b/box-1
Expected: box-1 removed from Alex Yeoh. Success message shown.
Test case: deletebox n/Alex Yeoh b/box-1 b/box-2
Expected: Both boxes removed. If no boxes remain, Alex Yeoh is automatically deleted. Success message indicates subscriber was also deleted.
Test case: deletebox n/Alex Yeoh b/nosuchbox-1
Expected: No change. Box does not exist error shown.
Test case: deletebox n/Unknown Subscriber b/box-1
Expected: No change. Subscriber not found error shown.
Finding subscribers by keyword
Prerequisites: List all subscribers using the list command. Ensure there are subscribers with searchable names in the list.
Test case: find Alex
Expected: Only subscribers with name containing Alex are shown. Status message shows the number of persons listed.
Test case: find Alex Bernice
Expected: Subscribers with names containing either Alex or Bernice are shown.
Test case: find NoSuchName
Expected: No subscribers are shown. Status message indicates that 0 persons are listed.
Other incorrect find commands to try: find, find @@@
Expected: Similar to previous or format error shown in the status message.
Assigning drivers while all subscribers are being shown
Prerequisites: List all subscribers using the list command. Multiple subscribers in the list.
Test case: assign n/David Lim p/91234567 n/Priya Nair p/98765432
Expected: All subscribers are assigned to one of the provided drivers. Updated driver assignments are reflected in the list. Success message shown in the status message.
Test case: assign n/Patrick Loh p/87171717 n/Ali Chow p/88234567
Expected: Updated new driver assignments are reflected in the list. Success message shown in the status message.
Possible incorrect assign commands to try: assign, assign n/David Lim, assign p/91234567, assign n/David Lim p/000, assign n/ p/91234567
Expected: No driver assignments are made. Error details shown in the status message. State of address book remains the same.
Note: if the number of declared drivers exceed the number of subscribers, there will be a message indicating the number of excess drivers
Updating the delivery status of a subscriber
Prerequisites: List all subscribers using the list command. At least one subscriber in the list.
Test case: mark 1 packed
Expected: First subscriber's delivery status is updated to Packed. Updated details shown in the status message.
Test case: mark 1 delivered
Expected: First subscriber's delivery status is updated to Delivered. Updated details shown in the status message.
Test case: mark 0 pending
Expected: No subscriber is updated. Error details shown in the status message. State of address book remains the same.
Other incorrect mark commands to try: mark, mark 1, mark x packed, mark 1 unknownstatus
Expected: Similar to previous.
Filtering subscribers by box type or assigned driver
Prerequisites: List all subscribers using the list command. Ensure there are subscribers with at least one box type or assigned driver available for filtering.
Test case: filter box-1
Expected: Only subscribers who have box-1 are shown. Status message shows the number of matching subscribers listed.
Test case: filter d/David Lim
Expected: Only subscribers assigned to driver David Lim are shown. Status message shows the number of matching subscribers listed.
Test case: filter NoSuchBox
Expected: No subscribers are shown. Status message indicates that 0 subscribers are listed.
Other incorrect filter commands to try: filter, filter d/, filter d
Expected: Similar to previous or format error shown in the status message.
Importing subscribers from a CSV file
Prerequisites: A valid CSV file named sample.csv exists in the data folder.
Test case: import sample.csv
Expected: Valid subscribers from sample.csv are imported into the list. Status message shows how many subscribers were imported.
Test case: import missing.csv
Expected: No subscribers are imported. Error details shown in the status message. State of address book remains the same.
Other incorrect import commands to try: import, import sample, import data/sample.csv, import sample.txt
Expected: Similar to previous.
Note: The CSV file must in the correct format as described here in the User Guide!
Clearing all subscribers from the address book
Prerequisites: List all subscribers using the list command. At least a subscriber in the list.
Test case: clear
Expected: All subscribers are removed from the list. Success message shown in the status message.
Other clear commands to try: clear 123, clear abc
Expected: Similar to previous, since extraneous parameters for clear are ignored.
Exporting delivery assignments after drivers have been assigned
Prerequisites: Assign drivers first using the assign command. At least one subscriber in the list has a driver assigned.
Test case: export
Expected: A delivery_assignments.html file is generated at the default location (data folder). Success message shown in the status message with the file path.
Test case: export test.txt
Expected: No file is generated since file format is invalid. Error details shown in the status message. State of address book remains the same.
Other incorrect export commands to try: export invalidfile, export data/test, export /invalid/path/test.html
Expected: Similar to previous.
exit in the app should automatically save the current state of the address book addressbook.json in the data folder that is created in the same folder which the Client2Door.jar file is inaddressbook.json file in the data folder (e.g., set expiry date of box to be null)addressbook.json data files:{
"persons" : [ {
"name" : "Alex Yeoh",
"phone" : "87438807",
"email" : "alexyeoh@example.com",
"address" : "Blk 30 Geylang Street 29, #06-40, Singapore 123456",
"tags" : [ "friends" ],
"remark" : "Leave at doorstep",
"deliveryStatus" : "Delivered",
"driver" : null,
"boxes" : [ {
"boxName" : "box-1",
"expiryDate" : "2026-06-30"
} ]
}, {
"name" : "Bernice Yu",
"phone" : "99272758",
"email" : "berniceyu@example.com",
"address" : "Blk 30 Lorong 3 Serangoon Gardens, Singapore 123456, #07-18",
"tags" : [ "colleagues", "friends" ],
"remark" : "Ring doorbell",
"deliveryStatus" : "Pending",
"driver" : null,
"boxes" : [ {
"boxName" : "box-1",
"expiryDate" : "2026-06-30"
}, {
"boxName" : "box-2",
"expiryDate" : "2026-07-31"
} ]
}, {
"name" : "Charlotte Oliveiro",
"phone" : "93210283",
"email" : "charlotte@example.com",
"address" : "Blk 11 Ang Mo Kio Street 74, #11-04, Singapore 123456",
"tags" : [ "neighbours" ],
"remark" : "Allergic to nuts",
"deliveryStatus" : "Packed",
"driver" : null,
"boxes" : [ {
"boxName" : "box-3",
"expiryDate" : "2026-08-31"
} ]
}, {
"name" : "David Li",
"phone" : "91031282",
"email" : "lidavid@example.com",
"address" : "Blk 436 Serangoon Gardens Street 26, #16-43, Singapore 123456",
"tags" : [ "family" ],
"remark" : "Leave at riser",
"deliveryStatus" : "Delivered",
"driver" : null,
"boxes" : [ {
"boxName" : "box-4",
"expiryDate" : "2026-09-30"
} ]
}, {
"name" : "Irfan Ibrahim",
"phone" : "92492021",
"email" : "irfan@example.com",
"address" : "Blk 47 Tampines Street 20, #17-35, Singapore 123456",
"tags" : [ "classmates" ],
"remark" : "Do not ring doorbell",
"deliveryStatus" : "Delivered",
"driver" : null,
"boxes" : [ {
"boxName" : "box-5",
"expiryDate" : "2026-10-31"
} ]
}, {
"name" : "Roy Balakrishnan",
"phone" : "92624417",
"email" : "royb@example.com",
"address" : "Blk 45 Aljunied Street 85, #11-31, Singapore 123456",
"tags" : [ "colleagues" ],
"remark" : "Ask security guard for delivery",
"deliveryStatus" : "Pending",
"driver" : null,
"boxes" : [ {
"boxName" : "box-6",
"expiryDate" : "2026-11-30"
} ]
} ]
}