Project: 3W
3W is a desktop address book and task book application designed for University students, business people and all those who have a busy daily schedule. The user interacts with it using a CLI, and it has a GUI created with JavaFX.
Code contributed: [functional code][test code]
Enhancement Added:
Adding a new task : addTask
Adds a new task to the task book
Format: addTask
/at
Details: addTask n/TaskName d/Description s/startDateTime f/finishDateTime c/priority [t/TAG]…
A task can have any number of tags (including 0), the tag mechanism is the same as that for person. A task has a special field called priority (ranges from 1 to 5, with 1 being the most important). If a priority is not specified during adding of this task, a normal (3) priority wil be set by default.
|
Examples:
-
addTask n/picnic d/have fun at Botanic Garden s/1/1/2017 12:00pm f/1/1/2017 15:00pm c/3 t/friends
Listing all tasks : listTask/
Shows a list of all tasks in the task book,including all completed tasks, which are with green click .
Format: listTask
/lt
Clearing all tasks : clearTask
Clears all entries from the task book.
Format: clearTask
/ct
Locating tasks by name: findTask
Finds tasks whose names or description contain any of the given keywords.
Format: findTask
/ft
Details: find KEYWORD [MORE_KEYWORDS]
Examples:
-
find picnic
Returns any task having name/descriptionpicnic
-
find picnic/meeting
Returns any task having name/descriptionpicnic
ormeeting
==== Selecting a task :selectTask
Selects the task identified by the index number used in the last task listing.
Format: selectTask
/st
Details: selectTask INDEX
Examples:
-
select 2
Selects the 2nd task in the task book.
Editing a new task : editTask
Edits an existing task in the address book
Format: editTask
/edt
Details: editTask INDEX [n/TaskName] [d/Description] [s/startDateTime] [f/finishDateTime] [t/TAG]…
Examples:
-
editTask 1 n/picnic d/have fun at Botanic Garden s/1/1/2017 12:00pm f/1/1/2017 15:00pm t/friends
Edits the name, description, start time, finish time ad tag of the 1st task to bepicnic
,have fun at Botanic Garden
,1/1/2017 12:00pm
,1/1/2017 15:00pm
andfriends
respectively. -
editTask 2 t/teammates
Edits the tag of the 2nd task to beteammates
only and others remain same.
Exporting a task to a string of addTask command: exportTask
Export the details of the task by the index number
Format: exportTask
/ept
Details: exportTask INDEX
Examples:
-
export 1
in the default setting
Returns `addTask n/picnic d/have fun at Botanic Garden s/1/1/2099 12:00pm e/1/1/2099 15:00pm t/friends `
Deleting a task : deleteTask
Deletes the specific task from the task book.
Format: deleteTask
/dt
Details: deleteTask IDNEX
Examples:
-
list
-
deleteTask
1
Deletes the 1st task in the task book.
Marking a task : markTask
Marks the specific task from the task book.
Format: markTask
/mt
Details: markTask INDEX
Examples:
-
listTask
-
markTask 1
Marks the 1st task in the task book to be completed and the marked task will disappear in the result list.
Setting a priority for a task : setPriority
Sets the priority field of a task that is already present in ths taskBook with an integer value between 1 to 5.
Format: setPriority
/stp
Details: setPriority INDEX c/new value specified
Examples:
-
setPriority 1 c/1
Sets the priority of this task to beSuper Important
. -
setPriority 1 c/6
A warning message is shown: A priority value is defined within integer range of 1 to 5.
Sorting tasks by their priority : taskByPriority
Sorts the task currently present in the taskBook by priority.
Format: taskByPriority
/tbp
Sorting tasks by end date : taskbyend
Sorts the list of tasks by their end date
Format: taskByEnd
/tbe
This sorting will not affect the order of the tasks currently in the storage. However, the current index shown will be the index used for a specific task to |
link Operations
link task with people: link
Linking a task with provided people
Format: link
/lk
Details: link Index p/personIndex [p/personIndex]
Examples:
-
link 1 p/1
link task 1 with person 1 in the current displayed list -
link 1 p/1 p/2
link task 1 with person 1 and person 2 in the current displayed list
linked tasks of person: linkedTasks
Showing Linked tasks of provided person
Format: linkedTasks
/lts
Details: `linkedTasks Index `
Examples:
-
linkedTasks 1
show linked tasks of person 1 in the current displayed list
linked tasks of person: linkedPersons
Showing Linked persons of provided task
Format: linkedPersons
/lps
Details: `linkedPersons Index `
Examples:
-
linkedPersons 1
show linked persons of task 1 in the current displayed list
FAQ
Q: How do I transfer my data to another Computer?
A: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder.
Command Summary
-
Add
add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…
e.g.add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague
-
Add Task
add n/NAME d/Description s/START TIME f/END TIME [t/TAG]…
e.g.addTask n/picnic d/have fun at Botanic Garden s/1/1/2099 12:00pm f/1/1/2099 15:00pm t/friends
-
Clear :
clear
-
Delete :
delete INDEX
e.g.delete 3
-
Delete Task :
deleteTask INDEX
e.g.deleteTask 3
-
Edit :
edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…
e.g.edit 2 n/James Lee e/jameslee@example.com
-
Edit Task :
editTask INDEX [n/NAME] [d/DESCRIPTION] [s/START_DATE_TIME] [f/END_DATE_TIME] [c/INTEGER[1~5] [t/TAG]…
e.g.editTask 1 n/picnic d/have fun at Botanic Garden s/1/1/2017 12:00pm f/1/1/2017 15:00pm t/friends
-
Export :
export INDEX
e.g.export 3
-
Export Task :
exportTask INDEX
e.g.exportTask 3
-
Find :
find KEYWORD [MORE_KEYWORDS]
e.g.find James Jake
-
Help :
help
-
History :
history
-
Link :
link TaskIndex p/personIndex [p/personIndex]… `
e.g. `link 1 p/2 -
List Contact :
list
-
List Task :
listTask
-
Mark Task :
markTask INDEX
e.g. markTask 1 -
Redo :
redo
-
Remark :
remark INDEX r/[REMARK]
e.g. remark 1 r/Likes to swim. -
Select :
select INDEX
e.g.select 2
-
Select Task :
selectTask INDEX
e.g.selectTask 2
-
Set Priority :
setPriority INDEX c/PRIORITY INDEX
e.g.setPriority 1 c/2
-
Task By End :
taskByEnd
-
Task By Priority :
taskByPriority
-
Undo :
undo
==== Clearing all tasks :clearTask
Clears all entries from the task book.
Format: clearTask
/ct
==== Selecting a task : selectTask
Selects the task identified by the index number used in the last task listing.
Format: selectTask
/st
Details: selectTask INDEX
Examples:
-
select 2
Selects the 2nd task in the task book.
Deleting a task : deleteTask
Deletes the specific task from the task book.
Format: deleteTask
/dt
Details: deleteTask IDNEX
Examples:
-
list
-
deleteTask
1
Deletes the 1st task in the task book.
End of Extract
Justification
-
In this application, 3W, we have task book as a separate entity besides address book so that they will not affect each other. The task book will thus be able to directly built besides the original address book without the need to modify the modelling and storage logic of the address book.
-
Because of time constraints, the current design of the
DateTime
of the tasks have rigid input format. They are powerful in checking constraints such as the start date time must be earlier than end date time, and the validity of the start and end dates and time. Currently, we focus on the validity and security. In the future, this implementation will be extended with powerful natrual language processing unit to ensure the flexibility of input as well. -
Following the addressbook functionality, the edit task function will also be able to accept various fields (at least one filed must be present). However, the priority of the task will be updated or modified through setPriority command. This modelling will ensure the user make frequent changes to the task priority easily. The task priority currently has 5 degrees with 1 being the most important. We think 5 degrees is the most suitable one for satisfying different business people’s needs.
TaskBook
We develop this application as a parallel of two similar application, namely addressBook and taskBook. They are similar in many ways, including comman commands like add
for adding a person and addTask
for adding a task.
Adding a taskBook
to our application originated from our design requirements.
-
The
taskBook
is a set of parallel functionalities apart from the addressBook. -
The
taskBook
is related toaddressbook
in the sense that we can link the person and task together. -
The
taskBook
andaddressBook
has the following independent components:model
,logic
, andstorage
. -
The
taskBook
andaddressBook
share the same user interface by taking up taskPanel and personPanel respectively.
With the extra taskBook working in parallel, the model interface should be modified in this way:
ReadOnlyTaskBook getTaskBook();
void addTask(ReadOnlyTask task) throws DuplicateTaskException;
void updateFilteredTaskList(Predicate<ReadOnlyTask> predicate);
With the updated model interface, the ModelManager and ModelStub should be modified accordingly.
For storage, we save the tasks into another storage file (xml file), the storage interface should be equipped with the following read and write methods:
Optional<ReadOnlyTaskBook> readTaskBook() throws DataConversionException, IOException;
@Override
void saveTaskBook(ReadOnlyTaskBook addressBook) throws IOException;
@Override
Optional<ReadOnlyAddressBook> readAddressBook() throws DataConversionException, IOException;
@Override
void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;
void handleAddressBookChangedEvent(AddressBookChangedEvent abce);
void handleTaskBookChangedEvent(TaskBookChangedEvent tbce);
As given in storage and model, the main logic should be implemented this way to take both addressbook and the taskbook’s storage during initialization.
UserPrefsStorage userPrefsStorage = new JsonUserPrefsStorage(config.getUserPrefsFilePath());
userPrefs = initPrefs(userPrefsStorage);
AddressBookStorage addressBookStorage = new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());
TaskBookStorage taskBookStorage = new XmlTaskBookStorage(userPrefs.getTaskBookFilePath());
storage = new StorageManager(addressBookStorage, userPrefsStorage, taskBookStorage);
The unit tests stub classes and setUp methods should be updated accordingly. In addition, in order to make task’s operations undoable and redoable, the taskbook
states should be saved before each command’s execution.
Design Considerations
Aspect: Implementation of taskBookStorage
Alternative 1 (current choice): Create a new xml file and several xml adapted classes for task Book storage
Pros: We will not create any dependencies between taskBook and addressBook.
Cons: A lot of code seems very similar and more storage file become hrad to manage.
Alternative 2: Save the new task to the same storage xml file as addressBook
Pros: This method of implementation saves the space and it can reuse some of the codes in addressBook.
Cons: It creates dependency between the storage for both books and it is inefficient to retrieve only one of them from storage xml file.+
Aspect Implementation of modelling and logic of taskBook
Alternative 1 (current choice): Rewrite codes for taskBook, keep the original addressbook codes untouched.
Pros: The original addressBook logic and modelling will not be affected. We keep an independent book from the original.
Cons: The code reusage is very low and adding a taskBook become very tedious.
Alternative 2: Modify the original code base to reutiliza some of the common functionalities.
Pros: The code reusage is good and adding a taskBook becomes more efficient.
Cons: The dependency is very high between addressBook and taskBook, there is a high tendency to break original logic and modelling.
Figure 2.4.1 : Structure of the Model Component
Figure 2.5.1 : Structure of the Storage Component
Figure 2.2.1 : Structure of the UI Component
Use case: Delete person
MSS
-
User requests to list persons
-
AddressBook shows a list of persons
-
User requests to delete a specific person in the list
-
AddressBook deletes the person
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. AddressBook shows an error message.
Use case resumes at step 2.
-
Use case: list tasks by date
MSS
-
User requests to list tasks by date
-
AddressBook shows a list of tasks by date
-
User requests to see the tasks by date order
-
AddressBook shows the tasks by date
Use case ends.
Extensions
-
2a. The task list is invalid.
-
2a1. AddressBook shows an error message.
-
2a2. AddressBook is empty.
Use case resumes at step 2.
-
Use case: list tasks by priority order
MSS
-
User requests to list tasks by priority
-
AddressBook shows a list of tasks by priority
-
User requests to see the tasks by priority order
-
AddressBook shows the tasks by priority
Use case ends.
Extensions
-
2a. The task list is invalid.
-
2a1. AddressBook shows an error message.
-
2a2. AddressBook is empty.
Use case resumes at step 2.
-
Use case ends.
Use case: list tasks by tag
MSS
-
User requests to list tasks by tag
-
AddressBook shows a list of tasks by tag
-
User requests to see the tasks by tag
-
AddressBook shows the tasks by tag
Use case ends.
Extensions
-
2a. The task list is invalid.
-
2a1. AddressBook shows an error message.
-
2a2. AddressBook is empty.
Use case resumes at step 2.
-
Use case ends.
Use case: Add a new task
MSS
-
User requests to add a task
-
AddressBook prompts to ask for task details
-
User inputs task details
-
AddressBook adds the task
Use case ends.
Extensions
-
2a. The details is invalid.
-
2a1. AddressBook shows an error message.
Use case resumes at step 2.
-
Use case: Edit hierarchy
MSS
-
User requests to edit hierarchy
-
AddressBook prompts to ask for hierarchy details
-
User inputs hierarchy details
-
AddressBook update hierarchy
Use case ends.
Extensions
-
2a. The details is invalid.
-
2a1. AddressBook shows an error message.
Use case resumes at step 2.
-
Use case: View task details
MSS
-
User requests to list tasks
-
AddressBook shows a list of persons
-
User requests to see a specific task details
-
AddressBook shows the details of a person
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. AddressBook shows an error message.
Use case resumes at step 2.
Use case: View task details
-
MSS
-
User requests to list tasks
-
AddressBook shows a list of persons
-
User requests to see a specific task details
-
AddressBook shows the details of a person
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. AddressBook shows an error message.
Use case resumes at step 2.
-
Use case: View task details
MSS
-
User requests to list tasks
-
AddressBook shows a list of persons
-
User requests to see a specific task details
-
AddressBook shows the details of a person
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. AddressBook shows an error message.
Use case resumes at step 2.
-
Use case: Invalid actions
MSS
-
User requests an invalid action
-
AddressBook shows a error message
-
AddressBook shows suggestions on fixings of this error or warning occurred
Use case ends.
Extensions
-
2a. The error message is hard to understand
-
2a1. The user can choose to exit/restart the program
-
2a2. The user can choose to redo this action
Use case ends.
-
-
3a. The given suggestion is not a good fix
-
3a1. AddressBook opt to redo this action
Use case ends.
-
{More to be added}
Appendix A: Non Functional Requirements
-
Should work on any mainstream OS as long as it has Java
1.8.0_60
or higher installed. -
Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
-
A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.
-
Should be able to respond and update within 2s per actions
-
Should give reasonable error messages and warnings
-
Should try to give suggestions with valid reasons and logic
-
Should have not very steep learning curve for a regular English-speaking person
-
Should have detailed tutorials and documentation
{More to be added}
Invalid-action
An action that will trigger warnings and error messages Eg.: Dangerous events, delete and clashing events
Priority
The importance of a task in the taskBook. Integer values of 1 to 5 are used to represent the priority.
The correspondence between interger value and the priority of the tasks is as follows: 1 (super important), 2 (important), 3 (normal), 4 (trivial), and 5 (super trivial). |
Appendix B: Product Survey
Trello
Author: Dong Shaocong
Pros:
-
Beautiful interfaces.
-
Notes which are easy to be removed, added, edited and moved.
-
Attachments and update history for an event.
-
Sync with different device for same account.
-
Power ups to choose including github and Slack.
Cons:
-
It’s not a command line software, and therefore not very friendly for developers and command line lovers
-
Unable to work offline and often clash with not so stable Internet connections
End of Extract
Enhancement Proposed:
-
Add task Book (in parallel with address book)
-
Task book basic Functionalities
-
DateTime of Task better checking logic
Other contributions
-
Generate JAR file for weekly milestones.
-
Prepare sample data and manual test script.[commit]
-
Update task model for UI integration[commit]
-
Design the fxml and css file for TaskBook panel and task card for our UI.
-
Make link response message more friendly[pull request]
-
Debug for markTask[pull request]
-
Update developer guide diagrams[pull request]
-
Make the taskBook commands undoable and redoable.[commit]
-
Apply Dependency Inversion Principle For Task Model[commit]
-
Apply Defensive Programming[commit]
-
Apply Abstraction design pattern[commit]