Project Origin: This project builds on the AddressBook-Level3 project, originally created by the SE-EDU initiative.
Libraries Utilized:
AI Assistance: The SellSavvy logo was generated with ChatGPT 4.0.
References to Other Team Projects (TPs):
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 deletecustomer 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
, CustomerListPanel
, OrderListPanel
, 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 Customer
and Order
objects 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("deletecustomer 1")
API call as an example.
Note: The lifeline for DeleteCustomerCommandParser
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. DeleteCustomerCommandParser
) and uses it to parse the command.Command
object (more precisely, an object of one of its subclasses e.g. DeleteCustomerCommand
) which is executed by the LogicManager
.Model
when it is executed (e.g. to delete a customer).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. AddCustomerCommandParser
) which uses the other classes shown above to parse the user command and create a XYZCommand
object (e.g. AddCustomerCommand
) which the AddressBookParser
returns back as a Command
object.XYZCommandParser
classes (e.g. AddOrderCommandParser
, DeleteCustomerCommandParser
, ...) inherit from the Parser
interface so that they can be treated similarly where possible e.g, during testing.API : Model.java
The Model
component,
Customer
objects (which are contained in a UniqueCustomerList
object).Customer
objects (e.g. results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiable ObservableList<Customer>
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.Customer
whose orders will be displayed in a ReadOnlyObjectWrapper<Customer>
which is exposed to outsiders as an unmodifiable ReadOnlyObjectProperty<Customer>
that can be 'observed' e.g. the UI can be bound to this object property so that the UI automatically updates when selected customer change.
Customer
stores the currently 'selected' Order
objects (e.g. results of a filter query) as a separate filtered list which is exposed to outsiders as an unmodifiable ObservableList<Order>
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 Customer
references. This allows AddressBook
to only require one Tag
object per unique tag, instead of each Customer
needing their own Tag
objects.
API : Storage.java
The Storage
component,
AddressBookStorage
and UserPrefStorage
, 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
)Classes used by multiple components are in the seedu.sellsavvy.commons
package.
This section describes some noteworthy details on how certain features are implemented.
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 deletecustomer 5
command to delete the 5th customer in the address book. The deletecustomer
command calls Model#commitAddressBook()
, causing the modified state of the address book after the deletecustomer 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 addcustomer n/David …
to add a new customer. The addcustomer
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 customer 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 listcustomer
. Commands that do not modify the address book, such as listcustomer
, 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 addcustomer 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.
deletecustomer
, just save the customer being deleted).Target user profile:
Value proposition: For small independent sellers, organizing customer lists can be challenging. SellSavvy offers a centralized platform to store orders and track deliveries, streamlining drop-shipping management. SellSavvy is optimized for tech-savvy fast-typing users through command-line interface and efficient functionalities.
Priorities: High (must have) - * * *
, Medium (nice to have) - * *
, Low (unlikely to have) - *
Priority | As a … | I want to … | So that I can… |
---|---|---|---|
* * * | user | add new customers with details such as name and address | remember details of customers for order deliveries |
* * * | user | add orders made by a customer | keep track of orders made by each customer |
* * * | user | add details to orders, such as delivery date and quantity | remember details of orders when making deliveries |
* * * | user | mark orders as completed | keep track of orders that have been delivered |
* * * | user with many customers | delete a customer from my address book | remove clients who I no longer need to be in contact with |
* * * | user with many customers | view all my customer contacts | see an overview of all my customers' details |
* * * | user with many orders | view all orders under a specific customer | see an overview of all orders made by a customer |
* * * | user with many orders | delete an order under a customer | remove orders that I no longer need to track |
* * * | user with many orders | revert an order's completed status | keep track of erroneous or failed order deliveries |
* * | tech-savvy user | save data to local storage | keep my data even after exiting SellSavvy |
* * | tech-savvy user | load data from local storage | access my local data using SellSavvy |
* * | experienced user | edit a customer's details | keep the customers' information up-to-date |
* * | experienced user | edit an order's details | keep the orders' information up-to-date |
* | experienced user | find a customer by name | search for a specific customer's details |
* | experienced user | filter orders by their status | see which orders are completed or have yet to be delivered |
* | inexperienced user | be informed a customer already made an identical order | take note of duplicate orders made by the same customer |
* | inexperienced user | be informed if a new order's delivery date has passed | take note of erroneous creation of historical orders |
For all use cases, the system is SellSavvy and the actor is the user.
Use case 1: View List of Customers
MSS
Use case ends.
Use case 2: Add a Customer
MSS
Use case ends.
Extensions
1a. SellSavvy detects that there are required parameters missing.
Use case ends.
1b. SellSavvy detects that there is a parameter not satisfying its constraints.
Use case ends
1c. SellSavvy detects that a customer with identical name already exists.
Use case ends.
2a. SellSavvy detects that there is an existing customer with a similar name.
Use case resumes from step 3.
2b. SellSavvy detects that the new customer has tags with similar names.
Use case resumes from step 3.
Use case 3: Delete Customer and All Orders Related to The Customer
MSS
Use case ends.
Extensions
2a. SellSavvy detects customer index is missing or non-positive.
Use case ends.
2b. SellSavvy detects that there are no customers with the specified index.
Use case ends.
3a. The deleted customer's order list is being displayed.
Use case resumes from step 4.
Use case 4: Find the Customer by their Name
MSS
Use case ends.
Extensions
1a. SellSavvy cannot find any customers with at least one matching keyword.
Use case ends.
Use case 5: Edit a Customer's Details
MSS
Use case ends.
Extensions
2a. The customer index is missing or non-positive.
Use case ends.
2b. SellSavvy detects that there are no customers with the specified index.
Use case ends.
2c. There are no customer details specified for modification.
Use case ends.
2d. SellSavvy detects that the updated fields do not satisfy its constraints.
Use case ends
2e. SellSavvy detects that a customer with identical name already exists.
Use case ends.
3a. SellSavvy detects that the new name of the customer is similar to that of an existing customer.
Use case resumes from step 4.
3b. SellSavvy detects that there are tags with similar names among the updated tags.
Use case resumes from step 4.
Use case 6: Add an Order under a Customer
MSS
Use case ends.
Extensions
2a. SellSavvy detects that the required parameters are missing or the customer index is non-positive.
Use case ends.
2b. SellSavvy detects that there is a parameter not satisfying its constraints.
Use case ends.
2c. SellSavvy detects that there are no customers with the specified index.
Use case ends.
3a. SellSavvy detects that there is an existing pending order under the customer with similar details.
Use case resumes from step 4.
Use case 7: List a Customer's Orders
MSS
Use case ends.
Extensions
2a. SellSavvy detects that the customer index is missing or non-positive.
Use case ends.
2b. SellSavvy detects that there are no customers with the specified index.
Use case ends.
2c. There are no orders under the specified customer.
Use case ends.
Use case 8: Mark Order as Completed
MSS
Use case ends.
Extensions
2a. SellSavvy detects that the order index is missing or non-positive.
Use case ends.
2b. The specified order is already marked as "Completed".
Use case ends.
2c. There are no orders with the specified index.
Use case ends.
Use case 9: Remove "Completed" Marking from Order
MSS
Use case ends.
Extensions
2a. SellSavvy detects that the order index is missing or non-positive.
Use case ends.
2b. The specified order is not marked as “Completed” in the first place.
Use case ends.
2c. There are no orders with the specified index.
Use case ends.
Use case 10: Delete an order
MSS
Use case ends.
Extensions
2a. SellSavvy detects that the order index is missing or non-positive.
Use case ends.
2b. There are no orders with the specified index.
Use case ends.
Use case 11: Edit an Order's Details
MSS
Use case ends.
Extensions
2a. The order index is missing or non-positive.
Use case ends.
2b. SellSavvy detects that there are no orders with the specified index.
Use case ends.
2c. There are no order details specified for modification.
Use case ends.
2d. SellSavvy detects that the updated fields do not satisfy its constraints.
Use case ends
3a. SellSavvy detects that the updated order has similar details to another existing order under the same customer.
Use case resumes from step 4.
Use case 12: Filter order list by order status
MSS
Use case ends.
Extensions
1a. The status keyword is missing or invalid.
Use case ends.
1a. There are no orders with the specified status.
Use case ends.
17
or above installed.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
Download the jar file and copy into an empty folder.
Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimal.
Saving window preferences
Resize the window to an optimal size. Move the window to a different location. Close the window.
Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
Saving changes in data
Prerequisites: Has at least 1 customer listed using listcustomer
in the GUI.
Add an order under a customer using the addorder
command.
Example: addorder 1 i/Lamp d/20-11-2024 q/3
Expected: Order added under the first customer in the customer list and all his orders will be displayed.
Re-launch the app by double-clicking the jar file.
Expected: The newest order added is retained.
Note: Some of the test cases may depend on previous test cases, especially those on testing customers with duplicate/similar names. You are advised to follow the test cases in order.
Tips: All the prerequisites below will be fulfilled if you start off with the default sample data and follow the test cases in sequence.
Adding a unique customer with all parameters specified.
Prerequisites: Customer with name John Doe
or other similar names does not already exist in the address book.
Test case: addcustomer n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney
Expected: The customer is successfully added. Details of the added customer shown in the status message.
Adding a unique customer with all parameters specified using the command alias.
Prerequisites: Customer with name Betsy Crowe
or other similar names does not already exist in the address book.
Test case: addc n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal
Expected: The customer is successfully added. Details of the added customer shown in the status message.
Adding a customer with an identical name.
Prerequisites: Customer with name Betsy Crowe
already exists in the address book.
Test case: addcustomer n/Betsy Crowe t/friend e/betsycrowe@duplicate.com a/Newgate Prison p/12345678 t/criminal
Expected: No customer is added. Error details shown in the status message. Status bar remains the same.
Adding a customer with a similar name and without the optional tag
field.
Prerequisites: Customer with name Betsy Crowe
but not Betsy crowe
already exist in the address book.
Test case: addcustomer n/Betsy crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567
Expected: The customer is successfully added. A warning and details of the added customer shown in the status message.
Adding a customer with duplicate tags.
Prerequisites: Customer with name Yu Sutong
or other similar names does not already exist in the address book.
Test case: addcustomer n/Yu Sutong t/vvip t/vvip e/su@example.com a/Newgate Prison p/12345678
Expected: The customer is successfully added with one of the duplicated tags ignored. Details of the added customer shown in the status message.
Adding a customer with similar tags.
Prerequisites: Customer with name Foo Chao
or other similar names does not already exist in the address book.
Test case: addcustomer n/Foo Chao t/VVIP t/vvip e/su@example.com a/69, Sembawang Road. #01-01 p/12345678
Expected: The customer is successfully added with both similar tags accepted. A warning and details of the added customer shown in the status message.
Adding a customer with missing compulsory field.
Test case: addcustomer n/Lim Kai Xuan e/su@example.com a/69, Sembawang Road. #01-01
Expected: No customer is added. Error details shown in the status message. Status bar remains the same.
Test case: addcustomer n/Lim Kai Xuan e/su@example.com p/12345678
Expected: No customer is added. Error details shown in the status message. Status bar remains the same.
Listing all customers with or without aliasing.
Test case: listcustomer
Expected: All customers are listed. A success message shown in the status message.
Test case: listc
Expected: All customers are listed. A success message shown in the status message.
Finding customers with one keyword.
findcustomer bernice
bernice
in their names are listed. A success message shown in the status message.Bernice Yu
will be listed in the customer list.Finding customers with multiple keywords using the command alias.
findc alex david
alex
or david
in their names are listed. A success message shown in the status message.Alex Yeo
and David Li
will be listed in the customer list.Finding customer who does not exist in the address book.
Prerequisites: Customer with name containing khengyang
(case-insensitive) does not exist in the address book.
Test case: findcustomer khengyang
Expected: No customers listed. A success message shown in the status message. A message informing user that no related customers are found is shown in the customer list.
Editing a customer while all customers are being shown.
Prerequisites: All customers are listed using the listcustomer
command with at least 1 customer listed.
Test case: editcustomer 1 p/91234567 e/johndoe@example.com
Expected: The customer is successfully edited. Details of the edited customer shown in the status message.
Editing a customer in a filtered list using the command alias.
Prerequisites: Customers filtered using findcustomer
command with at least 1 customer listed.
Example: findcustomer john
Test case: editc 1 n/Betsy Crower t/
Expected: The customer is successfully edited with all tags removed. Details of the edited customer shown in the status message. The displayed customer list becomes unfiltered and all customers are displayed.
Editing a customer to an exact same name as an existing customer.
Prerequisites:
Betsy Crowe
already exist in the address book.Betsy Crowe
.Test case: editcustomer 1 n/Betsy Crowe
Expected: No customer is edited. Error details shown in the status message. Status bar remains the same.
Editing a customer to have a name similar to an existing customer.
Prerequisites:
Betsy Crowe
but not betsy crowe
already exist in the address book.Betsy Crowe
.Test case: editcustomer 1 n/betsy crowe
Expected: The customer is successfully edited. A warning and details of the edited customer shown in the status message.
Editing a customer to have duplicate tags.
Prerequisites: At least one customer is listed.
Test case: editcustomer 1 t/friends t/friends
Expected: The customer's tags is successfully edited with one of the duplicated tags ignored. Details of the edited customer shown in the status message.
Editing a customer to have similar tags.
Prerequisites: At least one customer is listed.
Test case: editcustomer 1 t/Friends t/friends
Expected: The customer is successfully edited with both similar tags accepted. A warning and details of the added customer shown in the status message.
Editing a customer with invalid inputs.
Prerequisites: At least one customer is listed.
Test case: editcustomer 1 n/@#$%
Expected: No customer is edited. Error details shown in the status message. Status bar remains the same.
Deleting a customer while all customers are being shown.
Prerequisites: List all customers using the listcustomer
command with at least 1 customer listed.
Test case: deletecustomer 1
Expected: First customer is deleted from the list. Details of the deleted customer shown in the status message.
Test case: deletecustomer 0
Expected: No customer is deleted. Error details shown in the status message. Status bar remains the same.
Other incorrect deletecustomer
commands to try: deletecustomer
, deletecustomer x
, ...
(where x is larger than the list size)
Expected: Similar to previous.
Deleting a customer from a filtered customer list using the command alias.
Prerequisites: Prerequisites: Customers filtered using findcustomer
command with at least 1 customer listed.
Example: findcustomer john
Test case: deletec 1
Expected: First customer is deleted from the list. Details of the deleted customer shown in the status message.
Test case: deletec 0
Expected: No customer is deleted. Error details shown in the status message. Status bar remains the same.
Note: Some of the test cases may depend on previous test cases, especially those on testing orders with duplicate/similar names. You are advised to follow the test cases in order.
Adding a unique order with all parameters specified while all customers is being shown.
Prerequisites:
listorder 1
command with at least 1 order listed.Test case: addorder 1 i/Lamp d/20-11-2024 q/3
Expected: The order is successfully added. Details of the added order shown in the status message. All orders associated with the customer are shown in the order list.
Adding a unique order with optional field omitted using the command alias when the customer list is filtered.
Prerequisites: Prerequisites: Customers filtered using findcustomer
command with at least 1 customer listed.
Example: findcustomer bernice
Test case: addo 1 i/Books d/02-03-2026
Expected: The order is successfully added with default quantity of 1
. Details of the added order shown in the status message. All orders associated with the customer are shown in the order list.
Adding an order with missing compulsory field(s).
Prerequisites: At least 1 customer is displayed in the customer list.
Test case: addorder 1 i/books
Expected: No order is added. Error details shown in the status message. Status bar remains the same.
Test case: addo 1 q/100
Expected: No order is added. Error details shown in the status message. Status bar remains the same.
Adding a similar order.
Prerequisites:
Test case: addo 1 i/books d/02-03-2026
Expected: The order is successfully added. A warning and details of the added order shown in the status message. All orders associated with the customer are shown in the order list.
Adding an order with delivery date elapsed.
Prerequisites:
Test case: addo 1 i/phone d/02-03-2020
Expected: The order is successfully added. A warning and details of the added order shown in the status message. All orders associated with the customer are shown in the order list
Listing all orders with or without aliasing.
Prerequisites: At least 2 customers and at most 99 customers is displayed in the customer list.
Test case: listorder 1
Expected: All orders under the first customer are listed. A success message shown in the status message.
Test case: listo 2
Expected: All orders under the second customer are listed. A success message shown in the status message.
Test case: listo 100
Expected: No change to the order list. Error details shown in the status message. Status bar remains the same.
Filtering order list to display all pending
orders.
Prerequisites: All orders under a customer are listed using the listorder
command with at least 1 order listed.
Example listorder 1
.
Test case: filterorder pending
Expected: Only pending orders remain in the order list. A success message shown in the status message.
Filtering order list to display all completed
orders using the command alias.
Prerequisites: All orders under a customer are listed using the listorder
command with at least 1 order listed.
Example listorder 1
.
Test case: filterorder completed
Expected: Only completed orders remain in the order list. A success message shown in the status message.
Editing an order while all orders under a customer are being shown.
Prerequisites: All orders under a customer are listed using the listorder
command with at least 1 order listed.
Example: listorder 1
Test case: editorder 1 i/Light bulb d/21-11-2025
Expected: The order is successfully edited. Details of the edited order shown in the status message.
Editing an order in a filtered order list using the command alias.
Prerequisites: Orders filtered using filterorder
command with at least 1 order listed.
Example: filterorder pending
Test case: edito 2 q/22
Expected: The order is successfully edited. Details of the edited order shown in the status message.
Editing an order to a similar order.
Prerequisites:
listorder 1
command with at least 1 order listed.pending
status.Adding the similar order: addo 1 i/test d/21-11-2025 q/1
Test case: edito 1 i/test d/21-11-2025 q/1
Expected: The order is successfully edit. A warning and details of the edited order shown in the status message.
Editing an order with invalid inputs.
Prerequisites: At least one order is listed.
Test case: editorder 1 q/1 2
Expected: No order is edited. Error details shown in the status message. Status bar remains the same.
Deleting an order while all orders under a customer are being shown.
Prerequisites: List all orders using the listorder 1
command with at least 1 order listed.
Test case: deleteorder 1
Expected: First order is deleted from the list. Details of the deleted order shown in the status message.
Test case: deleteorder 0
Expected: No customer is deleted. Error details shown in the status message. Status bar remains the same.
Other incorrect deleteorder
commands to try: deleteorder
, deleteorder x
, ...
(where x is larger than the list size)
Expected: Similar to previous.
Deleting an order from a filtered list using the command alias.
Prerequisites: Orders filtered using filterorder
command with at least 1 order listed.
Example: filterorder pending
Test case: deleteo 1
Expected: First order is deleted from the list. Details of the deleted order shown in the status message.
Test case: deleteo 0
Expected: No order is deleted. Error details shown in the status message. Status bar remains the same.
Marking an order as completed while all orders under a customer are being shown.
Prerequisites:
listorder 1
command with at least 1 order listed.Completed
.Test case: markorder 1
Expected: First order is marked as completed. Details of the marked order shown in the status message.
Test case: markorder 0
Expected: No order is marked as completed. Error details shown in the status message. Status bar remains the same.
Other incorrect markorder
commands to try: markorder
, markorder x
, ...
(where x is larger than the list size)
Expected: Similar to previous.
Marking an order from a filtered list as completed using the command alias.
Prerequisites: Orders filtered using filterorder pending
command with at least 1 order listed.
Test case: marko 1
Expected: First order is marked as completed. Details of the marked order shown in the status message. The marked order will disappear from the filtered order list as it is no longer Pending
.
Test case: marko 0
Expected: No order is marked as completed. Error details shown in the status message. Status bar remains the same.
Marking an already completed order as completed.
Prerequisites:
Completed
.Test case: marko 1
Expected: No order is marked as completed. Error details shown in the status message. Status bar remains the same.
Reverting an order to pending status while all orders under a customer are being shown.
Prerequisites:
listorder 1
command with at least 1 order listed.Pending
.Test case: unmarkorder 1
Expected: First order is reverted to pending status. Details of the unmarked order shown in the status message.
Test case: unmarkorder 0
Expected: No order is reverted to pending status. Error details shown in the status message. Status bar remains the same.
Other incorrect unmarkorder
commands to try: unmarkorder
, unmarkorder x
, ...
(where x is larger than the list size)
Expected: Similar to previous.
Reverting an order from a filtered list to pending status using the command alias.
Prerequisites: Orders filtered using filterorder completed
command with at least 1 order listed.
Test case: unmarko 1
Expected: First order is reverted to pending status. Details of the unmarked order shown in the status message. The unmarked order will disappear from the filtered order list as it is no longer completed
.
Test case: unmarko 0
Expected: No order is reverted to pending status. Error details shown in the status message. Status bar remains the same.
Attempting to revert a order which currently pending.
Prerequisites:
Pending
.Test case: unmarko 1
Expected: No order is reverted to pending status. Error details shown in the status message. Status bar remains the same.
Dealing with missing/corrupted data files
Prerequisite: You have not edited the preferences.json
file. There is a folder named data
in the same directory as the jar file, and there is a addressbook.json
file in the data
folder.
Test case: Delete the addressbook.json
file. Then, run SellSavvy and exit using the exit
command.
Expected: SellSavvy should create a new addressbook.json
file with default data.
Test case: Delete the data
folder together with the addressbook.json
file. Then, run SellSavvy and exit using the exit
command.
Expected: SellSavvy should create a new data
folder and a new addressbook.json
file inside the folder with default data.
Test case: Corrupt the addressbook.json
file by changing its contents to an invalid format, e.g. add a non-numeric character to one of the customer's phone number. Then, run SellSavvy and exit using the exit
command.
Expected: SellSavvy should discard all data in the file and start with an addressbook.json
file with an empty customer list.
Team size: 4
CUSTOMER_INDEX
of addorder
command to be optional when a customer's order list is open addorder
when the customer's order list is open but related commands like editorder
and filterorder
do not require a customer's index to be supplied.addorder
optional when a particular customer's order list is already displayed.edito 1 d/01-12-2023 n/item
. An error message informs user that date is wrong.n/
or a/
as string inputs via the use of special symbols, possibly using a symbol such as \
.n/
or a/
as parameter string inputs, hence we will need to add the functionality to do it as well.0
, 1 2
) for CUSTOMER_INDEX
and ORDER_INDEX
will result in an error stating "Invalid command format!" along with the command format. While in the command format it states that said parameters must be a positive integer, the error message could be more concise.deletec 0
, the following error message is displayed:Invalid command format!
deletecustomer: Deletes the customer identified by the index number used in the displayed customer list.
Parameters: CUSTOMER_INDEX (must be a positive integer)
Example: deletecustomer 1
1a
by mistake, as it is only the parameters which are incorrect in this case. Making the error message more concise also provides users with a better experience.EMAIL
parameter accepts emails with only one domain label e.g. johndoe@gmail
.com
in johndoe@gmail.com
).friends
, neighbours
, etc.NAME
addc n/john s/o doe p/98765432 e/johnd@example.com a/John street
. An error message informs user that name is wrong.CUSTOMER_INDEX
parameter findcustomer
command first if they have a lot of customers in their list.This section documents the involved effort to evolve AB3 into SellSavvy.
Order
class and handlingAt this point, AB3 Person
is refactored into Customer
.
Order handling involved:
Customer
into Order
class and existing commands to handle Order
.
AddCustomerCommand
into AddOrderCommand
.UniqueCustomerList
into OrderList
class and existing methods to handle OrderList
.
Order
and OrderList
.This was time and effort intensive as:
OrderListPanel
implementation is not a direct parallel to the CustomerListPanel
because the OrderList
is part of the Customer
class instead of being directly within the ModelManager
class. This distinction necessitates handling the selected Customer
to ensure the OrderListPanel
correctly displays the orders relevant to the currently chosen customer.Order
parameters for order managementThis involved:
Item
, Date
, Quantity
and Status
.This was challenging as:
Date
involves additional checks to contextualise delivery dates to order management.Status
limitations to manage order delivery completion.filterOrder
commandThis involved:
Status
.This was challenging as:
listOrder
and addOrder
.