Overview
This Project Portfolio documents my role and contributions to the project LIFE.
About the project
In our second year of university, my team and I were tasked with enhancing a basic address book
application. Our enhancement was a morph from a given address book into a self-improvement lifestyle management application
called LIFE (Lifestyle Improvement For Everyone) that uses the Command Line Interface (CFI).
This enhanced application helps people who are seeking to better their lives achieve their goals. This is done through keeping track of their tasks and documenting of their expenditure and physical activity, thereby increasing their mindfulness of their daily lives.
My role
For this project, I served the role as a team leader through steering the direction of the project
and the management of all the deadlines.
In the technical aspect, my role was to design and write code for the Task feature. In the non-technical aspect, I am in charge of the content and layout of the documentations. The following sections illustrate these enhancements and documentations in detail, other additional enhancements that I have made as well as the relevant sections that I have added to the user and developer guide in relation to these enhancements.
Note the following symbols used in this document:
A grey highlight (called a mark-up) e.g. TASK indicates that it is a Class
or a command word that can be inputted into the command line
and executed by the application.
|
Summary of contributions
This section shows a summary of my coding, documentation and other helpful contributions that i have contributed to the team project.
To aid the potential visualization of my work, here is the user interface of LIFE.
-
Major Feature #1: implemented the
Task
feature.-
What does it do:
-
Allows an individual to keep track of his tasks through adding a task
-
Help organize and prioritize the tasks through editing, deleting and sorting the tasks. It also has a tick task command, where the ticked task will be added into the completed task list.
-
-
Justification
-
In the modern world, many people are increasingly bombarded with tasks to do, and they tend to forget what tasks they have until the deadline has reached. This application therefore helps them remember their tasks.
-
The completed task list serves as a motivation booster to users when they see how many tasks they have completed so far.
-
-
-
Project Management
-
Documentation
-
Created and wrote content for the AboutUs page. #8
-
Refining and ensuring sufficient content of the developer and user guides.
-
-
Code contributed: [Functional Code][Test Code]
Contributions to the User Guide
Given below are sections that I contributed to the User Guide. They showcase my ability to write documentation and target end users. |
Task List
A feature to help you record your tasks with deadlines, say no more to forgetting your tasks!
The following subsections are commands of the task list.
Adding a Task : addtask
The first step to managing your tasks is to add them into the task list!
Format: addtask n/TASK_NAME d/DEADLINE_DATE h/DEADLINE_TIME [t/TAGS]
Tags are optional and are alphanumeric without space |
The following are examples of some commands that you can try out:
-
addtask n/Complete CS2113T Assignment d/180319 h/2359
-
addtask n/Submit Exchange Application d/200319 h/0800 t/IMPORTANT
Tick Task : ticktask
Ticks off the task that you have completed off the task list and adds it into the completed task list! Good Job!
Format: ticktask
INDEX
The index must be a valid index in the task list and it must be present. Once the application restarts, all the data in the Completed Task List will be gone. |
Examples:
-
ticktask 5
Ticks the task at index 5 off.
Sort Task List : sorttask
Helps you to sort the tasks in the task list according to their deadline with upcoming deadlines first!
Format: sorttask
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. |
Task List Feature
This entire section describes comprehensively the technical aspects of the Task
feature as well
as considerations made during the design of the feature.
Task
package
This section describes the inner dimensions of the Task
package.
Reason for implementation
LIFE is a tool for helping users manage their priorities, therefore the ability to help them document their tasks is highly essential.
Current Implementation
Each attribute of a Task
, such as the task name, date of the deadline,
time of the deadline are classes in the Task
package.
Each of the classes provide utility methods to check the correctness of the string to be stored and to retrieve the string that is stored.
The following classes are as such:
Class | Constructor | Remark |
---|---|---|
|
new TaskName("CS2101 Developer Guide") |
Stores a |
|
new DeadlineDate("020419") |
Stores a |
|
new DeadlineTime("2359") |
Stores a |
|
new Tag() |
Stores a |
The Task
package includes the Task
class which documents information about a task.
The Task
class provides utility methods to retrieve the different objects (e.g. DeadlineDate
). The Task
class is shown below.
Class | Constructor | Remark |
---|---|---|
Task |
|
Stores |
There is a check for duplicates when adding the task. This check
is found in the AddTaskCommand.java
file which calls for model
to verify for any duplication
before adding the Task
instance into the UniqueTaskList
.
Reasons for how it is implemented
The task
package follows the model of the person
package which existed before our
team started this project. This was because the TaskList
was ideated to have the data
stored in an ArrayList like the Addressbook.
This made it easier for us to implement our features as we could reuse some of the existing code
and follow the style of how the Addressbook was implemented to made the code
more readable.
Delete Task
The DeleteTaskCommand
will find and delete the specified Task
(that is according to the Task List shown
in the UI) from the TaskList
.
Reason for implementation
This DeleteTaskCommand
is essential if the task is longer needed on the task list. For example,
the user’s boss has reassigned the task or the task is no longer valid.
Current Implementation
The DeleteTaskCommand
is created when the command word deletetask
is detected in the user input alongside
the compulsory parameter which is an index in the TaskList
. The DeleteTaskCommand
will then check for the
validity of the index given. If index is invalid, an error message will be displayed.
The following sequence diagram shows how the deletetask
operation works.
The following activity diagrams illustrates an example when the user executes a deletetask
command.
deletetask
commandEdit Task
The EditTaskCommand
will find and edit the specified Task
(that is according to the Task List shown
in the UI) from the TaskList
and along with the given input by the user, edit accordingly.
Reason for implementation
We believe that this is essential as the user might have entered the wrong details of a task, there is a change in the deadline of the task, etc. We do not want to inconvenience the user by making him find the index of the task to be edited, deleting the task and adding the new task.
Current Implementation
The EditTaskCommand
is created when the command word edittask
is detected in the user input alongside
the compulsory parameter consisting of the index in the TaskList
and the details to be changed. (e.g. TaskName,
`DeadlineDate, `DeadlineTime
, Set<Tag>
)
Like previous commands, The EditTaskCommand
will also check for the
validity of the index given. If index is invalid, an error message will be displayed.
The following is what makes EditTask
different from the other Task
commands.
The EditTaskCommand
will locate the Task
to be edited and from it, create a newly edited instance called editedTask
.
The model will take it both the Task
to be edited and the editedTask
and
replace the former Task
with the editedTask
.
The following sequence diagram shows how the edittask
operation works.
Alternatives considered
-
Alternative 1 (current choice): Create a new Array List Object to store the tasks e.g.
UniqueTaskList
.-
Pros: Array List is the simplest data structure which allows for manipulation of data such as sorting. Like how the existing
UniquePersonList
was implemented, We can implement thisUniqueTaskList
in the same way. Therefore, making the overall code more readable and implementation much simpler. -
Cons : Some operations require the traversing of the list which require O(N) time complexity. For instance, the
deletetask
command and the checking of duplicates.
-
-
Alternative 2 : Using a Hash Map to store the tasks
-
Pros: The
deletetask
command and checking of duplicates has time complexity of O(1). -
Cons: Implementation of Hash Map is a lot more complex than the implemented Array List. At the point of implementation, My team and I do not have enough expertise to utilise the Hash Map.
-
Appendix A: Use Cases
(For all use cases below, the System is the LIFE application and the Actor is the user
, unless specified otherwise)
Use case: Add a task
MSS
-
User requests to add a new task
example:addtask n/Update CS2113T Developer Guide d/311219 h/2359
-
LIFE adds the task into the array list
Use case ends.
Extensions
-
1a. The task details are invalid
-
LIFE shows an error message. + Use Case ends.
-
-
1b. Task already exists.
-
LIFE shows an error message.
Use case ends.
-
Use Case: Tick Task
MSS
-
LIFE already displays the task list.
-
User completed the task and wishes to tick off the task with
ticktask INDEX
-
Task ticked disappears from the task list panel and appears in the completed task list panel.
Use case ends.
Extensions
-
4a. Index not in Task List.
-
LIFE shows an error message.+ Use case ends.
-
Instructions for Manual Testing
Editing a task
-
Editing an existing task in the task list
-
Prerequisites: Index entered must be available in the task list
-
Test case:
edittask 1 n/Repair iPhone
Expected: The task name of the indicated task by the index is changed to Repair iPhone. -
Test case:
edittask 1 h/2400
Expected: Unable to edit the Deadline Time, as 2400HRS is not a valid time in the 24HR format. Error details shown in the status message. -
Test case:
edittask 0 h/2359
Expected: No task is deleted as unable to detect a valid task index. Error details shown in the status message. -
Other incorrect edittask commands to try:
edit task1
,edittask
Expected: Similar to previous.
-
Ticking a task
-
Indicating on the completed task list when a task has been completed
-
Prerequisites: Index entered must available in the task list
-
Test case:
ticktask 2
Expected: Task with index number 2 will be removed from the existing task list. This deleted task will then be added into another panel calledCompleted Task List
. -
Test case:
ticktask 0
Expected: Tasks in the existing task list will stay intact. Details of invalid command is reflected in the status message under the command bar.
-