HomeBoss is a software project adapted from the AddressBook-Level3 project created by the SE-EDU initiative.
Libraries used in this project:
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
, ListPanel
, StatusBarFooter
, HelpWindow
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 through the Logic
component 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, referenced through the Logic
component as it displays Customer
and Delivery
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("customer delete 1")
API
call as an example.
Note: The lifeline for CustomerDeleteCommandParser
and CustomerDeleteCommand
should end at the destroy marker (
X) but due to a limitation of
PlantUML, the lifeline reaches 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., CustomerDeleteCommandParser
) and uses it to parse the command.Command
object (more precisely, an object of one of its subclasses e.g., CustomerDeleteCommand
)
which is executed by the LogicManager
.Model
when it is executed (e.g. to delete a customer).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., CustomerAddCommandParser
) which uses the other classes shown above
to parse the user command and create a XYZCommand
object (e.g., CustomerAddCommand
) which the AddressBookParser
returns back as a Command
object.XYZCommandParser
classes (e.g., CustomerAddCommandParser
, DeliveryDeleteCommandParser
, ...) 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. (See the ReadOnlyBook Model section
below for more details)Delivery
objects. (See the ReadOnlyBook Model section
below for more details)Customer
objects (See the Customer Model) as a separate
filteredCustomers list. (e.g., results of a customer list
command)Delivery
objects (See the Delivery Model) as a separate
filteredDeliveries list. (e.g., results of a delivery list --status COMPLETED
command)Delivery
objects as a separate sortedDeliveries list. (eg., results of
a delivery list --sort ASC
command)User
object that represents the stored user's data (See the User Model).UserPref
object that represents the user’s preferences. This is exposed to the outside as
a ReadOnlyUserPref
object.ObservableList<ListItem>
that exposes the Customer
or Delivery
details that is
shown on the UI list panel 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.Model
represents data entities of the domain, they
should make sense on their own without depending on other components)Note: Due to a limitation of PlantUML, we are putting both multiplicity and association role on the same line.
The ReadOnlyBook
model,
AddressBook
and DeliveryBook
to the outside.AddressBook
class stores the address book data i.e., all Customer
that are contained through
the UniqueCustomerList
.DeliveryBook
class stores the delivery book data i.e., all Delivery
that are contained through
the UniqueDeliveryList
.The User
model,
The Delivery
model,
The Customer
model,
API :
Storage.java
The Storage
component,
UserPrefStorage
Model
component (because the Storage
component's job is to save/retrieve objects
that belong to the Model
)The concrete implementation of storage is done through StorageManger
, which holds an instance of UserPrefsStorage
,
BookStorage
and BookStorageWithReference
. Which represents the User Preference Data, Address Book and Delivery Book
respectively.
Classes used by multiple components are in the seedu.addressbook.commons
package.
This section describes some noteworthy details on how certain features are implemented.
The register
command is used to register a new user account.
Once registered, the user will be able to log in to the account and access all the commands available.
The format for the register
command can be found here.
register
command.CommandException
will be thrown.The following activity diagram shows the logic of a user registering an account:
The sequence of the register
command is as follows:
register --user USERNAME --password PASSWORD --confirmPass CONFIRM_PASSWORD --secretQn SECRET_QUESTION --answer ANSWER
is entered by the user (i.e., register --user gab --password pass1234 --confirmPass pass1234 --secretQn First Pet? --answer Koko
).LogicManager
calls the AddressBookParser#parseCommand
with the full user input.AddressBookParser
will parse the command, creating a new instance of UserRegisterCommandParser
,
thereafter calling UserRegisterCommandParser#parse
to parse the command arguments.UserRegisterCommandParser
will parse the arguments, create a new User
and return a new instance
of UserRegisterCommand
,
which is in turn passed back to AddressBookParser
then back to LogicManager
.LogicManager
calls UserRegisterCommand#execute
with the Model
instance as input,
which checks if a user is already registered by calling Model#getStoredUser
.UserRegisterCommand
calls Model#registerUser
to store the user.UserRegisterCommand
creates a new CommandResult
instance with the result of the execution
and returns it back to LogicManager
which then returns it to the UI.The following sequence diagram shows how the register
command works:
The login
command is used to log in to the user's account.
Once logged in, the user will have access to all the commands available.
The format for the login
command can be found here.
Username
and Password
in the login
command.CommandException
will be thrown.CommandException
will be thrown.User
is then cross-referenced with the stored user in Model
to check if the credentials match.
If incorrect credentials are provided, a CommandException
will be thrown.isLoggedIn
status in Model
will be updated to true
.The following activity diagram shows the logic of a user logging in:
The sequence of the login
command is as follows:
ModelManager
will be initialized with
the User
constructed with details from the authentication.json file.login --user USERNAME --password PASSWORD
is entered by the user (
e.g. login --user Gabriel435 --password 12345678
)LogicManager
calls the AddressBookParser#parseCommand
with login --user USERNAME --password PASSWORD
as input.AddressBookParser
will parse the command and creates a new instance of UserLoginCommandParser
, thereafter
calling UserLoginCommandParser#parse
to parse the command arguments.UserLoginCommandParser
will parse the arguments, create a new User
instance, and return a new instance
of UserLoginCommand
. This UserLoginCommand
instance is then returned to LogicManager
.LogicManager
calls UserLoginCommand#execute
with the Model instance as input, which checks whether there is a
registered account stored by calling
Model#getStoredUser
.UserLoginCommand
then checks whether the user is currently logged in by calling Model#getUserLoginStatus
.UserLoginCommand
checks if the user credentials match the stored user by
calling Model#userMatches
.UserLoginCommand
calls Model#setLoginSuccess
,
changing the login status to true and giving the user access to all the commands.userLoginCommand
also calls Model#showAllFilteredCustomerList
to display the list of customers.UserLoginCommand
creates a new CommandResult
instance with the result of the execution and returns it
back to LogicManager
which then returns it to the UI.The following sequence diagram shows how the login
command works:
The logout
command is used to log out from the user's account.
Once logged out, the user will have no access to all the commands available, except for help
, exit
,
register
, login
, recover
and delete account
.
The format for the logout
command can be found here.
logout
command.CommandException
will be thrown.isLoggedIn
status in Model
will be updated to false
.The following activity diagram shows the logic of a user logging out:
The sequence of the logout
command is as follows:
logout
is entered by the user.LogicManager
calls the AddressBookParser#parseCommand
with logout
as input.AddressBookParser
will parse the command, and create a new instance of
UserLogoutCommand
. This instance is then returned to LogicManager
.LogicManager
calls UserLogoutCommand#execute
with the Model instance as input, which checks if the user is
logged in by calling Model#getUserLoginStatus
.UserLogoutCommand
calls Model#setLogoutSuccess
,
changing the login status to false and restricting the user access to most commands.UserLogoutCommand
also calls Model#clearFilteredDeliveryList
and Model#clearFilteredCustomerList
to hide
the list of deliveries and customers.UserLogoutCommand
creates a new CommandResult
instance with the result of the execution and returns it
back to LogicManager
which then returns it to the UI.The following sequence diagram shows how the logout
command works:
The customer add
command is used to create a new customer with information fields Name
, Phone
, Email
and
Address
. A unique ID
will be assigned to the customer upon creation.
The format for the customer add
command can be found here.
customer add
command.CommandException
will be thrown.CommandException
will be thrown.Customer
will be added to the Customer
database.The following activity diagram shows the logic of adding a Customer
into the database:
The sequence of the customer add
command is as follows:
customer add
command.LogicManager
calls the AddressBookParser#parseCommand
on the command.AddressBookParser
will parse the command, and creates a new instance of CustomerAddCommandParser
, thereafter
calling
CustomerAddCommandParser#parse
to parse the command arguments.CustomerAddCommandParser
will parse the arguments, and creates a new Customer
instance, followed by a new
instance of CustomerAddCommand
using the Customer
instance as a parameter.CustomerAddCommand
instance is then passed back to AddressBookParser
instance, which then passes it back
to LogicManager
.LogicManager
calls CustomerAddCommand#execute
with the Model
instance as input, which checks if the user is
logged in by calling the
Model#getUserLoginStatus
.CustomerAddCommand
instance checks if the Customer
exists in Model
using Model#hasCustomer
.Customer
does not exist, CustomerAddCommand
calls Model#addCustomer
to add the Customer
into the
database.CustomerAddCommand
creates a new CommandResult
instance with the result of the execution and returns it
back to LogicManager
which then returns it to the UI.The following sequence diagram shows how the customer add
command works:
The customer edit
command is used to edit an existing Customer with at least one of the information fields
specified by the user, namely the customer's Name
, Phone
, Email
or/and Address
.
The format for the customer edit
command can be found here.
customer edit
command.CommandException
will be thrown.ID
does not match any of the existing Customer IDs, a CommandException
will be thrown.CommandException
will be thrown.The following activity diagram shows the logic of a user editing a customer's information:
The sequence of the customer edit
command is as follows:
customer edit CUSTOMER_ID --name NAME --phone PHONE --email EMAIL --address ADDRESS
is entered by the
user.AddressBookParser#parseCommand
with customer edit CUSTOMER_ID --name NAME --phone PHONE --email EMAIL --address ADDRESS
as input.AddressBookParser
will parse the command, and creates a new instance of CustomerEditCommandParser
, thereafter
calling CustomerEditCommandParser#parse
to parse the command arguments.CustomerEditCommandParser
will call its own CustomerEditCommandParser#createCustomerEditDescriptor
method which
in turn creates a new CustomerEditDescriptor
instance with the parsed arguments and returns it
to CustomerEditCommandParser
.CustomerEditCommandParser
then creates a CustomerEditCommand
instance and returns it to AddressBookParser
.AddressBookParser
then passes the CustomerEditCommand
instance to LogicManager
.LogicManager
then calls CustomerEditCommand#execute
with the Model
instance as input.CustomerEditCommand
instance then checks if the user is logged in by calling Model#getUserLoginStatus
.CustomerEditCommand
calls its own CustomerEditCommand#createEditedCustomer
method which in turn
creates a new Customer
instance with the edited information provided by the user.Customer
instance is returned to CustomerEditCommand
. CustomerEditCommand
then calls Model#setCustomer
to update the existing Customer
with the new information provided by the user.CustomerEditCommand
then calls CustomerEditCommand#updateDelivery
to update Deliveries
associated with
this updated Customer
.Model#showAllFilteredCustomerList
is then called to display the updated list of customers.CustomerEditCommand
creates a new CommandResult
instance with the result of the execution and returns
it back to LogicManager
which then returns it to the UI.The following sequence diagram shows how the customer edit
command works:
The delivery add
command is used to add a new Delivery with all the given information fields
specified by the user, namely the delivery's DeliveryName
, customer id of a Customer
and DeliveryDate
. All fields
are compulsory.
The format for the delivery add
command can be found here.
delivery add
command.CommandException
will be thrown.CommandException
will be thrown.CommandException
will be thrown.The following activity diagram shows the logic of a user adding a delivery:
The sequence of the delivery add
command is as follows:
delivery add
command with input
as the DeliveryName
, Customer ID of a Customer
and
DeliveryDate
.
e.g.(delivery add --name Chocolate Cake --customer 1 --date 2024-10-10
)LogicManager
calls AddressBookParser#parseCommand
with input
as input.AddressBookParser
in turn creates an instance of DeliveryAddCommandParser
and calls
DeliveryAddCommandParser#parse
to parse the command arguments.DeliveryAddCommandParser
then creates a DeliveryAddDescriptor
instance.DeliveryAddCommand
instance is then created by DeliveryAddCommandParser
.DeliveryAddCommand
instance is then returned to AddressBookParser
, and finally to the LogicManager
where DeliveryAddCommand#execute
method is called with Model
instance as input.DeliveryAddCommand
then calls upon Model#getUserLoginStatus
to check if the user is logged in.DeliveryAddCommand
then calls its own DeliveryAddCommand#createDelivery
method which creates a new Delivery
instance using the DeliveryAddDescriptor
instance created earlier.DeliveryAddCommand
then calls the Model#addDelivery
method to add the newly created Delivery
instance into
the database.DeliveryAddCommand
creates a new CommandResult
instance with the result of the execution and
returns it back to LogicManager
which then returns it to the UI.The following sequence diagram shows how the delivery add
command works:
The delivery view
command is used to view a selected delivery with the id specified by the user.
The format of the delivery view
command can be found
here.
Delivery
through its ID
.CommandException
will be thrown.ID
does not match any of the existing Delivery IDs, a CommandException
will be thrown.Delivery
will be shown.The following activity diagram illustrates the logic of viewing a Delivery
.
The sequence of the delivery view
command is as follows:
delivery view DELIVERY_ID
is entered by the user (e.g. delivery view 1
).LogicManager
calls the AddressBookParser#parseCommand
with delivery view DELIVERY_ID
as input.AddressBookParser
will parse the command, and creates a new instance of DeliveryViewCommandParser
thereafter
calling
DeliveryViewCommandParser#parse
to parse the command arguments.DeliveryViewCommandParser
will parse the arguments, and return a new instance of DeliveryViewCommand
. This
instance is then returned to the LogicManager
.LogicManager
calls DeliveryViewCommand#execute
with the Model instance as input, which checks if the user is
logged in by calling
Model#getUserLoginStatus
.DeliveryViewCommand
instance fetches the Delivery
with the specified DELIVERY_ID
from Model
,
calling Model#getDelivery
.DeliveryViewCommand
creates a new CommandResult
instance with the result of the execution and returns it
back to LogicManager
which then returns it to the UI.The following sequence diagram illustrates the delivery view
command sequence:
The delivery list
command is used to list all deliveries in the delivery book.
The format of the delivery list
command can be found
here.
status
, customer id
, date
and sort
to filter and sort the
current delivery list in any combination.CommandException
will be thrown.The following activity diagram illustrates the logic for listing Delivery
:
The sequence of the delivery list
command is as follows:
delivery list --status STATUS --customer CUSTOMER_ID --date EXPECTED_DELIVERY_DATE --sort SORT
is
entered by the user
(e.g. delivery list --status created --customer 1 --date 2023-12-12 --sort ASC
).LogicManager
calls the AddressBookParser#parseCommand
with the full user input.AddressBookParser
will parse the command, creating a new instance of DeliveryListCommandParser
,
thereafter calling DeliveryListCommandParser#parse
to parse the command arguments.DeliveryListCommandParser#parse
will call DeliveryListCommandParser#parseDeliveryListCommand
to parse the
arguments and return a new instance of DeliveryListCommand
, which is in turn passed back to AddressBookParser
then back to LogicManager
.LogicManager
calls DeliveryListCommand#execute
with the Model
as input, which checks if the user is logged in
by calling Model#getUserLoginStatus
.DeliveryListCommand
will call DeliveryListCommand#createDeliveryListFilters
to create
the filters based on the parsed arguments, if any.DeliveryListCommand
will call Model#updateFilteredDeliveryList(Predicate)
to filter the delivery list by
the filters created.DeliveryListCommand
will call DeliveryListCommand#createDeliveryListSort()
to create the sort for the delivery
list by expected delivery date based on the parsed arguments, if any, or by default, create the sort in descending
expected delivery date.DeliveryListCommand
will call Model#updateSortedDeliveryList(Comparator)
to sort the delivery list by the sort
created.DeliveryListCommand
creates a new CommandResult
instance with the result of the execution
and returns it back to LogicManager
which then returns it to the UI.The default delivery sort is desc
which sorts the delivery list by expected delivery date in descending order from
the latest date to the earliest date.
The following sequence diagram illustrates the delivery list
command sequence:
The delivery status
command is used to update the DeliveryStatus
of a selected delivery with the new status
specified by the user.
The format of the delivery status
command can be found
here.
Delivery
through its ID
. The user must specify a DeliveryStatus
to replace the
current status of the selected delivery.CommandException
will be thrown.ID
does not match any of the existing Delivery IDs, a CommandException
will be thrown.Delivery
with the specified Delivery ID will be updated to
the new status.The following activity diagram illustrates the logic of updating the DeliveryStatus
of a Delivery
:
The sequence of the delivery status
command is as follows:
delivery status DELIVERY_ID STATUS
is entered by the user (e.g. delivery status 1 completed
)LogicManager
calls the AddressBookParser#parseCommand
with delivery status DELIVERY_ID STATUS
as input.AddressBookParser
will parse the command, and creates a new instance of DeliveryStatusCommandParser
, thereafter
calling
DeliveryStatusCommandParser#parse
to parse the command arguments.DeliveryStatusCommandParser
will parse the arguments, and return a new instance of DeliveryStatusCommand
which is
in turn passed back to AddressBookParser
then back to LogicManager
.LogicManager
calls DeliveryStatusCommand#execute
with the Model instance as input, which checks if the user is
logged in by calling
Model#getUserLoginStatus()
.DeliveryStatusCommand
instance fetches the Delivery
with the specified DELIVERY_ID
from Model
, then calls it's own DeliveryStatusCommand#createDeliveryWithNewStatus
method to create a new Delivery
with the
updated DeliveryStatus
.Delivery
with the same ID in the Model
using Model#setDelivery
with the newly created Delivery
with identical fields except for its
updated DeliveryStatus
.DeliveryStatusCommand
creates a new CommandResult
instance with the result of the execution and returns
it back to LogicManager
which then returns it to the UI.The following sequence diagram illustrates the delivery status
command sequence:
The delivery note
command is used to create a new Note
a selected delivery with the new note
specified by the user
The format of the delivery note
command can be found
here.
Delivery
through its id
. The user must specify a non-empty Note
to replace the
current status of the selected delivery.CommandException
will be thrown.ID
does not match any of the existing Delivery IDs, a CommandException
will be thrown.Delivery
will be updated with the new Note
.The following activity diagram illustrates the logic of creating a Note
for a Delivery
:
The sequence of the delivery note
command is as follows:
delivery note DELIVERY_ID --note NOTE
is entered by the user
(e.g. delivery note 1 --note This is a note
).LogicManager
calls the AddressBookParser#parseCommand
with delivery note DELIVERY_ID --note NOTE
as input.AddressBookParser
will parse the command, and creates a new instance of DeliveryCreateNoteCommandParser
,
thereafter calling DeliveryCreateNoteCommandParser#parse
to parse the command arguments.DeliveryCreateNoteCommandParser
will parse the arguments, and return a new instance of DeliveryCreateNoteCommand
,
which is in turn passed back to AddressBookParser
then back to LogicManager
.LogicManager
calls DeliveryCreateNoteCommand#execute
with the Model
instance as input,
which checks if the user is logged in by calling Model#getUserLoginStatus
.DeliveryCreateNoteCommand
instance fetchs the Delivery
with the specified DELIVERY_ID
,
from Model
then calls it's own DeliveryCreateNoteCommand#createDeliveryWithNewNote
method
to create a new Delivery
with the updated Note
.Delivery
with the same ID in the Model
using Model#setDelivery
with
the newly created Delivery
with identical fields except for its updated Note
.DeliveryCreateNoteCommand
creates a new CommandResult
instance with the result of the execution and
returns it back to LogicManager
which then returns it to the UI.If the specified Delivery
already has an existing Note
, it will be overridden by the new Note
supplied if the
command executes successfully.
The following diagram illustrates the delivery note
command sequence:
Target user profile:
Value proposition: Home-based business owners can have a huge base of customers. HomeBoss streamlines and simplifies the management of customer contacts and deliveries, thereby improving efficiency for business owners.
Priorities: High (must have) - ***
, Medium (nice to have) - **
, Low (unlikely to have) - *
Priority | As … | I want to … | So that … |
---|---|---|---|
*** | an owner | create a local account | I can personalise my account and secure my data. |
*** | a registered owner | log in to my local account | I can access my data. |
*** | a forgetful owner | retrieve my account | I can still recover my data if I forget my password. |
*** | a logged-in owner | log out of my account | I can keep my data secure. |
*** | a registered owner | delete my account | I can clear all personal information or data from HomeBoss for privacy and security reasons. |
*** | a registered owner | update my details | I can change my personalisation and enhance security. |
*** | a registered owner | create a customer | I can tie deliveries to customers’ information. |
*** | a registered owner | view a customer | I can see their detailed information. |
*** | a registered owner | see a customer's list of deliveries | I can easily see all the deliveries of a certain customer. |
*** | a registered owner | quickly search for the details of a client | I can monitor the progress of an order efficiently and effectively. |
*** | a registered owner | update a customer's details | I can change details if keyed in wrongly. |
*** | a registered owner | delete a customer | I can remove redundant or incorrect customer records, especially when unforeseen errors occur. |
*** | a registered owner | view a list of customers | I can have a comprehensive overview of my customer base. |
*** | a registered owner | create a delivery | I can efficiently organise and access delivery information. |
*** | a registered owner | create notes about deliveries | I can add additional information about deliveries. |
*** | a registered owner | view a list of deliveries | I can see a comprehensive overview of my deliveries. |
*** | a registered owner | see the list of deliveries that would be delivered for the day | I can prioritise particular orders. |
*** | a registered owner | add a customer to a delivery | I can know who the delivery is for. |
*** | a registered owner | quickly search for the name of a delivery | I can monitor the progress of delivery. |
*** | a registered owner | see a list of deliveries sorted by their expected date of delivery | I can see a more organised list and easier for me to get an overview of all orders. |
*** | a registered owner | view the details of a delivery | I can know what the order is and where to deliver it to. |
*** | a registered owner | update the status of the delivery | I can keep track of the delivery progress and notify my client. |
*** | a registered owner | update delivery details | I can change any information if there was an error from me. |
*** | a registered owner | delete a delivery | I can get rid of deliveries that are redundant. |
* | a registered owner | relate my inventory to my orders | I can keep track of my inventory. |
* | a registered owner | know the sum of all the materials required for a fixed delivery schedule | I can plan my inventory. |
* | a registered owner | have different user authorisation levels | I can control who has access to what. |
Our ID generation is not consistent (e.g., If there are 5 customers with ID
1-5 and the last 4 are deleted, the
next
ID
will be 6
. However, if you restart the application, the next created Customer will have ID
of 2
.)
Currently, we
only reset the next available ID to (max ID
+ 1
) when the user closes and launches the program again. Other
times, it
might skip a few numbers depending on the operations performed. We plan to perform this clean up operation (
where ID
resets to (max ID
+ 1
)) after every command that modifies the data. This will ensure that the next available ID
is
always (max ID
+ 1) and also help in keeping the ID
generation more consistent and be more space efficient.
Currently, you are unable to key in special characters for the name of a customer or for delivery notes. We plan to
allow certain special characters only such as /
for the name of a customer as some people have special characters
eg. Gabriel s/o Bryan
in their name or require special characters when taking notes.
Currently, there is an inconsistency in Command Format in terms of whether a prefix is required in a command despite
having the same number of parameters which may cause confusion for the user. For example, delivery note
requires
a --note
prefix while delivery status
does not require a prefix at all even though both have 1 parameter. We plan
to make our command format for consistent by having delivery status require a --status
prefix to make it more
predictable.
Currently, the find
command requires exact match of keywords and returns results that matches any of those
keywords. This potentially results in numerous in unwanted data to be shown if there are multiple matching keywords.
Or, if there are no matching keywords, no results would be shown. For example, if you have 100
Chocolate Cake
and 100
Strawberry Buns and 1
Chocolate Buns, and you search for Chocolate Buns, the result would be 100
Chocolate Cake and 1
Chocolate Buns and 100
Strawberry Buns. Or, if you misspelled your search as Chcolate Bns
,
you would receive no result. We plan to make the find
command have more options to do more complex search
functionalities such as fuzzy search and exact match search. For example, if you search for Chocolate Buns, with
exact search, the result would be 1
Chocolate Buns. Or, if you misspelled your search as Chcolate Bns
, with fuzzy
search, the result would be 1
Chocolate Buns.
Currently, there is no proper precedence of errors which may cause confusion among users. For example, keying in an
invalid command format for customer edit
while logged out will show all the errors regarding the format first
before it tells that you are logged out (once the command format is valid and evaluated). This may result in time
wasted as you need to then login first before re-typing your command again. Thus, we plan to set a precedence of
error
so that more important errors such as authentication errors are shown first and make errors more consistent in the
order of how it is displayed.
Currently, if you input an invalid ID, it simply
states "ID must be an integer more than 0 and less than 2147483648."
but does not state whether it is a Delivery ID or Customer ID.
We plan to make the error message more specific by stating whether it is a Delivery ID or Customer ID.
Currently, only the user password is the only thing that is hashed in the authentication file. We plan to encrypt the whole JSON authentication file and the data to prevent unauthorised access to the user's account and data instead of only hashing the user password.
Currently, if you input an invalid day, month or year such as 2023-02-30
, it simply states
date "Dates should be in the format yyyy-MM-dd"
but does not specify why it is invalid. We plan to make the error more specific by stating
what is the actual invalid input of the date, in this case, the day is invalid as 30th February does not exist.
Currently, you can put duplicate prefixes for delivery list to filter or sort the deliveries that may arise in confusion by which filter is applied. We plan to disallow duplicate prefixes for delivery list so that users would not be confused by the output.
Currently, inputting a negative value or zero for some numerical parameters that requires a positive integer simply
states "Invalid Command Format"
. The error message
should be more specific and state "Please enter a positive integer that is more than 0 and less than 2147483648."
.
For all use cases below, the System is HomeBoss
and the Actor is the user
, unless specified
otherwise.
System: User System (US)
Actor: Unregistered owner
Preconditions: User system has no account.
Guarantees:
MSS:
Unregistered owner enters register command with registration details.
US creates an account and logs-in the user.
Use case ends.
Extensions:
1a. US detects error in entered command.
1a1. US states error in command.
Use case ends.
System: User System (US)
Actor: Registered owner
Preconditions: Registered owner is logged out.
Guarantees:
MSS:
Registered owner enters the login command with login details.
US logs-in the user.
Use case ends.
Extensions:
1a. US detects an error in the entered command.
1a1. US states error in command.
Use case ends.
System: User System (US)
Actor: Registered owner
Preconditions: An owner is registered with HomeBoss.
Guarantees:
MSS:
Registered owner enters the account recovery command.
US states the secret question that the user set during account registration.
Registered owner enters the account recovery details.
US logs-in the user
Use case ends.
Extensions:
1a. US detects an error in the entered command.
1a1. US states error in command.
Use case ends.
3a. US detects an error in the entered command.
3a1. US states error in command.
Use case ends.
3b. US detects an error in the recovery details.
3b1. US states error in recovery details.
Use case ends.
System: User System (US)
Actor: Logged-In owner
Preconditions: Owner is logged in.
Guarantees:
MSS:
Logged-In owner types logout
US logs owner out.
Use case ends.
System: User System (US)
Actor: Registered owner.
Preconditions: Account is present.
Guarantees:
MSS:
Registered owner types command to delete his account.
User system deletes his account.
Use case ends.
System: User System (US)
Actor: Logged-in owner
Preconditions: Owner is logged in
Guarantees:
MSS:
Logged-in Owner types in command and new details to update details.
US updates the details of Owner.
Use Case ends.
Extensions:
1a1. US states error in command.
Use case ends.
System: Customer Management System (CMS)
Actor: Logged-in owner
Preconditions: Owner is logged in
Guarantees
MSS:
Logged-in Owner types in command and customer’s details to create a customer.
CMS adds the Customer to the Customer database.
Use Case ends.
Extensions:
1a. CMS detects error in entered command.
Use case ends.
1b. CMS detects duplicated customer.
Use case ends.
System: Customer Management System (CMS)
Actor: Logged-in owner
Preconditions: Owner is logged in
Guarantees
MSS:
Logged-in Owner types in command specifying Customer’s ID.
CMS shows all of the specified Customer’s details.
Use Case ends.
Extensions:
1a. CMS detects error in entered command.
Use case ends.
1b. CMS detects Customer does not exist.
Use case ends.
System: Customer Management System (CMS)
Actor: Logged-in owner
Preconditions: Owner is logged in
Guarantees
MSS:
Logged-in Owner types in the command and keyword to search for a customer.
US shows a list of customers, with that keyword, their details.
Use Case ends.
Extensions
1a. CMS detects error in entered command.
Use case ends.
System: Customer Management System (CMS)
Actor: Logged-in owner.
Preconditions: Owner is logged in.
Guarantees:
MSS:
Logged-in Owner types command to update a customer’s details with at least one field specified.
CMS updates the details of the specified customer.
Use Case Ends.
Extensions:
1a. CMS detects error in entered command.
Use case ends.
1b. CMS detects customer does not exist.
Use case ends.
1c. CMS detects there are duplicated customers.
Use case ends.
System: Customer Management System (CMS)
Actor: Logged-in owner.
Preconditions: Owner is logged in.
Guarantees:
MSS:
Logged-in Owner types command to delete a customer.
CMS deletes specified customer from the customer database.
Use Case Ends.
Extensions:
1a. CMS detects error in entered command.
Use case ends.
1b. CMS detects Customer does not exist.
Use case ends.
System: Customer Management System (CMS)
Actor: Logged-in owner.
Preconditions: Owner is logged in.
Guarantees:
MSS:
Logged-in Owner types command to list all customers.
CMS shows list of all customers.
Use Case Ends.
System: Delivery Management System (DMS)
Actor: Logged-in owner.
Preconditions: Owner is logged in.
Guarantees:
MSS:
Logged-in Owner types command to create a delivery.
DMS adds the delivery to the delivery database.
Use Case Ends.
Extensions:
1a. DMS detects error in entered command.
1a1. DMS states error in command.
Use Case Ends.
1b. DMS detects Customer linked to Delivery does not exist.
1b1. DMS states that the specified Customer does not exist.
Use Case Ends.
System: Delivery Management System (DMS)
Actor: Logged-in owner.
Preconditions: Owner is logged in.
Guarantees:
MSS:
Logged-in Owner types command to create a note for a delivery.
DMS updates the delivery with the created note.
Use Case Ends.
Extensions:
1a. DMS detects error in entered command.
1a1. DMS states error in command.
Use Case Ends.
1b. DMS detects that the specified Delivery does not exist.
1b1. DMS states that the specified Delivery does not exist.
Use Case Ends.
System: Delivery Management System (DMS) Actor: Logged-in owner.
Preconditions: Owner is logged in.
Guarantees:
MSS:
Logged-in Owner types command to view a list of deliveries.
DMS displays a list of all deliveries where the expected delivery dates are sorted in descending order.
Use Case Ends.
Extensions:
1a. DMS detects filters or sort options in the entered command.
Use Case Ends.
1b. DMS detects an error in the entered command.
Use Case Ends.
System: Delivery Management System (DMS)
Actor: Logged-in owner.
Preconditions: Owner is logged in.
Guarantees:
MSS:
Logged-in Owner types command and keywords to search for a delivery.
DMS displays a list of deliveries that match the keywords in the search query.
Use Case Ends.
Extensions:
1a. DMS detects error in entered command.
1a1. DMS states error in entered command.
Use case ends.
System: Delivery Management System (DMS)
Actor: Logged-in Owner.
Preconditions: Owner is logged-in.
Guarantees:
MSS:
Logged-in owner types command to view details of delivery.
DMS shows details of the specified delivery.
Use case ends.
Extensions:
1a. DMS detects error in entered command.
1a1. DMS states error in entered command.
Use case ends.
1b. DMS detects that the specified Delivery does not exist.
1b1. DMS states that the Delivery does not exist.
Use case ends.
System: Delivery Management System (DMS)
Actor: Logged-in owner.
Preconditions: Owner is logged-in.
Guarantees:
MSS:
Logged-in owner types command to update the status of a delivery.
DMS updates the status of the delivery.
Use case ends.
Extensions:
1a. DMS detects error in entered command.
1a1. DMS states error in entered command.
Use case ends.
1b. DMS detects that the specified Delivery does not exist.
1b1. DMS states that the Delivery does not exist.
Use case ends.
System: Delivery Management System (DMS)
Actor: Logged-in owner.
Preconditions: Owner is logged-in.
Guarantees:
MSS:
Logged-in owner types command to update the details of a delivery.
DMS updates the details of the delivery.
Use case ends.
Extensions:
1a. DMS detects error in entered command.
1a1. DMS states error in entered command.
Use case ends.
1b. DMS detects that the specified Delivery does not exist.
1b1. DMS states that the Delivery does not exist.
Use case ends.
1c. DMS detects update to Customer linked to Delivery but specified Customer does not exist.
1c1. DMS states that the Customer does not exist.
Use case ends.
System: Delivery Management System (DMS)
Actor: Logged-in owner.
Preconditions: Owner is logged-in.
Guarantees:
MSS:
Logged-in owner types command to delete a delivery.
DMS deletes the delivery.
Use case ends.
Extensions:
1a. DMS detects error in entered command.
1a1. DMS states error in entered command.
Use case ends.
1b. DMS detects that the specified Delivery does not exist.
1b1. DMS states that the Delivery does not exist.
Use case ends.
11
or above installed.Term | Definition |
---|---|
Alphanumeric | Consisting of only letters and numbers |
Command Line Interface (CLI) | A text-based user interface used to run programs |
Graphical User Interface (GUI) | A visual interface where you can interact with the program through graphical components |
JSON | Short for JavaScript Object Notation, a lightweight format for storing your data |
Owner | The individual who owns the home-based business and who uses the HomeBoss app |
Mainstream OS | Windows, Linux, Unix, OS-X |
Parameter | Inputs to customise the command to your needs |
Prefix | Special markers for HomeBoss to understand your inputs |
Private Contact Detail | A contact detail that is not meant to be shared with others |
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 it into an empty folder.
Run HomeBoss.jar
. If you are unsure how to run a .jar
file, you may refer to this helpful
guide
.
First register for HomeBoss using the register
command. So, for example, if you want to register an
account
with the following details:
USERNAME
: Alex123PASSWORD
: AlexIsGreatCONFIRM_PASSWORD
: AlexIsGreatSECRET_QUESTION
: First Pet Name?ANSWER
: KoKo
Type register --user Alex123 --password AlexIsGreat --confirmPass AlexIsGreat --secretQn First Pet Name? --answer Koko
into the Command Box and hit enter. More details on the command can be
found here.
Expected: Should see the HomeBoss Homepage.
Subsequent launches.
Relaunch the application by running HomeBoss.jar
.
Using the login
command, log in into HomeBoss with the same user details entered earlier.
Expected: User is able to log in successfully and see the HomeBoss homepage.
Registering for an account.
Prerequisites: None
Test
Case: register --user Gabriel --password GabrielIsGreat --confirmPass GabrielIsGreat --secretQn First Pet Name? --answer Koko
{.swift}.
Expected: A new user account is registered with username Gabriel
, password GabrielIsGreat
,
secret question First Pet Name?
and answer Koko
.
Test
Case: register --user Ga_briel --password GabrielIsGreat --confirmPass GabrielIsGreat --secretQn First Pet Name? --answer Koko
{.swift}.
Expected: No new user is registered. Error indicating username constraints is
shown in the feedback message.
Test
Case: register --user Gabriel --password Gabriel_IsGreat --confirmPass Gabriel_IsGreat --secretQn First Pet Name? --answer Koko
{.swift}.
Expected: No new user is registered. Error indicating password constraints is
shown in the feedback message.
Test
Case: register --user Gabriel --password GabrielIsGreat --confirmPass GabrielIsGreat1 --secretQn First Pet Name? --answer Koko
{.swift}.
Expected: No new user is registered. Error indicating password and confirm password do not match is
shown in the feedback message.
Test
Case: register --user Gabriel --password GabrielIsGreat --confirmPass GabrielIsGreat --secretQn First Pet Name?
{.swift}.
Expected: No new user is registered. Error indicating invalid command format is
shown in the feedback message.
Test Case: There already exists a user account stored in the application.
Expected: No new user is registered. Error indicating existing account is
shown in the feedback message.
Login to an account.
Prerequisites: There exists a stored user in the application, with the username Gabriel
and
password GabrielIsGreat
. The user is currently logged-out of the application.
Test Case: login --user Gabriel --password GabrielIsGreat
.
Expected: The user is logged-in into the application. A welcome message is shown in the result message.
Test Case: login --user Ga_briel --password GabrielIsGreat
.
Expected: The user does not get logged-in. Error indicating username constraints is
shown in the feedback message.
Test Case: login --user Gabriel --password Gabriel_IsGreat
.
Expected: The user does not get logged-in. Error indicating password constraints is
shown in the feedback message.
Test Case: login --user Gabriel1 --password GabrielIsGreat
.
Expected: The user does not get logged-in. Error indicating wrong username or password is
shown in the feedback message.
Test Case: login --user Gabriel --password GabrielIsGreat1
.
Expected: Similar to previous.
Test Case: login --user Gabriel
.
Expected: The user does not get logged-in. Error indicating invalid command format is
shown in the feedback message.
Updating account details.
Prerequisites: Logged-in into the application with the login
command.
Test Case: update --user Gabriel123
.
Expected: The username of the currently logged-in user is updated to Gabriel123
.
Test Case: update --password GabrielIsCool --confirmPass GabrielIsCool
.
Expected: The password of the currently logged-in user is updated to GabrielIsCool
.
Test Case: update --secretQn Favourite Pet --answer Bobo
.
Expected: The secret question of the currently logged-in user is updated to GabrielIsCool
and the
answer is updated to Bobo
.
Test Case: update
.
Expected: No user details are updated. Error indicating that at least one field must be specified is
shown in the feedback message.
Test Case: update --user G_briel123
.
Expected: No user details are updated. Error indicating username constraints is
shown in the feedback message.
Test Case: update --password Gabriel_IsCool --confirmPass Gabriel_IsCool
.
Expected: No user details are updated. Error indicating password constraints is
shown in the feedback message.
Test Case: update --password GabrielIsCool --confirmPass GabrielIsNotCool
.
Expected: No user details are updated. Error indicating password and confirm password do not match is
shown in the feedback message.
Test Case: update --password GabrielIsCool
.
Expected: No user details are updated. Error indicating that password and confirm password must be both present
or both absent is shown in the feedback message.
Test Case: update --secretQn Favourite Pet
.
Expected: No user details are updated. Error indicating that secret question and answer must be both present
or both absent is shown in the feedback message.
Logging out of the application.
Prerequisites: Logged-in into the application with the login
command.
Test Case: logout
.
Expected: The currently logged-in user is logged out of the application, currently displayed Customers/Deliveries
are hidden.
Test Case: logout extra
or other extra arguments.
Expected: Similar to previous.
Recovering user account.
Prerequisites: There exists a stored user in the application, and the answer of the currently stored user's secret question is "Koko".
Test Case: recover account
.
Expected: The currently stored user's secret question is displayed.
Test Case: recover account --answer Koko --password NewPassword123 --confirmPass NewPassword123
.
Expected: The currently stored user's password is updated to NewPassword123
Test Case: recover account --answer NotKoko --password NewPassword123 --confirmPass NewPassword123
Expected: No user details are updated. Error indicating that answer is incorrect is shown in the feedback
message.
Test Case: recover account --answer Koko --password NewPassword_123 --confirmPass NewPassword_123
.
Expected: No user details are updated. Error indicating password constraints is
shown in the feedback message.
Test Case: recover account --answer Koko --password NewPassword123 --confirmPass NewPassword1234
.
Expected: No user details are updated. Error indicating password and confirm password do not match is
shown in the feedback message.
Test Case: recover account --answer Koko --password NewPassword123
Expected: No user details are updated. Error indicating invalid command format is
shown in the feedback message.
Delete currently stored user account.
Prerequisites: There exists a user account currently stored in the application
Test Case: delete account
.
Expected: The currently stored user is deleted and all stored Customer and Delivery Data is deleted.
Test Case: delete account extra
or other extra arguments.
Expected: Similar to previous.
Adding a Customer to the application.
Prerequisites: Logged-in into the application with the login
command. There is currently no stored
Customer with a phone number of 87654321. There is currently a stored Customer with a phone number of 87651234.
Test Case: customer add --name Gabriel --phone 87654321 --email Gabrielrocks@gmail.com --address RVRC Block B
{.swift}.
Expected: A new Customer is added, with name Gabriel
, phone 87654321
,
email Gabrielrocks .com
and address RVRC Block B
. The details of the added Customer is
shown in the feedback message.
Test Case: customer add --name G_briel --phone 87654321 --email Gabrielrocks@gmail.com --address RVRC Block B
{.swift}.
Expected: No new Customer is added. Error indicating customer name constraints is
shown in the feedback message.
Test Case: customer add --name Gabriel --phone 987654321 --email Gabrielrocks@gmail.com --address RVRC Block B
{.swift}.
Expected: No new Customer is added. Error indicating phone number constraints is
shown in the feedback message.
Test Case: customer add --name Gabriel --phone abcdefgh --email Gabrielrocks@gmail.com --address RVRC Block B
{.swift}.
Expected: No new Customer is added. Error indicating phone number constraints is
shown in the feedback message.
Test Case: customer add --name Gabriel --phone 87651234 --email Gabrielrocks@gmail.com --address RVRC Block B
{.swift}.
Expected: No new Customer is added. Error indicating that the Customer already exists is
shown in the feedback message.
Test Case: customer add --name Gabriel --phone 987654321 --email Gabrielrocks --address RVRC Block B
{.swift}.
Expected: No new Customer is added. Error indicating email constraints is
shown in the feedback message.
Test Case: customer add --name Gabriel --phone 987654321 --email Gabrielrocks .com
.
Expected: No new Customer is added. Error indicating invalid command format is
shown in the feedback message.
View the details of a Customer.
Prerequisites: Logged-in into the application with the login
command.
There is currently a stored Customer with an ID of 1. There is only one Customer stored in the application.
Test Case: customer view 1
.
Expected: The details of the Customer with an ID of 1 is shown in the result message.
Test Case: customer view 0
.
Expected: No new Customer details are shown. Error indicating customer ID constraints is
shown in the feedback message.
Test Case: customer view -1
.
Expected: No new Customer details are shown. Error indicating invalid command format is
shown in the feedback message.
Test Case: customer view a
.
Expected: Similar to previous.
Test Case: customer view 2
.
Expected: No new Customer details are shown. Error indicating invalid customer ID is
shown in the feedback message.
List the Customers stored in the application.
Prerequisites: Logged-in into the application with the login
command.
There is at least one Customer Stored in the application.
Test Case: customer list
.
Expected: All customers are listed. A message indicating that Customers have been listed is
shown in the feedback message.
Test Case: customer list extra
.
Expected: Similar to previous.
Find a Customers matching query.
Prerequisites: Logged-in into the application with the login
command.
There are currently three stored Customers with names Alex Wong
, Alex Tan
and Tan Ah Meng
{.swift}.
Test Case: customer find Alex
.
Expected: Only the Customers Alex Wong
and Alex Tan
are shown.
A message indicating the number of Customers listed is shown in the result message.
Test Case: customer find Alex Tan
.
Expected: All three Customers, Alex Wong
, Alex Tan
and Tan Ah Meng
are shown.
A message indicating the number of Customers listed is shown in the result message.
Test Case: customer find Ale
.
Expected: No customers are shown. A message indicating the number of Customers listed
is shown in the result message.
Test Case: customer find
.
Expected: No customers are shown. An error indicating invalid command format is shown in the feedback message.
Test Case: customer find Al_x
.
Expected: No customers are shown. A message indicating the number of Customers listed
is shown in the result message.
Update the details of a specific Customer.
Prerequisites: Logged-in into the application with the login
command.
There is currently a stored Customer with an ID of 1. There is only one Customer stored in the application.
Test Case: customer edit 1 --name Gabriel
.
Expected: The name of the Customer with an ID of 1 is updated to Gabriel
.
The updated details of the Customer with an ID of 1 is shown in the feedback message.
Test Case: customer edit 1 --phone 98761234
.
Expected: The phone number of the Customer with an ID of 1 is updated to 98761234
.
The updated details of the Customer with an ID of 1 is shown in the feedback message.
Test Case: customer edit 1 --email GabrielIsCool .com
.
Expected: The email of the Customer with an ID of 1 is updated to GabrielIsCool .com
.
The updated details of the Customer with an ID of 1 is shown in the feedback message.
Test Case: customer edit 1 --address RVRC Block E
.
Expected: The address of the Customer with an ID of 1 is updated to RVRC Block E
.
The updated details of the Customer with an ID of 1 is shown in the feedback message.
Test Case: customer edit 1
.
Expected: No Customer details are updated. An error indicating that at least one field must be provided is shown
in the feedback message.
Test Case: customer edit 2 --name Gabriel
.
Expected: No Customer details are updated. An error indicating invalid customer ID is shown
in the feedback message.
Test Case: customer edit 0 --name Gabriel
.
Expected: No Customer details are updated. An error indicating invalid command format is shown
in the feedback message.
Delete a specified Customer.
Prerequisites: Logged-in into the application with the login
command.
There is currently a stored Customer with an ID of 1. There is only one Customer stored in the application.
Test Case: customer delete 1
.
Expected: The Customer with an ID of 1 is deleted. The details of the deleted Customer is shown
in the feedback message.
Test Case: customer delete 0
.
Expected: No Customer is deleted. Error indicating invalid command format is
shown in the feedback message.
Test Case: customer delete -1
.
Expected: Similar to previous.
Test Case: customer delete a
.
Expected: Similar to previous.
Test Case: customer delete 2
.
Expected: No Customer is deleted. Error indicating invalid Customer ID is
shown in the feedback message.
Adding a Delivery to the application.
Prerequisites: Logged-in into the application with the login
command.
There is currently a Customer stored with an ID of 1. And the current date is 2023-12-02.
Test Case: delivery add Chocolate Cake --customer 1 --date 2023-12-12
.
Expected: A new Delivery is added, with name Chocolate Cake
, Customer ID 1
,
expected delivery date 2023-12-12
, order date as today's date, delivery status as CREATED
,
and the address as the address of the Customer with an ID of 1.
The details of the added Customer is shown in the feedback message.
Test Case: delivery add Chocolate_Cake --customer 1 --date 2023-12-12
.
Expected: No new Delivery is added. An Error indicating delivery name constraints is
shown in the feedback message.
Test Case: delivery add Chocolate Cake --customer 0 --date 2023-12-12
.
Expected: No new Delivery is added. An Error indicating customer ID constraints is
shown in the feedback message.
Test Case: delivery add Chocolate Cake --customer a --date 2023-12-12
.
Expected: Similar to previous.
Test Case: delivery add Chocolate Cake --customer 2 --date 2023-12-12
.
Expected: No new Delivery is added. An Error indicating invalid Customer ID is
shown in the feedback message.
Test Case: delivery add Chocolate Cake --customer 1 --date 2023-12-01
.
Expected: No new Delivery is added. An Error indicating expected delivery date constraints is
shown in the feedback message.
Test Case: delivery add Chocolate Cake --customer 1 --date 2023-13-01
.
Expected: No new Delivery is added. An Error indicating date constraints is
shown in the feedback message.
Test Case: delivery add Chocolate Cake --date 2023-13-01
.
Expected: No new Delivery is added. An Error indicating invalid command format is
shown in the feedback message.
View the details of a Delivery.
Prerequisites: Logged-in into the application with the login
command.
There is currently a stored Delivery with an ID of 1. There is only one Delivery stored in the application.
Test Case: delivery view 1
.
Expected: The details of the Delivery with an ID of 1 is shown in the result message.
Test Case: delivery view 0
.
Expected: No new Delivery details are shown. Error indicating delivery ID constraints is
shown in the feedback message.
Test Case: delivery view -1
.
Expected: No new Delivery details are shown. Error indicating invalid command format is
shown in the feedback message.
Test Case: delivery view a
.
Expected: Similar to previous.
Test Case: delivery view 2
.
Expected: No new Delivery details are shown. Error indicating invalid delivery ID is
shown in the feedback message.
List the Deliveries stored in the application.
Prerequisites: Logged-in into the application with the login
command.
There are two Customers with an ID of 1 and 2 stored in the application.
There are three deliveries stored in the application.
The first with ID 1, Customer ID of 1, delivery status CREATED
, expected delivery date 2023-12-03
{.swift}.
The second with ID 2, Customer ID of 2, delivery status SHIPPED
, expected delivery date 2023-12-04
{.swift}.
The third with ID 3, Customer ID of 2, delivery status SHIPPED
, expected delivery date 2023-12-05
{.swift}.
The current date is 2023-12-03
.
Test Case: delivery list
.
Expected: All Deliveries are listed sorted in descending expected delivery date.
A message indicating that deliveries have been listen is shown in the feedback message.
Test Case: delivery list --status CREATED
.
Expected: The Delivery with an ID of 1 is listed. A message indicating that Deliveries have been listed is
shown in the feedback message.
Test Case: delivery list --customer 1
.
Expected: Similar to previous.
Test Case: delivery list --date today
.
Expected: Similar to previous.
Test Case: delivery list --date 2023-12-04
.
Expected: The Delivery with an ID of 2 is listed. A message indicating that Deliveries have been listed is
shown in the feedback message.
Test Case: delivery list --sort ASC
.
Expected: All Deliveries are listed sorted in ascending expected delivery date.
A message indicating that deliveries have been listen is shown in the feedback message.
Test Case: delivery list --customer 2 --status SHIPPED --sort ASC
.
Expected: The deliveries with ID 2 and 3 are listed in ascending expected delivery date.
A message indicating that deliveries have been listen is shown in the feedback message.
Test Case: delivery list --status INVALID
.
Expected: No Deliveries are listed. An Error indicating delivery status constraints
is shown in the feedback message.
Test Case: delivery list --customer 0
.
Expected: No Deliveries are listed. An Error indicating Customer ID constraints
is shown in the feedback message.
Test Case: delivery list --date 2023-13-04
.
Expected: No Deliveries are listed. An Error indicating expected delivery date constraints
is shown in the feedback message.
Test Case: delivery list --sort random
.
Expected: No Deliveries are listed. An Error indicating sort constraints
is shown in the feedback message.
Find Deliveries matching query.
Prerequisites: Logged-in into the application with the login
command.
There are currently three stored Deliveries with names Chocolate Cake
, Chocolate Bun
and
Strawberry Bun
Test Case: delivery find Chocolate
.
Expected: Only the Deliveries Chocolate Cake
and Chocolate Bun
are shown.
A message indicating the number of Deliveries listed is shown in the result message.
Test Case: delivery find Choclate Bun
.
Expected: All three Deliveries, Chocolate Cake
, Chocolate Bun
and Strawberry Bun
are shown. A message indicating the number of Customers listed is shown in the result message.
Test Case: delivery find Choc
.
Expected: No Deliveries are shown. A message indicating the number of Deliveries listed
is shown in the result message.
Test Case: delivery find
.
Expected: No Deliveries are shown. An error indicating invalid command format is shown in the feedback message.
Test Case: delivery find Chocolate_Cake
.
Expected: No Deliveries are shown. A message indicating the number of Deliveries listed
is shown in the result message.
Update the details of a specific Delivery.
Prerequisites: Logged-in into the application with the login
command.
There are currently two stored Customers with an ID of 1 and 2.
There is currently a stored Delivery with an ID of 1, Customer ID of 1.
There is only one stored Delivery in the application.
The current date is 2023-12-12
.
Test Case: delivery edit 1 --name Vanilla Cake
.
Expected: The name of the Delivery with an ID of 1 is updated to Vanilla Cake
.
The updated details of the Delivery with an ID of 1 is shown in the feedback message.
Test Case: delivery edit 1 --customer 2
.
Expected: The Customer ID of the Delivery with an ID of 1 is updated to 2
.
The updated details of the Delivery with an ID of 1 is shown in the feedback message.
Test Case: delivery edit 1 --date 2023-12-13
.
Expected: The expected delivery date of the Delivery with an ID of 1 is updated to 2023-12-13
.
The updated details of the Delivery with an ID of 1 is shown in the feedback message.
Test Case: delivery edit 1 --status CANCELLED
.
Expected: The delivery status of the Delivery with an ID of 1 is updated to CANCELLED
.
The updated details of the Delivery with an ID of 1 is shown in the feedback message.
Test Case: delivery edit 1 --note By FedEx
.
Expected: The note of the Delivery with an ID of 1 is updated to By FedEx
.
The updated details of the Delivery with an ID of 1 is shown in the feedback message.
Test Case: delivery edit 1
.
Expected: No Delivery details are updated. An error indicating that at least one field must be provided is shown
in the feedback message.
Test Case: delivery edit 1 --name Vanilla_Cake
.
Expected: No Delivery details are updated. An error indicating delivery name constraints is shown
in the feedback message.
Test Case: delivery edit 1 --customer 0
.
Expected: No Delivery details are updated. An error indicating invalid command format is shown
in the feedback message.
Test Case: delivery edit 1 --customer 3
.
Expected: No Delivery details are updated. An error indicating invalid Customer ID is shown
in the feedback message.
Test Case: delivery edit 1 --date 2023-13-13
.
Expected: No Delivery details are updated. An error indicating expected delivery date constraints is shown
in the feedback message.
Test Case: delivery edit 1 --date 2023-12-11
.
Expected: No Delivery details are updated. An error indicating expected delivery date constraints is shown
in the feedback message.
Test Case: delivery edit 1 --status INVALID
.
Expected: No Delivery details are updated. An error indicating delivery status constraints is shown
in the feedback message.
Test Case: delivery edit 1 --note By_FedEx
.
Expected: No Delivery details are updated. An error indicating note constraints is shown
in the feedback message.
Test Case: delivery edit 2 --name Vanilla Cake
.
Expected: No Delivery details are updated. An error indicating invalid Delivery ID is shown
in the feedback message.
Test Case: delivery edit a --name Vanilla Cake
.
Expected: No Delivery details are updated. An error indicating invalid command format is shown
in the feedback message.
Update the status of a specific Delivery.
Prerequisites: Logged-in into the application with the login
command.
There is currently a stored Delivery with an ID of 1.
There is only one stored Delivery in the application.
Test Case: delivery status 1 SHIPPED
.
Expected: The delivery status of the Delivery with an ID of 1 is updated to SHIPPED
.
The updated details of the Delivery with an ID of 1 is shown in the feedback message.
Test Case: delivery status 1 INVALID
.
Expected: No delivery statuses are updated. An error indicating delivery status constraints is shown
in the feedback message.
Test Case: delivery status 0 SHIPPED
.
Expected: No delivery statuses are updated. An error indicating delivery ID constraints is shown
in the feedback message.
Test Case: delivery status 2 SHIPPED
.
Expected: No delivery statuses are updated. An error indicating invalid delivery ID is shown
in the feedback message.
Test Case: delivery status SHIPPED 1
.
Expected: No delivery statuses are updated. An error indicating invalid command format is shown
in the feedback message.
Create a note for a specific delivery.
Prerequisites: Logged-in into the application with the login
command.
There is currently a stored Delivery with an ID of 1.
There is only one stored Delivery in the application.
Test Case: delivery note 1 --note By FedEx
.
Expected: The note of the Delivery with an ID of 1 is updated to By FedEx
.
The updated details of the Delivery with an ID of 1 is shown in the feedback message.
Test Case: delivery note 1 --note By_FedEx
.
Expected: No delivery notes are updated. An error indicating note constraints is shown
in the feedback message.
Test Case: delivery note 0 --note By FedEx
.
Expected: No delivery notes are updated. An error indicating invalid command format is shown
in the feedback message.
Test Case: delivery note a --note By FedEx
.
Expected: Similar to previous.
Test Case: delivery note 1
.
Expected: Similar to previous.
Test Case: delivery note 2 --note By FedEx
.
Expected: No delivery notes are updated. An error indicating invalid delivery ID is shown
in the feedback message.
Delete a specific delivery.
Prerequisites: Logged-in into the application with the login
command.
There is currently a stored Delivery with an ID of 1.
There is only one stored Delivery in the application.
Test Case: delivery delete 1
.
Expected: The Delivery with an ID of 1 is deleted. The details of the deleted Delivery is shown
in the feedback message.
Test Case: delivery delete 0
.
Expected: No Delivery is deleted. An Error indicating invalid command format is
shown in the feedback message.
Test Case: delivery delete -1
.
Expected: Similar to previous.
Test Case: delivery delete a
.
Expected: Similar to previous.
Test Case: delivery delete 2
.
Expected: No Delivery is deleted. An Error indicating invalid Delivery ID is
shown in the feedback message.
Shows the help information to the user.
Prerequisites: None.
Test Case: help
.
Expected: Help message is shown in the feedback message. A new window is created with the link to the User Guide.
Test Case: help extra
.
Expected: Similar to previous.
Exits the application.
Prerequisites: None.
Test Case: exit
.
Expected: The application exits.
Test Case: exit extra
.
Expected: Similar to previous.
Clears all Customer and Delivery data.
Prerequisites: Logged-in into the application with the login
command.
Test Case: clear
.
Expected: All stored Customer and Delivery data is deleted from the application. A message indicating that data
is cleared is shown in the feedback message.
Test Case: clear extra
.
Expected: Similar to previous.
Dealing with missing/corrupted data files.
Prerequisites: There are existing Customer and Delivery Data files with existing stored Customers and Deliveries.
Test Case: Close the application and delete addressbook.json
.
Expected: Upon the next application start and login, a new addressbook.json
is created and
deliverybook.json
is cleared.
Test Case: Close the application and delete addressbook.json
.
Expected: Upon the next application start and login, a new deliverybook.json
is created.
Test Case: Close the application and edit addressbook.json
by changing the name of the first Customer
to John_Doe
.
Expected: Upon the next application start and login, addressbook.json
and
deliverybook.json
is cleared.
Test Case: Close the application and edit deliverybook.json
by changing the name of the first Delivery
to Chocolate_Cake
.
Expected: Upon the next application start and login, deliverybook.json
is cleared.
This project was moderately challenging as we had to deal with a large existing code base. It took us some time to understand how the different components interact with each other. Furthermore, our team was not familiar with frameworks such as JavaFX prior to this, and we had to learn how to use it.
Person
into Customer
, and irrelevant
classes such as Tag
has to be removed.BookStorageWithReference
class that accepts two type parameters to be created.PersonListPanel
to ListPanel
PersonListPanel
was designed to contain a list of Person
. However, as we decided to display both
Customer
and Delivery
in the same list, we had to adapt the PersonListPanel
to ListPanel
to
accommodate both types of entities.