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:
-
Added
search
feature (Pull request #187)
Functionality of feature can be found here and implementation of it can be found here.-
What it does:
Allows the user to specifically search for keywords that matches any fields of the parcel. The user are also able to narrow down their search range by providing different flags and prefixes. -
Justification:
This is one of the key feature of Delino as it allows the user to sieve out parcels of their interest from the large parcels list. -
Highlights:
This enhancement is heavily affected by the fields added in parcel. A new field requires an update for Search, hence affecting future implementation. Implementing this feature requires the thorough understanding of the existing class in AB3 such as theArgumentMultimap
and theNameContainsKeywordsPredicate
. Furthermore, JavaFX classPredicate
was used to achieve functionality of this feature. Moreover, as this features allows user to search in many different possible way, testing the different scenarios are hard. ParametizedTest of JUnit testing was used to make my test code much cleaner.
-
-
Updated
edit
feature (Pull request #234)
Functionality of feature can be found here and implementation of it can be found here.-
What it does:
Allows the user to edit specific fields of a parcel, Order or Return Order. -
Justification:
This is one of the key feature of Delino as it allows the user to edit any field in Orders or Return Orders. It is especially important as the user might need to reschedule the delivery date due to unforeseen circumstances. -
Highlights:
This enhancement is affected by the design of parcel class. It affects the future implementation of any future features that will alter the parcel design. This feature requires a thorough understanding of the existing code of AB3 such as theArgumentMultimap
class.
-
-
-
Minor enhancement:
-
Code contributed: [Functional code & Test code]
-
Other contributions:
-
Project management:
-
Enhancements to existing features:
-
Documentation:
-
Update Edit feature, Search feature, Quick start, Glossary and minor documentation bugs of User Guide (Pull requests: #91, #92, #128, #135, #177, #195, #227, #316).
-
Update Use cases 1-6, Product Scope, Image rendering bug, Search feature and Edit feature of Developer Guide (Pull requests: #76, #114, #178, #204, #208, #231, #249, #259, #316).
-
Added own email in ContactUs, changed title of all documents to match Delino name and Update of own PPP (Pull requests : #80, #92, #321).
-
-
Community:
-
Tools:
-
Integrated a third party library (Travis) to the project (#8f78de0)
-
-
Contributions to the User Guide
Given below are sections that I have contributed to Delino’s User Guide. They showcase my ability to write documentation targeting end-users. |
Edit feature
This whole section on Edit feature can be found here. This link is provided in the event if some of the cross links are not working, as they refer to documents done by another team member.
Editing an order : edit
[Done by - Kenny Ho Si Chong]
In this section, you will be able to find out how to properly use the edit
command and the relevant examples.
Why will you want to use the edit
command? If you wish to edit any field of a parcel, the edit
command will provide you the means to do so.
How to use the Edit command
Here is how you can edit the details of any parcel by following the steps below:
Step 1 : Type in the keyword edit
Step 2 : Provide the FLAG
corresponding to the parcel order type you want to edit
Step 3 : Provide the INDEX
of the parcel displayed on the screen that you wish to edit
Step 4 : Provide the ORDER_ATTRIBUTE_PREFIX
coupled with a front slash /
and the new value you want to change to.
Step 5 : Press Enter
on your keyboard to see the magic!
What constitutes a valid Edit command
The syntax for a valid edit
command can be seen below:
-
edit
FLAG
INDEX
ORDER_ATTRIBUTE_PREFIX/NEW_VALUE
[ORDER_ATTRIBUTE_PREFIX/NEW_VALUE]…
|
These are the possible combinations of the edit
command:
Scenario | Command | Result |
---|---|---|
If you want to edit the name of the first return order displayed on returns list |
|
The index |
If you want to edit the phone number of the second order displayed on the orders list. |
|
The index |
If you want to edit the address of the first order displayed on the orders list. |
|
The index |
If you want to edit the name, phone number and address of the third return order displayed on the returns list. |
|
The index |
|
Search feature
This whole section on Search feature can be found at here. This link is provided in the event if some of the cross links are not working, as they refer to documents done by another team member.
Searching for parcels using their attributes: search
[Done by Kenny Ho Si Chong]
In this section, you will be able to find out how to properly use the search
command and the relevant examples.
Why will you want to use the search
command? If you wish to search for a parcel with specific keywords, the search
command will provide you the means to do so.
How to use the Search command?
Here is how you can search for any parcel containing the keywords given by the following steps below:
Step 1 : Type in the keyword search
Step 2 (optional) : Provide -o
flag if you want to only search for parcels in the order list. A -r
flag also can be used to only search for parcels in the return order list.
If no flag is given in this step, |
Step 3 (optional) : If you wish to only specifically search for keywords in a field, you should provide the ORDER_ATTRIBUTE_PREFIX
coupled with a front slash /
and the keyword you want to search for.
Step 4 : Provide any number of alphanumeric words you wish to search for in the parcel.
Step 5 : Press Enter
on your keyboard to see the magic!
|
What constitutes a valid Search command?
The syntax for a valid search
command can be seen below:
-
search
[FLAG]
KEYWORD
[MORE_KEYWORDS]…
OR -
search
[FLAG]
ORDER_ATTRIBUTE_PREFIX/KEYWORD
[MORE_KEYWORDS]…
[ORDER_ATTRIBUTE_PREFIX/KEYWORD]
[MORE_KEYWORDS]…
|
These are the possible combinations of the search
command:
Scenario | Command | Result |
---|---|---|
If you want to search for any return parcel containing the keyword |
|
Return all return order(s) containing keyword of |
If you want to search for any order parcel that contain the transaction id of |
|
Return all order(s) with transaction ID of |
If you want to search for any return parcel that contain the phone number of |
|
Return all return order(s) with phone number of |
If you want to only search for any order parcel that contains either the phone number |
|
Return all order(s) with either phone number of |
If you want to search for any parcel containing the name |
|
Return all parcel(s) with the name of |
|
Command summary
This whole section on Command summary can be found at here. This link is provided in the event if some of the cross links are not working, as they refer to documents done by another team member.
In this section, you can find out more about the commands supported by Delino (their respective format and example).
If you would like to know more about a specific command, you can view more information by clicking the provided link in the table below.
Command | Format | Example |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Contributions to the Developer Guide
Given below are sections that I have contributed to Delino’s Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project. |
Edit feature
This whole section on Edit feature can be found here. This link is provided in the event if some of the cross links are not working, as they refer to documents done by another team member.
Edit Feature
In this section, the functionality of the edit
feature, the
expected execution path, the structure of the EditCommand class
and the interactions between objects with the EditCommand object will be discussed.
What is Edit Command
The edit
feature was implemented as EditCommand in the Logic package.
edit
feature format : edit
INDEX
FLAG
ORDER_ATTRIBUTE_PREFIX
/NEW_VALUE
[ORDER_ATTRIBUTE_PREFIX
/NEW_VALUE]
The edit
feature allows the user to edit any field except delivery status of the order or the return order. However, user must provide a FLAG
and INDEX
.
FLAG
to indicate which parcel type to edit; -o
and -r
FLAG
to represent Order or Return Order respectively.
INDEX
to indicate which parcel the user wants to edit.
The list of the different parcel fields are listed in Appendix E: Glossary.
This feature allows user to edit more than one field within a command. |
Limitation
|
Execution paths of Edit Command
The above figure illustrates the execution path of edit
command when performed by the user.
Input when received, will be parsed by the DelinoParser.
DelinoParser will check if command word matches any features command word.
In this feature, the command word is edit
. If no command word is detected, a exception class should be
generated for displaying of error message. CommandException is used in this feature to achieve that function.
Once validated, user input is once again parse and check for validity. At this step, if user have provided input not matching the valid edit
format, an exception class is thrown.
Furthermore, if NEW_VALUE
is invalid an exception should be thrown as well.
ParseException class is used in this scenario.
Some invalid NEW_VALUE
:
1) Editing delivery date or return date to the past.
2) Change the transaction id of one parcel to match another parcel.
3) Violation of any field(s) restriction.
A correct input will prompts Delino to carry out the rest of the steps according.
1) Checking of the FLAG
2) Edits the the parcel.
3) Display edit success message.
Structure of Edit Command
The class diagram above depicts the structure of EditCommand. As per any Command class,
EditCommand needs to extend the abstract class Command.
Information that are left out in this class diagram are the common messages used in EditCommand.
Interactions between Edit Command and it’s associated objects
The above figure illustrates the important interactions of EditCommand when the user successfully edit the first displayed order name to Alice
.
The handling of breaking down the user input is done in the EditCommandParser class which is called upon by the
DelinoParser after an initial check for correctness of the command input.
The EditParcelDescriptor class is a static class contained in the EditCommand class.
It act as a helper class to allow the setting of all the NEW_VALUE
to the corresponding
ORDER_ATTRIBUTE_PREFIX
in the EditCommandParser class.
The EditParcelDescriptor object is then passed back as a parameter to instantiate an EditCommand.
In the diagram above, the EditParcelDescriptor object is named as epd.
The EditCommand object is then passed back as e to the LogicManager
which will then call EditCommand#execute.
This execute method mainly calls the 3 helper method, not shown,
EditCommand#createEditedOrder/EditCommand#createEditedReturnOrder and EditCommand#generalSetParcel.
The main function of these methods are to help EditCommand in updating the ObservableList in the
Model class which is responsible for the updating of list displayed.
The ObservableList is a JavaFX class which listens and automatically changes the list once an update is performed.
Search feature
This whole section on Search feature can be found at here. This link is provided in the event if some of the cross links are not working, as they refer to documents done by another team member.
Search Feature
In this section, the functionality of the search
feature, the expected
execution path, the structure of the SearchCommand class
and the interactions between objects with the SearchCommand object will be discussed.
What is the Search feature
The search
feature was implemented as the SearchCommand in the logic package.
The search
feature allow users to search for any orders according to the provided input.
search
feature format: search
[FLAG]
[ORDER_ATTRIBUTE_PREFIX]
/[KEYWORD]
A space is needed in between each word. |
Keyword search is case-insensitive. E.g: Given Jeremy it matches JeReMy , jeremy or any permutations of alphabet casing.
|
There are two mode of searching, general search or specific search.
If the user does not provide any ORDER_ATTRIBUTE_PREFIX
, a general search mode will be
performed on orders, return orders, or both depending on the FLAG
.
The [FLAG]
-o
when given, searches only for parcels in the order list.
The [FLAG]
-r
when given, searches only for the parcels in the return order list.
-
General search will search for all fields in an order/return orders/both that have any matching fields.
If the user provide any ORDER_ATTRIBUTE_PREFIX
, a specific search will be performed.
-
Specific search will search orders/return orders/both based on the given
ORDER_ATTRIBUTE_PREFIX
.
Execution paths of Search Command
The above activity diagram illustrates the different execution paths of search
command.
Whenever a user keys in an input with the search
keyword, the SearchCommandParser class will handle the parsing of input.
User input will be validated in the SearchCommandParser class.
Input is deemed as invalid and ParseException is thrown under these scenarios:
1) FLAG
given is not -o
or -r
.
2) Multiple FLAG
detected.
3) No KEYWORD
is given after search
.
View the list of allowed prefixes in this search
command here.
Structure of Search Command
The above class diagram depicts the structure of the class SearchCommand. As per any Command class,
SearchCommand needs to extend the abstract class Command.
Information that are left out in this class diagram are the common messages used in SearchCommand.
Interactions between objects when Search Command is executed
The sequence diagram above illustrates the interactions between objects when search
command is performed by the user.
Particularly, the interactions shown is a success search
command executed by the user and only an abstract view is shown.
LogicManager first calls parseCommand with arguments representing the user input, Alice
.
The SearchCommandParser will then check for any invalid arguments passed by the user.
|
The SearchCommandParser will then checks for the presence of any FLAG
.
The presence of one will result in different SearchCommand constructor being called.
The SearchCommandParser will call the both the OrderContainsKeywordsPredicate constructor and
the ReturnOrderContainsKeywordsPredicate if no FLAG
is given.
However, if a FLAG
is given, the corresponding predicate will be instantiated and passed
as an parameter for the SearchCommand constructor with the other left as null value.
|
The parsing of user input utilises ArgumentTokenzier (not shown in sequence diagram) to process and split
each KEYWORD
to it’s corresponding ORDER_ATTRIBUTE_PREFIX
, if given any.
If the preamble to any ORDER_ATTRIBUTE_PREFIX
is not empty, a general search will be performed in which KEYWORD
will be searched through all fields of parcel.
However, if ORDER_ATTRIBUTE_PREFIX
is given and the preamble is empty, the specific search will be performed. Only parcel fields that correspond to the given ORDER_ATTRIBUTE_PREFIX
will be searched and matched with the KEYWORD
.
The order and return order list updates automatically as the JavaFX class ObservableList is used to listen to any changes.
Use case for Edit
This whole section on Use case for edit feature can be found at UC05 of here. This link is provided in the event if some of the cross links are not working, as they refer to documents done by another team member.
Use case: UC05 - Editing order details
Preconditions: There should be a valid order/return order that can be edited.
MSS
-
User requests to list orders (UC10).
-
User wants to edit a specific order.
-
User request to edit order details.
-
Delino edit the order details.
-
Delino display changes made.
Use case ends.
Extensions
-
3a. Delino detects invalid syntax from user input.
-
3a1. Delino shows an error message.
Use case ends.
-
-
3b. Delino unable to detect any parcel specified by the user.
-
3b1. Delino shows no parcel found message.
-
-
3c. Delino detects duplicate parcel.
-
3c1. Delino shows duplicate parcel message.
Use case ends.
-
Use case for search
This whole section on Use case for search feature can be found at UC07 of here. This link is provided in the event if some of the cross links are not working, as they refer to documents done by another team member.
Use case: UC07 - Search an order
Preconditions: There should be a valid order/return order in Delino.
MSS
-
User wants to search a specifc order or return order by a given keyword.
-
User request to search specific order or return order by a given keyword.
-
Delino display the requested order.
Use case ends.
Extensions
-
2a. Delino detects invalid syntax from user input.
-
2a1. Delino shows an error message.
Use case ends.
-
-
2b. Delino unable to find any parcel field that matches the given keyword.
-
2b1. Delino display parcel not found message.
Use case ends.
-
Manual Testing - Appendix Edit
This whole section on Manual testing of Edit feature can be found here. This link is provided in the event if some of the cross links are not working, as they refer to documents done by another team member.
Edit orders
-
Edit the details of the delivery order by specifying the
FLAG
(order type),INDEX
(parcel number displayed),ORDER_ATTRIBUTE_PREFIX
(the field user want to change) andNEW_VALUE
(the new value that user want to replace the old ones with). For detailed implementation explanation click here.-
Prerequisite: Call the
list
command to show something orinsert
/return
command to add something before you canedit
. -
Edit command format:
edit
FLAG
INDEX
ORDER_ATTRIBUTE_PREFIX/NEW_VALUE
-
Test case:
edit
-r
1
n/Xuan En
Expected: The first index customer’s name is changed to Xuan En. -
Test case:
edit
-o
2
p/99521654
Expected: The second index phone number is changed to 99521654. -
Test case:
edit
-o
1
a/Blk 123 Pasir Ris street 51 #12-23 S510123
Expected: The first index is edited where the address of the customer of the order will be changed to Blk 123 Pasir Ris Street 51 #12-23 S510123. -
Test case:
edit
-r
2
n/Mr Tan
p/98776655
a/Blk 841 Yishun st 81 #01-02 S760841
Expected: The second index of the list is edited. The name is changed to Mr Tan, phone number changed to 98776655 and address will be changed to Blk 841 Yishun st 81 #01-02 S760841. -
Test case:
edit
-o
1
dts/2020-08-09
Expected: The delivery date of the first index of the customer will be rescheduled to 09/08/2020. -
Test case:
edit
-r
1
rts/1900-02-02
Expected: The response box will display an error message as it is impossible to put a date that is already passed.
-
Manual Testing - Appendix Search
This whole section on Manual testing of Search feature can be found here. This link is provided in the event if some of the cross links are not working, as they refer to documents done by another team member.
Search an order
-
Search an order based on the
KEYWORD
andFLAG
(if any) given. For a more detailed explanation of the implementation click here.-
Search command format:
search
FLAG
KEYWORD
-
Test case:
list
done
search
-r
Jeremy Loh
Expected: Specifically search for any return order from the return order list that has any field matching the keyword of eitherJeremy
,Loh
or both and print it to the user. -
Test case:
list
undone
search
-o
tid/asj2od3943
Expected: Specifically search for any order from the order list that has a Transaction id ofasj2od3943
and print it out to the user. -
Test case:
list
search
n/Jeremy
Expected: Specifically search for both return order or order from both list that has one word of the name matching the key wordJeremy
. -
Test case:
list
search
Expected: An error message will appear in the response box, stating that the argument cannot be empty and there are no changes to the list itself.
-