Jarvis was developed by the se-edu team. We are a team based in the School of Computing, National University of Singapore.
About the Project
Jarvis was developed by a group of 5 students (including myself) from NUS School of Computing (Computer Science) as
part of a module - CS2103T Software Engineering. The module specifications were to morph a basic command line
interface desktop addressbook application into an application that manages any type of data of our choosing. As such,
we decided to create a student life organiser, that manages students' tasks, finances, courses and co-curricular
activities (CCA). Students can better organise the major aspects of their student life through the
Task Planner, Finance Tracker, CCA Tracker and Course Planner features of Jarvis.
As seen above in Figure 1, the Graphical User Interface (GUI) of Jarvis has four tabs, each
dealing a different feature. I had built the Planner feature of Jarvis. The following sections will illustrate my
various contributions to this project, as well as the relevant documentation I have added to the user and
developer guides regarding my feature.
Summary of Contributions
This section includes a brief overview of my coding, documentation and other key
contributions to the team in building Jarvis.
Feature added: Planner
-
Purpose: The
Plannerfeature enables students to effortlessly manage all their tasks. AsJarvisis a student life organiser, this feature is central to the whole application. -
Highlights:
-
There are three types of tasks in the
Planner-Todo,DeadlineandEvent.Todotasks have a description only,Deadlinetasks have a due date, andEventtasks have a start and end date. This allows for greater flexibility when adding different types of tasks to thePlanner. -
Each task may be set with a priority and frequency level in order to better reflect the true nature of the tasks the user is adding. Tasks may also be tagged with customisable tags for easier sorting.
-
Tasks in the planner can be sorted by tags, priority levels, frequency levels, task type or even date. This greatly helps students manage tasks and tackle each one in whatever order they please.
-
The
Plannerhas aschedulesection which displays the tasks for the day and week, thus helping users view the most urgent tasks that might not have been done yet.
-
Code contributed
-
Functional code: Pull requests #114, #139, and #180 provide a small sample of functional code contributed.
-
Test code: The commits in pull requests #214 and #378 contain examples of tests added to our codebase.
-
GUI: Pull requests #209 and #196 contain my implementation of the GUI for my
Plannerfeature.
For a comprehensive view of all the code I have contributed for this project, please refer to my profile on our team’s Reposense report.
Contributions to the User Guide
Given that Jarvis is nothing like the original addressbook that we were given, we had to update it to match our
current application. We were each responsible for adding the commands for the features that we were in charge of
building.
The following is an excerpt from our Jarvis User Guide, detailing the additions that I have made for the Planner.
Task Planner
A digital planner to help you stay organized; Jarvis can help you cope with your interminable lists of deadlines,
events, errands and more. Tagging and prioritizing tasks are just two of the many ways Jarvis will
enable you to stay on top of everything you need to do!
The Planner feature of Jarvis has a very intuitive user interface, with three main sections - as seen in Figure 3.
Each task is represented by a task card (an example of which is boxed in green in Figure 3). Each task card has the task description right at the top, followed by the task type, and the optional fields (if present). The icon at the bottom of each task card indicates whether a task has been done, or not - a red cross for tasks that have not been completed and a green tick for tasks that have.
The default display ia a column on the left for all the tasks in the planner, and a column on the right for your schedule. The schedule consists two lists stacked on top of each other - the top one showing tasks happening on that day and the bottom showing tasks happening that week.
Adding a task: add-task
The most fundamental command for the Planner - add-task adds a task to the Planner.
A task must have a:
-
TASK-TYPE:todo,eventordeadline -
TASK-DESCRIPTION: a short description of the task -
DATE(forEventandDeadlinetasks only)
A task may have the following attributes:
-
TAG: any number of tags, such as#schoolor#cca -
PRIORITYlevel:high,mediumorlow -
FREQfrequency:daily,weekly,monthlyoryearly
You can refer to the table below for a brief overview of the different command formats for the different types of tasks.
| Task Type | Format |
|---|---|
|
|
|
|
|
|
| Duplicate tasks are not allowed in the Planner! |
Example
add-task t/event des/workshop f/weekly d/25/12/2019//26/12/2019 add-task t/deadline des/cs2101 assignment d/20/9/2019 p/high
And as simple as that, Jarvis can begin to keep track of
your tasks for you!
Please refer to the
Jarvis User Guide
to see my entire section, with all the commands that can be used in the |
Contributions to the Developer Guide
Similarly, we required a major overhaul of the addressbook’s developer guide to adapt it for our own use.
This section contains an excerpt from our Jarvis Developer Guide for the Planner feature.
Implementation
The Planner contains a TaskList, which in turn, contains a number of tasks
a user has. Each task has a TaskType and Status and may also have a Priority level,
Frequency level and any number of Tag objects.
A simple outline of the Planner can be seen below, in Figure 26.
The Model in Jarvis extends PlannerModel which facilitates all operations
necessary to carry out commands by the user.
-
Model#getPlanner()— Returns an instance of aPlanner. -
Model#addTask(int zeroBasedIndex, Task task— Adds aTaskto the planner at the specifiedIndex. -
Model#addTask(Task t)— Adds aTaskto thePlanner. Since noIndexis specified, theTaskis appended to the end of theTaskList. -
Model#deleteTask(Index index)— Deletes theTaskat the specifiedIndexfrom thePlanner. -
Model#deleteTask(Task t)— Deletes the specifiedTaskfrom thePlanner. -
Model#size()— Returns the total number ofTaskobjects in thePlanner. -
Model#hasTask(Task t)— Checks if a givenTaskis already in thePlanner. -
Model#markTaskAsDone(Index i)- Changes theStatusof aTaskat the givenIndexfromDONEtoNOT_DONE -
Model#getTasks()— Returns theTaskListin thePlanner. -
Model#getTask(Index index)- Retrieves theTaskat the specifiedIndexof theTaskList -
Model#updateFilteredTaskList(Predicate<Task> predicate)- Updates theFilteredListin thePlanneraccording to the givenPredicate. -
Model#updateSchedule()- Updates theFilteredListofTaskobjects whose dates coincide with the current date. -
Model#getUnfilteredTaskList()- Returns anObservableList<Task>of all theTaskobjects in thePlanner. -
Model#getFilteredTaskList()- Returns anObservableList<Task>of all theTaskobjects in theFilteredList. -
Model#getTasksToday()- Returns an unmodifiable view of the list ofTaskobjects that coincide with the current day, backed by theFilteredListofPlanner -
Model#getTasksThisWeek()- Returns an unmodifiable view of the list ofTaskobjects that coincide with the current week, backed by theFilteredListofPlanner.
One example of the interaction between the Model and commands for the Planner can be seen when the user
executes a pull-task command.
In the figure above, pull-task will result in the filtered lists in the Planner to be updated according to
the appropriate predicates. In this case, the predicate called will be TaskPredicateMatchesPredicate as the
user had specified a pull-task according to the Priority levels of the Task objects.
Design Considerations
Aspect: Task Descriptions in a Task
-
Option 1 (Current choice): As a string attribute in
Task-
Pros: Intuitive, easy to implement, less code required
-
Cons: Provides a lower level of abstraction, especially if an
edit-taskcommand is implemented
-
-
Option 2: Building a separate
TaskDescriptionclass-
Pros: Higher level of abstraction
-
Cons: More code, will take time to replace current methods that deal with String
TaskDesdirectly
-
Ultimately, we decided on Option 1 as there are no limitations on what a description of
a Task should be (other than not null). Further more, there is no manipulation of the
Task Description at the current stage of Jarvis, hence there is no real need to provide an
additional layer of abstraction for it. If we do intend to continue developing Jarvis in
the future, however, Option 2 might be a viable choice.
Please refer to the
Jarvis Developer Guide
to see my entire section, with the complete implementation that is used in the |