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.

jayrometanPPP
Figure 1. 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

    • Created the organization and forked the repo. Also, all the labels and milestones for the repo. This includes wrapping up the milestones and moving the incomplete tasks to the future milestones. milestone

    • There was a total of 2 releases, from version 1.3 to 1.4, I managed release 1.3. v1.3

  • 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]

  • TASK_NAME is the name of the task that you want to input  

  • DEADLINE_DATE is the date of the deadline of the task in DDMMYY format.  

  • DEADLINE_TIME is the time of the deadline of the task in 24HRS format  

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.

Model component

ModelClassDiagram
Figure 2. Structure of the Model Component

API : Model.java

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:

Table 1. Classes in the Task Package
Class Constructor Remark

TaskName

new TaskName("CS2101 Developer Guide")

Stores a String that represents the name of the task.

DeadlineDate

new DeadlineDate("020419")

Stores a String that represents the deadline date of the task. String stored has to be in the DDMMYY format.

DeadlineTime

new DeadlineTime("2359")

Stores a String that represents the deadline time of the task. String stored has to be in the 24HRS format.

Tag

new Tag()

Stores a String that acts as a tag to the task. This field is optional.

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.

Table 2. Table of Task Class
Class Constructor Remark

Task

new Task(TaskName, DeadlineDate, DeadlineTime, Tag)

Stores TaskName, DeadlineDate, DeadlineTime, Tag objects to document a task’s information.

 

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.

Task objects have to be unique and they are considered duplicates if they share the same TaskName.

 

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.

Delete Task Sequence Diagram
Figure 3. Delete Task Sequence Diagram

The following activity diagrams illustrates an example when the user executes a deletetask command.

Delete Task Activity Diagram
Figure 4. Activity Diagram of user executing a deletetask command

Edit 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.

Edit Task Sequence Diagram
Figure 5. Edit Task Sequence Diagram

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 this UniqueTaskList 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

  1. User requests to add a new task
    example: addtask n/Update CS2113T Developer Guide d/311219 h/2359

  2. 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

  1. LIFE already displays the task list.

  2. User completed the task and wishes to tick off the task with ticktask INDEX

  3. 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

  1. Editing an existing task in the task list

    1. Prerequisites: Index entered must be available in the task list

    2. Test case: edittask 1 n/Repair iPhone
      Expected: The task name of the indicated task by the index is changed to Repair iPhone.

    3. 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.

    4. 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.

    5. Other incorrect edittask commands to try: edit task1, edittask
      Expected: Similar to previous.

Ticking a task

  1. Indicating on the completed task list when a task has been completed

    1. Prerequisites: Index entered must available in the task list

    2. 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 called Completed Task List.

    3. 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.

Here are the rest of the contributions that could be useful!