Overview
Delino is a desktop application for couriers to manage delivery tasks. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 16 kLoC.
Summary of contributions
-
Major enhancement: Add
nearby
command (searching by postal sector) (+1091 -45 LOC)
(Pull request #181)-
What it does:
Allows the user to find all orders located at a specified postal sector. -
Justification:
It is helpful for our target audience, couriers, to find all relevant orders at a specific postal sector.
This would allow them to deliver their pending orders in a more efficient manner. -
Highlights:
Ability to find orders based on all postal codes in Singapore.
A helpful message regarding the specified postal code is also shown.
Parsing has been done to user input of a valid postal sector (the first two digits of a six digit Singapore postal code). Figuring out an effective way of testing and implementing all possible postal sectors was time consuming as there are 28 postal sectors in Singapore.
Thankfully, JUnit 5 has parameterized tests that allowed me to test more effectively. The mapping of postal sectors was done using a HashMap. -
Credits: Information about the various postal sectors was obtained from here
-
-
Major enhancement: Enhancement to
nearby
command to search the 5 general regions of Singapore-
Add ability for
nearby
command to search orders located at one of the 5 areas of Singapore:
Central, East, North-east, West, North. (+1,579 −164 LOC)
(Pull request #194) -
What it does:
Allows the user to find all orders located at a specified region of Singapore. -
Justification:
This makes it easy for couriers in a certain area to select orders to be done in that region. -
Highlights:
Ability to find orders based on the 5 regions in Singapore. A helpful message regarding the specified area is also shown.
The 5 regions were mapped using a separate helper class as these regions were grouped using their postal sectors. -
Credits: Information about the various areas was obtained from https://keylocation.sg/singapore/districts-map
-
-
Minor enhancement:
-
Add Warehouse field for Orders.
(Pull request #174)-
What it does: Allows for orders to keep track of warehouse.
-
Justification: It is a must have. Couriers need to keep track of the warehouse they need to collect/return the order to.
-
-
-
Minor enhancement:
-
Modify delete command to take in flags.
(Pull request #240) (Pull request #304)-
What it does: Allows for deletion of orders or return orders.
-
Justification: It is a must have. Couriers need to be able to delete from a specific list. Our application has two lists: Order list and Return Order list. Deletion is done by providing an appropriate flag.
-
-
-
Code contributed: [Functional code and Test Code]
-
Other contributions:
-
Project management: In charge of Documentation. Supporting role in Testing and Code Quality.
-
Documentation:
-
Update delete and nearby command DG: #251
-
-
Community:
-
Tools:
-
Contributions to the User Guide
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
How to navigate this user guide
Throughout this user guide, you might encounter additional symbols. These symbols are used to
highlight important information.
This user guide uses the following symbols:
This block contains additional notes. |
This block contains additional tips. |
This block contains warning information. |
This block contains important information that you should be mindful of. |
text markup
: This is used to indicate keywords such as command arguments to Delino. (e.g. exit
)
[FLAG]
: For the various commands, you might encounter keywords placed in square brackets.
(e.g. nearby
[FLAG]
AREA
)
These indicate the optional arguments to a command.
Keywords that are capitalized represent all possible combinations of an argument.
(e.g. [FLAG]
represents all possible flag arguments available).
For the list of all possible combinations of an argument, you can refer to the glossary
Finally, you will encounter links to external web pages for additional information. These links will look like this.
Features
Deleting an order : delete
[Done by - Loh Jeremy Wen Jun]
In this section, you will learn more about the delete
command,
how to use it and the
possible usage scenarios of the delete
command.
The delete
command is useful if you would like to delete a specific order from either
the order list or return order list.
This would allow you to correct any accidental additions that you may have made
when inserting orders or importing an order file.
How to use the Delete command
In this section, you learn more about the exact inputs required to use the delete
command.
Here are the steps you should follow to delete an order using the delete
command:
Step 1 : Type in the keyword delete
Step 2 : Provide a FLAG
to indicate which list to delete your order from
A |
Step 3 : Provide an INDEX
to indicate the specific order to delete based on the list
The |
Step 4 : Press Enter
on your keyboard to see the magic!
What constitutes a valid Delete command
In this section, you will learn more about the syntax of the delete
command
The syntax for a valid delete
command is the following:
delete
FLAG
INDEX
Delete command usage scenarios
In this section, you will learn more about the various usage scenarios of the delete
command!
These are the possible combinations of the delete
command:
Scenario | Command | Result |
---|---|---|
If you want to delete the second order from the order list. |
|
Deletes the 2nd order from the order list. |
If you want to delete the third order from the return order list. |
|
Deletes the 3rd return order from the return order list. |
If you want delete the first order that belongs to the customer 'Betsy'. |
|
Deletes the 1st order in the results of the |
If you want to obtain all orders in the return order list located in the central region of Singapore. |
|
Deletes the 1st return order in the results of the |
Viewing orders located at the same area or postal sector: nearby
[Done by - Loh Jeremy Wen Jun]
In this section, you will learn more about the nearby
command,
how to use it and the
possible usage scenarios of the nearby
command.
The nearby
command is useful if you would like to obtain all orders located in the same
postal sector or region of Singapore. This would allow you to be more efficient with your delivery
orders.
How to use the nearby command
In this section, you learn more about the exact inputs required to use the nearby
command.
Here are the steps you should follow to obtain all orders using the nearby
command:
Step 1 : Type in the keyword nearby
Step 2 (optional) : Provide an optional FLAG
that indicates which order list to
search (order list or return order list).
A |
By default, if no FLAG
is provided, both order list and return order list will be searched.
Step 3 : Provide either a POSTAL SECTOR
or an AREA
A An
A quick reference for the five areas of Singapore can be found here. You can obtain more detailed information about each area from this website |
Step 4 : Press Enter
on your keyboard to see the magic!
What constitutes a valid nearby command
In this section, you will learn more about the syntax of the nearby
command
The syntax for a valid nearby
command can be one of the following:
1. nearby
[FLAG]
POSTAL_SECTOR
2. nearby
[FLAG]
AREA
An optional A An
A quick reference for the five areas of Singapore can be found here |
Nearby command usage scenarios
In this section, you will learn more about the various usage scenarios of the nearby
command!
These are the possible combinations of the nearby
command:
Scenario | Command | Result |
---|---|---|
If you want to obtain all orders in both the order list and return order list located in the the north region of Singapore. |
|
All orders in the order list and return order list that are located in the north region of Singapore will be displayed. |
If you want to obtain all orders in the order list located in the general location of |
|
All orders in the order list that are located in postal sector |
If you want to obtain all orders in the return order list located in the general location of |
|
All orders in the return order list that are located in the postal sector |
If you want to obtain all orders in the return order list located in the central region of Singapore. |
|
All orders in the return order list that are located in the central region of Singapore will be displayed. |
Suppose you are delivering an order to Buona Vista and would like to know all the orders located near
that region (central region of Singapore). Are you going manually look through all of your orders and
find those that are located near Buona Vista? |
|
All orders in the order list that are located in the central region of Singapore will be displayed. |
You can obtain more information about the various postal sectors in the following table:
Postal Sector | General Location |
---|---|
01, 02, 03, 04, 05, 06 |
Raffles Place, Cecil, Marina, People’s Park |
07, 08 |
Anson, Tanjong Pagar |
14, 15, 16 |
Queenstown, Tiong Bahru |
09, 10 |
Telok Blangah, Harbourfront |
11, 12, 13 |
Pasir Panjang, Hong Leong Garden, Clementi New Town |
17 |
High Street, Beach Road (part) |
18, 19 |
Middle Road, Golden Mile |
20, 21 |
Little India |
22, 23 |
Orchard, Cairnhill, River Valley |
24, 25, 26, 27 |
Ardmore, Bukit Timah, Holland Road, Tanglin |
28, 29, 30 |
Watten Estate, Novena, Thomson |
31, 32, 33 |
Balestier, Toa Payoh, Serangoon |
34, 35, 36, 37 |
Macpherson, Braddell |
38, 39, 40, 41 |
Geylang, Eunos |
42, 43, 44, 45 |
Katong, Joo Chiat, Amber Road |
46, 47, 48 |
Bedok, Upper East Coast, Eastwood, Kew Drive |
49, 50, 81 |
Loyang, Changi |
51, 52 |
Tampines, Pasir Ris |
53, 54, 55, 82 |
Serangoon Garden, Hougang, Punggol |
56, 57 |
Bishan, Ang Mo Kio |
58, 59 |
Upper Bukit Timah, Clementi Park, Ulu Pandan |
60, 61, 62, 63, 64 |
Jurong |
65, 66, 67, 68 |
Hillview, Dairy Farm, Bukit Panjang, Choa Chu Kang |
69, 70, 71 |
Lim Chu Kang, Tengah |
72, 73 |
Kranji, Woodgrove |
77, 78 |
Upper Thomson, Springleaf |
75, 76 |
Yishun, Sembawang |
79, 80 |
Seletar |
Glossary
Command Prefix
Prefix | Order Attributes | Used in the following Command(s) |
---|---|---|
ot/ |
Order Type |
|
tid/ |
Transaction ID |
|
n/ |
Customer Name |
|
a/ |
Address |
|
p/ |
Phone Number |
|
e/ |
||
dts/ |
Delivery Date And Time |
|
rts/ |
Return Date and Time |
|
w/ |
Warehouse Location |
|
cod/ |
Cash On Delivery |
|
c/ |
Comments by Customer |
|
type/ |
Type of Item |
Command Flags
Flag | Meaning | Used in the following Command(s) |
---|---|---|
-f |
Force clear, no user confirmation will be requested |
|
-o |
Order flag, Operation on order list |
|
-r |
Return Order flag, Operation on return order list |
Area Information of Singapore
Click here to navigate back to the Nearby Command!
District | Areas | Location |
---|---|---|
1 |
Marina Area |
|
2 |
CBD |
|
3 |
Central South |
|
4 |
Keppel |
|
5 |
South West |
|
6 |
City Hall |
|
7 |
Beach Road |
|
8 |
Little India |
|
9 |
Orchard |
|
10 |
Tanglin |
|
11 |
Newton |
|
12 |
Toa Payoh |
|
13 |
Central East |
|
14 |
Eunos |
|
15 |
East Coast |
|
21 |
Central West |
|
District | Areas | Location |
---|---|---|
16 |
Upper East Coast |
|
17 |
Far East |
|
18 |
Tampines |
|
District | Areas | Location |
---|---|---|
19 |
North East |
|
20 |
Ang Mo Kio |
|
28 |
North East |
|
District | Areas | Location |
---|---|---|
22 |
Far West |
|
23 |
North West |
|
24 |
Far North West |
|
District | Areas | Location |
---|---|---|
25 |
Far North |
|
26 |
North |
|
27 |
Far North |
|
Contributions to the Developer Guide
Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project. |
Features
Delete Feature
In this section, the functionality of the delete
feature, the
expected execution path,
the structure of the DeleteCommand class and the interactions
between objects with the DeleteCommand will be discussed.
What is the Delete Feature
The delete
feature allows the user to delete orders in either the order list or return order list.
The delete
feature was implemented as a DeleteCommand in the Logic package.
The delete
command has the following format:
-
delete
FLAG
INDEX
|
Execution paths of Delete command
In this section, you will learn more about the execution paths for the delete
command.
There are four possible execution paths for the delete
command
-
User provides an invalid
delete
command input
This results in a parse exception -
User provides a valid
delete
command input that has a flag indicating deletion from the order list.
The specified order will be deleted from the order list. -
User provides a valid
delete
command input that has a flag indicating deletion from the return order list.
The specified return order will be deleted from the return order list. -
User provides an invalid
delete
command input that has an invalid flag.
A Command Exception wil be generated.
Structure of Delete command
In this section, you will learn more about the relationships between objects
related to the delete
command.
In the DeleteCommand class, there are also static strings present that represent the
various possible messages.
For some of the message strings, there are placeholder %s strings used for including dynamic input
These messages are the following:
-
MESSAGE_DELETE_ORDER_SUCCESS
Deleted Order: %1$s -
MESSAGE_DELETE_RETURN_ORDER_SUCCESS
Deleted Return Order: %1$s -
MESSAGE_INVALID_FLAG
Invalid flag given!
Interactions between Delete command and its associated objects
In this section, you will learn more about the delete
command and its inner workings.
The sequence diagram below shows the interactions for a delete
command execution of
delete
-o
1
.
This indicates that the first order should be deleted from the order
list.
delete
-o
1
The arguments passed to the delete
command will be parsed by the DeleteCommandParser class.
If the given arguments are valid, a new DeleteCommand object will be returned.
In this class, invalid arguments will result in a ParseException.
Two checks will be done for the arguments:
-
Invalid
FLAG
argument -
Invalid
INDEX
argument
When the LogicManager runs the execute()
method of DeleteCommand,
DeleteCommand will first check the list to delete from.
The deleteFromOrderList(model) method of DeleteCommand will then
be called and the filtered order list will be obtained from the getFilteredOrderList()
method of the model.
The specified order at INDEX
1 will be deleted using the deleteOrder(order) method
in the model.
A new CommandResult will be created and returned to the LogicManager.
The sequence diagram below shows the interactions for a delete
command execution of
delete
-r
2
.
This indicates that the second order should be deleted from the return order
list.
delete
-r
2
The arguments passed to the delete
command will be parsed by the DeleteCommandParser class.
If the given arguments are valid, a new DeleteCommand object will be returned.
In this class, invalid arguments will result in a ParseException.
Two checks will be done for the arguments:
-
Invalid
FLAG
argument -
Invalid
INDEX
argument
When the LogicManager runs the execute() method of DeleteCommand,
DeleteCommand will first check the list to delete from.
The deleteFromReturnList(model) method of DeleteCommand will then
be called and the filtered return order list will be obtained from the getFilteredReturnOrderList()
method of the model.
The specified return order at INDEX
2 will be deleted using the deleteReturnOrder(returnOrder) method
in the model.
A new CommandResult will be created and returned to the LogicManager.
Nearby Feature
In this section, the functionality of the nearby
feature, the
expected execution path, the structure of the NearbyCommand class
and the interactions between objects with the NearbyCommand object will be discussed.
In this section, you will learn more about how the nearby
feature is implemented.
What is the Nearby Feature
The nearby
feature allows the user to view all orders that are located at a particular area
based on a given search criteria.
The nearby
feature was implemented as a NearbyCommand in the Logic package.
The nearby
command has two possible formats:
-
nearby
FLAG
POSTAL_SECTOR
-
nearby
FLAG
AREA
|
Execution paths of Nearby command
In this section, you will learn more about the execution paths for the nearby
command.
There are four possible execution paths for the nearby
command
-
User provides an invalid
nearby
command input
This results in a parse exception -
User provides a valid
nearby
command input that has no flags
All matching nearby orders will be shown for all lists (order list and return order list) -
User provides a valid
nearby
command input that has one flag. This flag indicates the order list (-o
)
All matching nearby orders will be shown for the order list. -
User provides a valid
nearby
command input that has one flag. This flag indicates the return order list (-r
)
All matching nearby orders will be shown for the return order list.
The matching orders are determined based on the given user argument.
If a two digit integer is given, searching of nearby orders will be based on their postal sector.
Else, searching of nearby orders will be based on their area.
There are currently five areas that are searchable:
-
Central
-
East
-
North-East
-
West
-
North
Structure of Nearby command
In this section, you will learn more about the relationships between objects
related to the nearby
command.
In the NearbyCommand class, there are also static strings present that represent the
various possible messages.
For some of the message strings, there are placeholder %s strings used for including dynamic input
These messages are the following:
-
MESSAGE_USAGE
nearby: View all orders located at the same postal sector based on the displayed list.
Parameters: [FLAG] POSTAL_SECTOR or AREA
An optional flag may be given to indicate the list to be searched for.
The flag can be either -o for orders for -r for return orders
A postal sector is the first two digits of a six digit Singapore postal code
An area is one of the following: Central, East, North-East, West, North
Example: nearby -o 14
Example: nearby -r central
Example: nearby east -
MESSAGE_SUCCESS_POSTAL_SECTOR
Displayed all orders in postal sector.
General Location: %1$s -
MESSAGE_SUCCESS_AREA
Displayed all orders in area (%s) -
MESSAGE_FAILURE_POSTAL_SECTOR
Invalid postal sector given. -
MESSAGE_FAILURE_AREA
Invalid area given.
Interactions between Nearby command and its associated objects
In this section, you will learn more about the nearby
command and its inner workings.
The sequence diagram below shows the interactions for a nearby
command execution of
nearby
-o
14
.
This indicates that the order list should be operated on and
all orders in the order list that have a POSTAL_SECTOR
of 14
should be displayed to the user.
nearby
-o
14
The arguments passed to the Nearby Command will be parsed by the NearbyCommandParser class.
If the given arguments are valid, a new NearbyCommand object will be returned.
In this class, invalid arguments will result in a ParseException.
Two types of invalid arguments are checked for: empty arguments
and arguments with only whitespace characters.
The execute() function of the NearbyCommand will first check if the given arguments are in the format required for postal sector search (the argument can be converted into an integer). If the first check is successful, the argument will be converted into an integer and a second check is performed via the isValidPostalSector(Index postalSector) function of the NearbyCommandUtil helper class.
NearbyCommandUtil is a helper class that contains functions and variables used for
identifying postal sectors and their corresponding general locations.
|
The model will then be updated by the updateFilteredOrderList(orderPredicate) function.
A CommandResult is then generated and returned to the LogicManager.
The sequence diagram below shows the interactions for a nearby
command execution of
nearby
-o
central
.
This indicates that the order list should be operated on and
all orders in the order list that have an AREA
of central
should be displayed to the user.
nearby
-o
central
The NearbyCommandParser will check for invalid arguments given by the user.
Invalid arguments can be either empty arguments or arguments with
only whitespace characters.
A ParseException will be generated if an invalid argument is present.
A new NearbyCommand will be created and returned to LogicManager.
LogicManager will then call the execute() function of the NearbyCommand.
There will then be a check for whether the given argument is a valid area with the
function isValidArea(area) present in the DistrictInfo class.
DistrictInfo is a helper class that contains functions and variables used for
identifying areas. |
The model will then be updated using the updateFilteredOrderList(orderPredicate) function.
A new CommandResult will be created and returned to the LogicManager.
The sequence diagram below shows the interactions for a nearby
command execution of
nearby
.
This will result in a ParseException as invalid arguments are provided.
nearby
commandThe exception will be thrown in the NearbyCommandParser.
Glossary
Prefix | Meaning | Used in the following Command(s) |
---|---|---|
ot/ |
Order Type |
|
tid/ |
Transaction ID |
|
n/ |
Customer Name |
|
a/ |
Address |
|
p/ |
Phone Number |
|
e/ |
||
dts/ |
Delivery Date And Time |
|
rts/ |
Return Date and Time |
|
w/ |
Warehouse Location |
|
cod/ |
Cash On Delivery |
|
c/ |
Comments by Customer |
|
type/ |
Type of Item |
Flag | Meaning | Used in the following Command(s) |
---|---|---|
-f |
Force clear, no user confirmation will be requested |
|
-o |
Order flag, Operation on order list |
|
-r |
Return Order flag, Operation on return order list |
Use Case
Use case: UC03 - Delete an order
Preconditions: There should be a valid order/return order that can be deleted.
MSS
-
User requests to list orders (UC10).
-
User wants to delete a specific order/return oder.
-
User requests to delete a specific order/return order in the list.
-
Delino deletes the order/return order.
-
Delino displays order/return order deleted.
Use case ends.
Extensions
-
3a. Delino detects invalid syntax from user input.
-
3a1. Delino shows an error message.
Use case ends.
-
-
3b. The given index for deletion is not valid.
-
3b1. Delino shows an error message indicating an invalid deletion index has been provided.
Use case ends.
-
Use case: UC12 - Obtain orders in a postal sector
MSS
-
User wants to obtain all orders in a specified postal sector.
-
User requests to obtain orders in a specified postal sector
-
Delino obtains all orders located in the postal sector
-
Delino display the list of orders
Use case ends.
Extensions
-
2a. Delino detects invalid syntax from user input.
-
2a1. Delino shows an error message.
Use case ends.
-
-
3a. Delino detects no orders.
-
3a1. Delino shows empty order list message.
Use case ends.
-
Appendix A: Product Survey
Pros:
-
You can take a picture of the parcel and it is automatically added to the application for tracking.
-
You can also receive weekly statistics on your delivery tasks and time saved.
-
The application interface looks good and easy to navigate.
Cons:
-
Required to scan the parcels one by one, which can be slow and tedious.
-
There does not seem to be a feature to keep track of parcels in a particular area/region.
Pros:
-
You can take a picture of the parcel barcode to add to the application for tracking.
-
There is language support for chinese language (in addition to english)
Cons:
-
There are no statistics available.
-
Required to scan the parcels one by one, which can be slow and tedious.
Appendix G: Instructions for Manual Testing
Deleting an order
-
Deleting an order with respect to the current list displayed
-
Delete command format:
delete
FLAG
INDEX
-
Prerequisites: List all orders using the
list
command. Multiple orders in the list -
Test case:
delete
-o
1
Expected: The first order item in the current order list will be removed. Details of the deleted order will be displayed in the response box -
Test case:
delete
-r
2
Expected: The second item in the current return order list will be removed. Details of the deleted order will be displayed in the response box -
Test case:
delete
20
Expected: No order is deleted as noFLAG
is provided.
An error message will be displayed in the response box. -
Test case:
delete
-r
INVALID_INDEX
Expected: No order is deleted. An error message will be displayed in the response box, indicating that the index cannot be found in the list
-
Obtain all nearby orders based on area or postal sector
There are two possible search criteria for nearby orders
-
Obtain all orders located in the same postal sector.
The postal sector to search for is given by the user.
A postal sector is the first two digits of a six digit Singapore postal code.
The list of postal sectors and their corresponding general locations can be found here.-
Nearby command format:
nearby
[FLAG]
POSTAL_SECTOR
-
Prerequisites: Should call a list command before calling nearby. The nearby command will search based on the current list
-
Test case:
nearby
-o
79
Expected: Obtain all orders located in postal sector 79 (Seletar) -
Test case:
nearby
-r
07
Expected: Obtain all return orders located in postal sector 07 (Anson, Tanjong Pagar) -
Test case:
nearby
-o
99
Expected: An error will occur as the given postal sector is invalid -
Test case:
nearby
-o
600
Expected: An error will occur as the given postal sector is invalid -
Test case:
nearby
-o
Expected: An error will occur as it is an invalid syntax (no postal sector is provided)
-
-
Obtain all orders located in the same area.
There are 5 different areas in Singapore: Central, East, North East, West, North-
Nearby command format:
nearby
[FLAG]
AREA
-
Prerequisites: Should call a list command before calling nearby. The nearby command will search based on the current list
-
Test case:
nearby
-o
central
Expected: Obtain all orders located in central area of Singapore -
Test case:
nearby
-r
east
Expected: Obtain all return orders located in east area of Singapore -
Test case:
nearby
-o
north east
Expected: Obtain all orders located in east area of Singapore -
Test case:
nearby
-r
west
Expected: Obtain all return orders located in east area of Singapore -
Test case:
nearby
-r
north
Expected: Obtain all return orders located in east area of Singapore -
Information about each area was obtained from this website
-