Developer Guide
Overview
TruthTable is a desktop app for managing software engineering teams, optimized for use via a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI).
This Developer Guide will help you get familiar with the architecture of TruthTable and understand the design choices and implementations of key features in TruthTable, in case you are interested in contributing to this project.
Table of Contents
- Overview
- Table of Contents
- Acknowledgements
- Setting Up / Getting Started
- Design
- Implementation
- Documentation, Logging, Testing, Configuration, DevOps
- Appendix: Requirements
-
Appendix: Instructions for manual testing
- Launch and shutdown
- Testing Commands to Manage Persons
- Testing Commands to Manage Members
- Testing Commands to Manage Teams
-
Testing Commands to Manage Tasks
- Adding a task
- Editing a task
- Deleting a task
- Finding a task
- Listing all tasks
- Mark tasks as done
- Unmark tasks as done
- Setting Deadline for task
- Assigning a task to team member
- Assigning a task to random team member
- Filtering tasks by team member
- Sorting members
- View summary of task assignments in team
- Testing Commands to Manage Links
- Effort
Acknowledgements
- Our application is based on the AddressBook-Level3 project created by the SE-EDU initiative.
- Our application makes use of the picocli library for parsing commands.
- Our application makes use of JavaFX as the UI framework.
- Our application makes use of Jackson as the JSON parser.
- Our application makes use of JUnit5 as the testing framework.
Setting Up / Getting Started
If this is your first time contributing to our application, please take a look at the guide Setting up and getting started.
Design

.puml
files used to create diagrams in this document can be found in
the diagrams folder. Refer to the PlantUML
Tutorial at se-edu/guides to learn how to create and edit
diagrams.
Architecture
The Architecture Diagram given above explains the high-level design of the App.
Given below is a quick overview of main components and how they interact with each other.
Main components of the architecture
Main
has two classes
called Main
and MainApp
. It
is responsible for,
- At app launch: Initializes the components in the correct sequence, and connects them up with each other.
- At shut down: Shuts down the components and invokes cleanup methods where necessary.
Commons
represents a collection of classes used by multiple other components.
The rest of the App consists of four components.
-
UI
: The UI of the App. -
Logic
: The command executor. -
Model
: Holds the data of the App in memory. -
Storage
: Reads data from, and writes data to, the hard disk.
How the architecture components interact with each other
The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues
the command delete person 1
.
Each of the four main components (also shown in the diagram above),
- defines its API in an
interface
with the same name as the component. - implements its functionality using a concrete
{Component Name}Manager
class (which follows the corresponding APIinterface
mentioned in the previous point).
For example, the Logic
component defines its API in the Logic.java
interface and implements its functionality using
the LogicManager.java
class which follows the Logic
interface. Other components interact with a given component
through its interface rather than the concrete class (reason: to prevent outside components being coupled to the
implementation of a component), as illustrated in the (partial) class diagram below.
The sections below give more details of each component.
UI component
The API of this component is specified
in Ui.java
The classes are related to each other as such:
For the sake of readability and understanding, the classes related to TeamListPanel
and TaskDetailsPanel
have been omitted in the above diagram. They have been extracted out in a separate diagram as follows:
The UI consists of a MainWindow
that is made up of parts e.g.CommandBox
, ResultDisplay
, PersonListPanel
, StatusBarFooter
, TeamListPanel
, TeamDetailsPanel
etc. All these, including the MainWindow
, inherit from the abstract UiPart
class which captures
the commonalities between classes that represent parts of the visible GUI.
The UI
component uses the JavaFx UI framework. The layout of these UI parts are defined in matching .fxml
files that
are in the src/main/resources/view
folder. For example, the layout of
the MainWindow
is specified
in MainWindow.fxml
The UI
component,
- executes user commands using the
Logic
component. - listens for changes to
Model
data so that the UI can be updated with the modified data. - keeps a reference to the
Logic
component, because theUI
relies on theLogic
to execute commands. - depends on some classes in the
Model
component. For example, thePersonListPanel
displays thePerson
object residing in theModel
.
Logic component
API : Logic.java
Here’s a (partial) class diagram of the Logic
component:
How the Logic
component works:
- When
Logic
is called upon to execute a command, it uses theTruthTableParser
class to parse the user command. - This results in a
Command
object (more precisely, an object of one of its subclasses e.g.,AddPersonCommand
) which is executed by theLogicManager
. - The command can communicate with the
Model
when it is executed (e.g. to add a person). - The result of the command execution is encapsulated as a
CommandResult
object which is returned fromLogic
.
The Sequence Diagram below illustrates the interactions within the Logic
component for the execute("delete person 1")
API
call.
Here are the other classes in Logic
(some of which omitted from the class diagram above) that are used for parsing a user command:

How the parsing works:
- When called upon to parse a user command, the
TruthTableParser
class calls the static methodtokenize
fromArgumentTokenizer
, which will split a string into a string array of tokensargs
(inspired by the Shell Command Language, a string is split into space-separated strings, except for quoted strings which will remain as a single token, e.g.token1 "token 2" token-3
will be read as 3 separate tokenstoken1
,token 2
,token-3
). - The
TruthTableParser
class passesargs
to theCommandLine
class provided by picocli, which will parse the
commandXYZComnand
(XYZ
is a placeholder for the specific command e.g.DeletePersonCommand
), converting any arguments from strings to specific types usingABCConverter
(ABC
is a placeholder for the type argument e.g.IndexConverter
sinceDeletePersonCommand
takes in an integer as anIndex
). - All
ABCConverter
classes (e.g.,IndexConverter
,NameConverter
,EmailConverter
…) extend theCommandLine.IConverter
interface to be utilized by picocli.
Model component
API : Model.java
The Model
component,
- stores the TruthTable data i.e., all
Person
objects (which are contained in aUniquePersonList
object) andTeam
objects (which are contained in aUniqueTeamList
object) each of which containingTask
,Link
andPerson
objects (see the section below regardingTeam
). - stores the currently ‘selected’
Person
orTeam
objects (e.g., results of a search query) as a separate filtered list which is exposed to other classes as an unmodifiableObservableList<T>
whereT
is eitherPerson
orTeam
that can be ‘observed’ e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. - stores a
UserPref
object that represents the user’s preferences. This is exposed to the outside as aReadOnlyUserPref
objects. - does not depend on any of the other three components (as the
Model
represents data entities of the domain, they should make sense on their own without depending on other components)
Each Team
object,
- stores a list of
Task
objects (in aTaskList
object), list of team members (Person
objects in aUniquePersonList
object) andLink
objects (in aUniqueLinkList
). - exposes a list of
Person
orTask
objects as aDisplayList<T>
, which itself contains aFilteredList<T>
(whereT
refers to eitherPerson
orTask
). ThisFilteredList
will store a ‘filtered’ view on the data (e.g., results of a search query) sorted in a particular manner. It can be ‘observed’ e.g. the UI can be bound to this list so that the UI automatically updates when the data (or its order) in the list changes.

Tag
list in the TruthTable
, which Person
references. This allows TruthTable
to only require one Tag
object per unique tag, instead of each Person
needing their own Tag
objects.
Storage component
API : Storage.java
The Storage
component,
- can save both TruthTable data and user preference data in json format, and read them back into corresponding objects.
- inherits from both
TruthTableStorage
andUserPrefStorage
, which means it can be treated as either one (if only the functionality of only one is needed). - depends on some classes in the
Model
component (because theStorage
component’s job is to save/retrieve objects that belong to theModel
)

Team
, Task
and the overall TruthTable
objects all have references to
Person
, for ease of a copy of the entire Person
object is stored within each of its JsonAdaptedXYZ
parent objects
in the json file (where XYZ
refers to Team
, Task
or TruthTable
. An alternative (arguably better) implementation
would be to only store the name of each Person
object and repopulate its fields from the TruthTable
list of Person
objects, which would reduce repetition.
Common classes
Classes used by multiple components are in the seedu.addressbook.commons
package.
Implementation
This section describes some noteworthy details on how certain features are implemented.
Add Team Feature
Implementation
The add team
feature allows users to add a specific team to their list of teams.
The TruthTable
object is designed to have a list of teams called UniqueTeamList
.
The following is an example of how a team is added:
Precondition: Team name is valid (it cannot be empty or begin with a space)
- User keys in the add team command with the name of the team to be added (e.g.
add team CS2103
) - A team is created added to the team list.
If the team name provided is invalid, an appropriate exception will be thrown and the respective error message will be shown to the user.
The following activity diagram summarizes the action taken when the AddTeamCommand
is executed.
Add Task Feature
Implementation
The add task
feature allows users to add a specific task to their team’s task list. The following is an example of how
a task is added:
Precondition: Task name is valid (it cannot be empty or have quotation marks).
- User keys in the add task command with the name of the task to be added (e.g.
add task Complete Resume
) - A task is created and added to the current team’s task list.
If the task name provided is invalid, an appropriate exception will be thrown and the respective error message will be shown to the user.
The following activity diagram summarizes the action taken when AddTaskCommand
is executed:
Activity diagram of adding a task
Design considerations:
-
Alternative 1: Store a global list of tasks and each task keeps track of which team it was created for through an
attribute.
- Pros: A single list of tasks makes it easier to list all the tasks associated with all teams.
- Cons: Does not accurately model how teams actually work in terms of task distribution.
-
Alternative 2: Each team stores a list of tasks that are associated with it.
- Pros: Better modularization since a team contains all the information related to itself, including the tasks associated with it.
- Cons: It is slightly more complicated to find the list of all tasks associated with a person if the person belongs to multiple teams since there multiple task lists.
We decided to use alternative 2 because it scales better as the number of teams increase.
Mark Task as Done Feature
Implementation
The mark
feature allows users to mark a specific task as done.
The following is an example usage scenario of how a task is marked as done:
Precondition: Task index provided is valid.
- User keys in mark command with the specific index of the task. (e.g.
mark 1
) - The first task in the task list is marked as done.
If any of the following occurs:
- Index given is negative
- Index given is out of range (i.e. There are fewer tasks than the specified index)
- Task has already been marked as done
Then, an appropriate exception will be thrown and the respective error message will be shown to the user.
The following activity diagram summarizes the action taken when MarkCommand
is executed:
Activity diagram of marking task as done
Add Member to Team Feature
Implementation
The add member to team feature allows users to add a user to the current team using the person’s name.
The following is an example usage scenario of how a member is added to a team:
Precondition: Index provided is valid and the current working team is set to the team that the member should be added to.
- User keys in
add member
command along with the person’s index. - The person at the specified index in the list is added to the team.
If any of the following occurs:
- The index provided is less than 1
- The index provided is greater than the number of persons in TruthTable
- Person at the specified index is already in the team
Then, an appropriate exception will be thrown and the respective error message will be shown to the user.
The following activity diagram summarizes the action taken when the AddMemberCommand
is executed:
Activity diagram of adding member to team
In the Logic
component, once LogicManager#execute()
is called, TruthTableParser
and AddMemberCommandParser
parses the index of the person in the user input, and generates a AddMemberCommand
object. LogicManager
then
executes the AddMemberCommand
object, which adds the person to the current team in the Model
component. A
CommandResult
is generated with a message indicating the person being added to the team.
List Members Feature
Implementation
The list members feature allows users to view the members in their current team.
The list members command updates the PersonListPanel
and shows the members in the
current team.
Currently, PersonListPanel
displays all persons that satisfy some Predicate
, which is stored in the
filteredPersons
in ModelManager
.
Whenever list members command is called, the Predicate
for filteredPersons
is then updated and the corresponding
members of the team is shown.
The following sequence diagram illustrates what happens within the Logic
component when the list members command is
executed:
Randomly Assign Task Feature
Implementation
The randomly assign task feature allows users to assign a Task
(within a particular Team
) to a random team member (
represented as a Person
object) within the team, who are not already assigned to that Task
.
This functionality is exposed to the user through the assign random
command, and the logic is executed
in AssignTaskRandomlyCommand#execute()
.
Given below is an example usage scenario and the state of the Team
object at each step.
Step 1. The user launches the application and adds multiple users into the current team, as well as at least one task.
The Team
will contain multiple Person
objects (representing team members).
Step 2. The user executes the command assign random 1
to assign the first (and only) Task
randomly to any team
member. As none of the team members have been added, all of them are candidates for random assignment. One of them will
be randomly assigned the task (see red arrow).
Step 3. The user may want to assign a second team member to the task, hence executing assign random 1
again. The
team member who has previously been allocated will not be considered. Similar to above, one more team member will be
randomly allocated the task (see red arrow).

The following activity diagram summarizes the flow of AssignTaskRandomlyCommand#execute()
.
Activity diagram of randomly assigning a task
Add Link Feature
Implementation
The add link feature allows users to add links to their current team.
The add link command updates the LinkListPanel
and adds the link to the list.
The following is an example usage scenario of how a member is added to a team:
Precondition: Link name and URL provided is valid and the current working team is set to the team that the link should be added to.
- User keys in
add link
command along with the-n
flag and the link name, and the-l
flag and the link URL. - The link is added to the link list of the current working team.
If any of the following occurs:
- The link name is invalid
- The URL is badly formatted
- Either the link or the URL is missing
Then, an appropriate exception will be thrown and the respective error message will be shown to the user.
The following activity diagram summarizes the action taken when the AddMemberCommand
is executed:
The following sequence diagram illustrates what happens within the Logic
component when the add link command is
executed:
——————————————————————————————————————–
Documentation, Logging, Testing, Configuration, DevOps
Appendix: Requirements
Product scope
Target user profile:
- Tech-savvy university student leading teams in software engineering modules to build software projects
- Having trouble keeping track of the team’s progress and delegating tasks effectively
- Student who prefers CLI to GUI for productivity’s sake
- Desperate for a single source of truth on who is doing what and by when
Value proposition:
- Users can collate different project-related information (e.g. GitHub project PRs, issues, links to Zoom meetings, and Google Docs)
- Users can visualize teams’ progress easily
- Users can delegate tasks to their teammates conveniently
- CLI interface to manage project tasks much more quickly than GUI based products
User stories
Priorities: High (must have) - * * *
, Medium (nice to have) - * *
, Low (unlikely to have) - *
Priority | As a … | I want to … | So that I can… |
---|---|---|---|
* * * |
New User | See usage instructions | Refer to instructions when I forget how to use the App |
* * * |
Team Leader | View completed tasks | Track the status of the project |
* * * |
Team Leader | Add new tasks | Track things my team needs to do |
* * * |
Team Leader | Add team members with their contact information | Keep track of my team members and contact them with their preferred mode of communication |
* * * |
Team Leader | View tasks based on contact’s name/email | Keep track of each person’s tasks |
* * * |
Team Leader | Assign deadlines to tasks | Track whether we are meeting deadlines for all tasks or not |
* * * |
Team Leader | Create multiple stages of completion for a task (e.g. in progress, in code review, done) | See the progress of each task at a glance |
* * * |
Team Leader | Delete tasks | Remove tasks that are no longer required to be completed or have been added on mistake |
* * * |
Team Leader | Delete members | Remove information of members who are no longer working on my project |
* * |
Team Leader | Modify existing tasks | Update project requirements and track things to do |
* * |
Team Leader | Assign tasks to team members | Distribute workload evenly and keep everyone accountable |
* * |
Team Leader | Edit the contact information of my team members | Correct it if I accidentally added the wrong number/email |
* * |
Team Leader | Give priority to tasks | Better plan which tasks are to be assigned to whom and when |
* * |
Engineering Team Lead | Store links that lead me to an issue on the repo | Easily view the diff, progress, etc. |
* * |
Team Leader | View links to future Zoom meetings | Avoid opening Zoom separately and can directly join the meeting from the application |
* * |
Team Leader | Add subtasks | Break down tasks into manageable parts |
* * |
Team Leader | View a summary of how many tasks each member has been assigned | Assign tasks to the members more equally, based on how occupied they might be |
* * |
Team Leader | Add recurring tasks such as weekly meetings | Assign a recurring tasks once instead of having to schedule it every occurrence |
* |
Team Leader | View past meeting minutes | Refer to what has been discussed before |
* |
Team Leader | View past meetings | Remember which date we completed each meeting |
* |
Team Leader | View upcoming meetings | Plan for upcoming meetings |
* |
Team Leader | Modify upcoming meetings | Reschedule future meetings when the need arises |
* |
Team Leader | Copy team member’s email | Easily send an email to remind him/her to do their task |
* |
Team Leader | Have 2 kinds of deadlines - soft and hard | Let my team members finish the task by the soft deadline and I can review/merge by the hard deadline |
* |
Team Leader | Receive reminders when a deadline is due | Ensure tasks are completed on time |
* |
Team Leader | Randomly assign a task to any team member | Assign tasks easily if nobody has any preference |
Use cases
(For all use cases below, the System is the TruthTable
and the Actor is the user
, unless specified
otherwise)
Use case: UC01 - Add a member to a team
Preconditions: The current working team is set to the team that the member should be added to.
MSS
- User requests to add member and provides member name
-
TruthTable adds the member
Use case ends.
Extensions
-
1a. There is no name provided.
-
1a1. TruthTable shows an error message.
Use case resumes at step 1.
-
Use case: UC02 - Delete a member from a team
Preconditions: The current working team is set to the team that the member should be deleted from.
MSS
- User requests to list members
- TruthTable shows a list of members
- User requests to delete a specific member in the list
-
TruthTable deletes the member
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. TruthTable shows an error message.
Use case resumes at step 2.
-
Use case: UC03 - List all members of a team
Preconditions: The current working team is set to the team that the members should be listed from.
MSS
- User requests to list members
-
TruthTable shows a list of members belonging to the team
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
Use case: UC04 - Add a task to a team
Preconditions: The current working team is set to the team that the task should be added to.
MSS
- User requests to add task and provides task name, task deadline and assignee(s)
-
TruthTable adds the task to the list of tasks
Use case ends.
Extensions
-
1a. There is no task name provided.
-
1a1. TruthTable shows an error message.
Use case resumes at step 1.
-
-
1b. The task deadline is badly formatted.
-
1b1. TruthTable shows an error message.
Use case resumes at step 1.
-
-
1c. The assignee index is out of bounds.
-
1c1. TruthTable shows an error message.
Use case resumes at step 1.
-
Use case: UC05 - Delete a task from a team
Preconditions: The current working team is set to the team that the task should be deleted from.
MSS
- User requests to list tasks
- TruthTable shows a list of tasks
- User requests to delete a specific task in the list
-
TruthTable deletes the task
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. TruthTable shows an error message.
Use case resumes at step 2.
-
Use case: UC06 - List all tasks of a team
Preconditions: The current working team is set to the team whose list of task is to be displayed.
MSS
- User requests to list tasks
-
TruthTable shows a list of tasks belonging to the team
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
Use case: UC07 - Add deadline to existing task
Preconditions: The current working team is set to the team that has the existing task.
MSS
- User requests to list tasks
- TruthTable shows a list of tasks
- User requests to add deadline to specific task in the list
-
TruthTable adds deadline to task
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. TruthTable shows an error message.
Use case resumes at step 2.
-
-
3b. The given deadline is invalid.
-
3b1. TruthTable shows an error message.
Use case resumes at step 2.
-
Use case: UC08 - Create new team
MSS
- User requests create new team and provides new team name
-
TruthTable creates a new team and sets current working team to new team
Use case ends.
Extensions
-
1a. The given team name is used for an existing team already.
-
1a1. TruthTable shows an error message.
Use case resumes at step 1.
-
-
1b. There is no team name given.
-
1b1. TruthTable shows an error message.
Use case resumes at step 1.
-
Use case: UC09 - Change current working team
MSS
- User requests to change current working team
-
TruthTable sets current working team to specified team
Use case ends.
Extensions
-
1a. There is no team name given.
-
1a1. TruthTable shows an error message.
Use case resumes at step 1.
-
-
1b. Team provided does not exist.
-
1b1. TruthTable shows an error message
Use case resumes at step 1.
-
-
1c. Team provided already set as current team.
-
1c1. TruthTable shows an error message.
Use case resumes at step 1.
-
Use case: UC10 - Add a link to a team
Preconditions: The current working team is set to the team that the link should be added to.
MSS
- User requests to add link and provides link name and link URL
-
TruthTable adds the link to the list of links
Use case ends.
Extensions
-
1a. There is no link name provided.
-
1a1. TruthTable shows an error message.
Use case resumes at step 1.
-
-
1b. The link URL is badly formatted.
-
1b1. TruthTable shows an error message.
Use case resumes at step 1.
-
-
1c. There is no URL provided.
-
1c1. TruthTable shows an error message.
Use case resumes at step 1.
-
Non-Functional Requirements
- Should work on any mainstream OS as long as it has Java
11
or above 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 not require internet connection.
- Any changes to the data should be saved permanently and automatically.
- Must be able to be packaged into an executable JAR file that is less than 100MB.
- The data should be stored locally in a readable and human-editable format.
- No database management system should be used.
- Should be able to respond to user requests in less than 1 second when there are less than 1000 persons’ data stored.
Glossary
- Issue: Generally refers to an issue created on GitHub that is used to track the progress of a software development project.
- Mainstream OS: Windows, Linux, Unix, OS-X
- Member: A person in the team, working on a project.
- Repo: A short-form for “repository” meant to store code (usually on a platform such as GitHub or GitLab)
- Task: Anything that needs to be completed for the project to move forward.
- Team Leader: The person in-charge of a project, typically a software engineering project.
Appendix: Instructions for manual testing
Given below are instructions to test the app manually.

Launch and shutdown
-
Initial launch
-
Download the latest truthtable.jar file from the latest release and copy into an empty folder
-
Double-click the jar file
Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
-
-
Saving window preferences
-
Resize the window to an optimum size. Move the window to a different location. Close the window.
-
Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
-
Testing Commands to Manage Persons
Adding a person
-
Adding a person to TruthTable
-
Test case:
add person -n John Doe -p 98765432 -e johnd@example.com -t developer designer
Expected: If there is already a person calledJohn Doe
in TruthTable, then an error message will appear in the output box. Otherwise, a new person will be added to the list in the right output box, with nameJohn Doe
, phone number98765432
, emailjohnd@example.com
, and tagsdeveloper
anddesigner
. -
Test case:
add person -n Jane Doe -p 92345678 -e janed@example.com
Expected: If there is already a person calledJane Doe
in TruthTable, then an error message will appear in the output box. Otherwise, a new person will be added to the list in the right output box, with nameJane Doe
, phone number92345678
, emailjaned@example.com
, and no tags. -
Test case:
add person -n John Doe -p 98765432
Expected: No person is added. Error details shown in the message displayed in the output box. -
Other incorrect
add person
commands to try:add person -p 98765432 -e johnd@example.com -t developer
,add person -n John Doe -p 98765432
,...
(where one or more attributes are missing in the command)
Expected: An error message ofInvalid command format
will be displayed in the output box.
-
Editing a person
-
Editing a person while all persons are being shown
-
Prerequisites: List all persons using the
list persons
command. Person list is not empty. -
Test case:
edit person 1 -p 92345678 -e johndoe@example.com
Expected: Edits the phone number and email address of the first person to be 92345678 and johndoe@example.com respectively. -
Test case:
edit person 0 -p 92345678 -e johndoe@example.com
Expected: No person is edited. Error details shown in the output box. -
Other incorrect edit commands to try:
edit person
,edit person X -n John
,...
(where X is a positive integer larger than the displayed persons list size)
Expected: Similar to previous.
-
Deleting a person
-
Deleting a person while all persons are being shown
-
Prerequisites: List all persons using the
list persons
command. Person list is not empty. -
Test case:
delete person 1
Expected: First person is deleted from the list. Details of the deleted contact shown in the output box. -
Test case:
delete person 0
Expected: No person is deleted. Error details shown in the output box. -
Other incorrect delete commands to try:
delete person
,delete person X
,...
(where X is a positive integer larger than the persons list size)
Expected: Similar to previous.
-
Finding a person
-
Finding all persons whose names contain any of the given keywords
-
Prerequisites: Person list is not empty.
-
Test case:
find person John
Suppose that there is a person namedJohn Doe
.
Expected: Message indicating number of persons found is displayed. Person list on the right updates to only show the persons found. -
Test case:
find person Jane
Suppose that there is no person with a name containingJane
.
Expected: Message indicating that no persons were found is displayed. -
Test case:
find person
Expected: An error message ofInvalid command format
will be displayed in the output box.
-
Listing all persons
-
Listing all persons in TruthTable
- Test case:
list persons
Expected: All persons stored in TruthTable are displayed.
- Test case:
Testing Commands to Manage Members
Adding a member
- Adding a member to the currently selected team
-
Prerequisites: List all persons using the
list persons
command. Person list is not empty. -
Test case:
add member 1
Expected: If the first person on the person list is already a member in the team, then an error message will be displayed on the output box. Otherwise, the first person is added to the team from the list. Details of the added member shown in the output box. -
Test case:
add member 0
Expected: No member is added. Error details shown in the output box. -
Other incorrect delete commands to try:
add member
,add member X
,...
(where X is a positive integer larger than the displayed persons list size)
Expected: Similar to previous.
-
Deleting a member
-
Deleting a member to the currently selected team
-
Prerequisites: List all members using the
list members
command. Member list is not empty. -
Test case:
delete member 1
Expected: First member is deleted from the list. Details of the deleted member shown in the output box. -
Test case:
delete member 0
Expected: No member is deleted. Error details shown in the output box. -
Other incorrect delete commands to try:
delete member
,delete member X
,...
(where X is a positive integer larger than the displayed members list size)
Expected: Similar to previous.
-
Finding a member
-
Finding all members whose names or emails contain any of the given keywords
-
Prerequisites: Member list is not empty.
-
Test case:
find member John
Suppose that there is a member on the team namedJohn Doe
.
Expected: Message indicating number of persons found is displayed. Member list updates to only show the persons found. -
Test case:
find member Jane
Suppose that there is no member with a name containingJane
.
Expected: Message indicating that no persons were found is displayed. -
Test case:
find member
Expected: An error message ofInvalid command format
will be displayed in the output box.
-
Listing all members
-
Listing all members in the currently selected team
- Test case:
list members
Expected: All members in the currently selected team in TruthTable are displayed.
- Test case:
Sorting members
- Sorting members in the currently selected team
-
Test case:
sort members asc
Expected: Team members are sorted in ascending alphabetical order in task list, based on their names. -
Test case:
sort members dsc
Expected: Team members are sorted in descending alphabetical order in task list, based on their names. -
Test case:
sort members res
Expected: Order of team members in member list is reset to order of insertion. -
Test case:
sort members
Expected: An error message ofInvalid command format
will be displayed in the output box.
-
Testing Commands to Manage Teams
Adding a team
-
Creating a team on TruthTable
-
Test case:
add team CS2102 -d "Database Systems"
Expected: If there is already a team calledCS2102
in TruthTable, then an error message will appear in the output box. Otherwise, a new team will be added to the team list tabs, with nameCS2102
, and team descriptionDatabase Systems
. -
Test case:
add team CS2103T
Expected: If there is already a team calledCS2103T
in TruthTable, then an error message will appear in the output box. Otherwise, a new team will be added to the team list tabs, with nameCS2103T
and a default team description. -
Test case:
add team -d "Software Engineering"
Expected: No team is created. Error details shown in the message displayed in the output box. -
Test case:
add team
Expected: An error message ofInvalid command format
will be displayed in the output box.
-
Editing a team
-
Editing the current team on TruthTable
-
Prerequisites: The current working team is set to the team to be edited
-
Test case:
edit team -n CS2102 -d "Database Systems
Expected: Edits the team name and team description of the current team to beCS2102
andDatabase Systems
respectively.
-
Deleting a team
-
Deleting an existing team from TruthTable
-
Prerequisites: The target team is not the only existing team
-
Test case:
delete team CS2103T
Expected: If there is no team namedCS2103T
, an error message is displayed in the output box and no team will be deleted. Otherwise, the team with nameCS2103T
will be deleted from TruthTable
-
Setting a team
-
Sets the current working team to the target team
- Test case:
set team CS2103T
Expected: If there is no team namedCS2103T
, or the current team is namedCS2103T
, an error message is displayed in the output box and the current working team will not be changed. Otherwise, the team with nameCS2103T
will be set as the current working team.
- Test case:
Testing Commands to Manage Tasks
Adding a task
-
Adding a task to TruthTable
-
Test case:
add task "Create PR"
Expected: If there is already a task calledCreate PR
in TruthTable, then an error message will appear in the output box. Otherwise, a new task will be added to the task list, with nameCreate PR
. -
Test case:
add task "Review PR" -a 1 3 -d 2022-12-02 23:59
Expected: If there is already a task calledReview PR
in TruthTable, or if there are fewer than three members, then an error message will appear in the output box. Otherwise, a new task will be added to the task list, with nameReview PR
, assigned to the first and third members of your team’s members list, and a deadline of 2nd Dec 2022 23:59. -
Test case:
add task -a 1 3 -d 2022-12-02 23:59
Expected: No task is added as no task name is provided. Error details shown in the message displayed in the output box.
-
Editing a task
-
Editing a task while all tasks are being shown
-
Prerequisites: List all tasks in the current team using the
list tasks
command. Task list is not empty. -
Test case:
edit task 1 -n "Merge PR" -a 1 -d 2022-12-02 23:59
Expected: The first task in the current team’s task list is edited, setting the name asMerge PR
, assignees as the first member in the team list, and deadline as 2nd Dec 2022 23:59. -
Test case:
edit task 1 -a
Expected: The first task in the current team’s task list is edited, removing all assignees from the task. The name and deadline are not modified in this example. -
Other incorrect delete commands to try:
edit task
,edit task X -n Meeting
,...
(where X is a positive integer larger than the displayed tasks list size)
Expected: Similar to previous.
-
Deleting a task
-
Deleting a task while all tasks are being shown
-
Prerequisites: List all tasks using the
list tasks
command. Task list is not empty. -
Test case:
delete task 1
Expected: First task is deleted from the list. Details of the deleted task shown in the output box. -
Test case:
delete task 0
Expected: No task is deleted. Error details shown in the output box. -
Other incorrect delete commands to try:
delete task
,delete task X
,...
(where X is a positive integer larger than the displayed tasks list size)
Expected: Similar to previous.
-
Finding a task
-
Finding all tasks whose names contain any of the given keywords
-
Prerequisites: Task list is not empty.
-
Test case:
find task User Guide
Suppose that there is a task namedUser Guide
.
Expected: Message indicating number of tasks found is displayed. Task list updates to only show the tasks found. -
Test case:
find task Review PR
Suppose that there is no task with a name containingReview
orPR
.
Expected: Message indicating that no tasks were found is displayed. -
Test case:
find task
Expected: An error message ofInvalid command format
will be displayed in the output box.
-
Listing all tasks
-
Listing all tasks in the current team
- Test case:
list tasks
Expected: All tasks in the current team are displayed.
- Test case:
Mark tasks as done
- Marking a specified task as done
-
Prerequisites: Task list is not empty.
-
Test case:
mark 1
Expected: If the first task is already marked as done, an error message is shown in the output box. Otherwise, the first task in the team is marked as done. -
Test case:
mark 0
Expected: No task is marked as done. Error details shown in the output box. -
Other incorrect delete commands to try:
mark
,mark X
,...
(where X is a positive integer larger than the displayed tasks list size)
Expected: Similar to previous.
-
Unmark tasks as done
- Undoing the mark command to mark specified task as incomplete
-
Prerequisites: Task list is not empty.
-
Test case:
unmark 1
Expected: If the first task has not been marked as done, an error message is shown in the output box. Otherwise, the first task in the team is marked as incomplete. -
Test case:
unmark 0
Expected: No task is marked as incomplete. Error details shown in the output box. -
Other incorrect delete commands to try:
unmark
,unmark X
,...
(where X is a positive integer larger than the displayed tasks list size)
Expected: Similar to previous.
-
Setting Deadline for task
- Setting a deadline for an existing task
-
Prerequisites: Task list is not empty.
-
Test case:
set deadline 1 2023-12-25 23:59
Expected: The deadline for the first task on the task list is set as 25 Dec 2023 23:59. -
Test case:
set deadline 0 2023-12-25 23:59
Expected: No deadline is set for any task. Error details shown in the output box. -
Other incorrect set deadline commands to try:
set deadline
,set deadline X 2023-12-25 23:59
,...
(where X is a positive integer larger than the displayed tasks list size)
Expected: Similar to previous.
-
Assigning a task to team member
- Assign an existing task to a team member in the current team.
-
Prerequisites: Task list is not empty. Multiple tasks in task list. Member list is not empty. Multiple tasks in member list.
-
Test case:
assign task 2 -a 1 2
Expected: The second task on the task list is assigned to the first and second member in the team. If either of the members have previously been assigned to the task, a warning will show up in the output box. -
Test case:
assign task 1 -a
Expected: No additional assignee is set for any task. No error message will be shown. -
Test case:
assign task 0 -a 1 2
Expected: No assignee is set for any task. Error details shown in the output box. -
Other incorrect set deadline commands to try:
assign task
,assign task X -a Y
,...
(where X is a positive integer larger than the displayed tasks list size, and/or Y is a positive integer larger than the displayed members list size)
Expected: Similar to previous.
-
Assigning a task to random team member
- Assign an existing task to a random team member in the current team.
-
Prerequisites: Task list is not empty. Multiple tasks in task list. Member list is not empty. Task is not already assigned to all members of the team.
-
Test case:
assign random 1
Expected: The first task on the task list is assigned to a random team member. -
Test case:
assign random 0
Expected: No assignee is set for any task. Error details shown in the output box. -
Other incorrect set deadline commands to try:
assign random
,assign random X
,...
(where X is a positive integer larger than the displayed tasks list size)
Expected: Similar to previous.
-
Filtering tasks by team member
- Find all tasks that have been assigned to a particular member in the currently selected team.
-
Prerequisites: Member list is not empty.
-
Test case:
tasksof 1
Expected: All tasks assigned to the first member in your current team’s member list is displayed. -
Test case:
tasksof 0
Expected: Error details shown in the output box. -
Other incorrect set deadline commands to try:
tasksof
,tasksof X
,...
(where X is a positive integer larger than the displayed members list size)
Expected: Similar to previous.
-
Sorting members
- Sorting tasks in the currently selected team
-
Test case:
sort tasks asc
Expected: Tasks are sorted in ascending alphabetical order in task list, based on their names. -
Test case:
sort tasks dsc
Expected: Tasks are sorted in descending alphabetical order in task list, based on their names. -
Test case:
sort tasks res
Expected: Order of tasks in task list is reset. -
Test case:
sort tasks
Expected: An error message ofInvalid command format
will be displayed in the output box.
-
View summary of task assignments in team
-
Viewing the number of tasks assigned to each member in the team.
- Test case:
summary
Expected: The number of tasks assigned to each member in the team is displayed in the output box.
- Test case:
Testing Commands to Manage Links
Adding a new link
-
Add a new link to the currently selected team
-
Test case:
add link -n google -l https://google.com
Expected: If there is already a link calledgoogle
in TruthTable, then an error message will appear in the output box. Otherwise, a new link will be added to the link list, with namegoogle
, and URLhttps://google.com
. -
Test case:
add link -n google"
Expected: No link is created. Error details shown in the message displayed in the output box. -
Test case:
add link
Expected: An error message ofInvalid command format
will be displayed in the output box.
-
Editing a link
-
Editing an existing link in the team
-
Prerequisites: Task list is not empty.
-
Test case:
edit link 1 -n facebook -l https://facebook.com
Expected: The first link in the current team’s link list is edited, setting the name asfacebook
, with the URL ofhttps://facebook.com
. -
Test case:
edit link 1 -n google
Expected: The first link in the current team’s link list is edited, setting the name asgoogle
. -
Test case:
edit link 0 -n google
Expected: No link is edited. Error details shown in the output box. -
Other incorrect delete commands to try:
edit link
,edit link X -n Meeting
,...
(where X is a positive integer larger than the displayed links list size)
Expected: Similar to previous.
-
Deleting a link
-
Deleting an existing link from the team
-
Prerequisites: Link list is not empty.
-
Test case:
delete link 1
Expected: The first link will be deleted from the link list -
Test case:
delete link 0
Expected: No link is deleted. Error details shown in the output box. -
Other incorrect delete commands to try:
delete link
,delete link X
,...
(where X is a positive integer larger than the link list size)
Expected: Similar to previous.
-
Effort
TruthTable was a complex project requiring extensive effort by all our team members.
Going beyond our limits
Here are some features of our project that makes our project distinct and unique:
Using picocli
as our parsing library
As our app is catered for Software Engineering team leads, we wanted our app to feel similar to other Command-Line
Interfaces (CLI) they may be acquainted with.
Software Engineering team leads are generally proficient with using the Terminal to get things done,
such as using git
via its CLI, and many are highly familiar with the shell on Linux OS. Hence, we decided that the
original AddressBook Level-3 (AB3) parser was not suitable as its syntax was relatively unintuitive, and steepens the
learning curve for our target users.
We opted to scrape the parsers and used picocli as our parsing library, which enabled things
like subcommands (using commands with spaces in them like add person
instead of add_person
) and flags to specify
options (e.g. -n
vs n/
in AB3), which and makes it more intuitive for users.
Multiple Classes
As our application’s primary function is to manage software engineering projects, including URLs, tasks, and team members
within each team, we had to introduce new classes like Team
, Task
and Link
. This added a high degree of complexity
to our app as entities can be tied to each other in multiple ways, such as enabling tasks to have multiple assignees.
This allows our app to provide extra functionality that makes our app more useful for Software Engineering team leads.
This resulted in the number of commands increasing from 9 (in AB3) to 42 (in TruthTable), which meant
that more classes had to be written to accommodate the wide variety of commands (including intermediary data types such
as Index
and new objects in our model such as Team
and Task
), and more testing had to be done to ensure our
app works as intended.
Improved UI
The original AB3 program only displayed the list of persons which is not very useful for a task management application. To make our app effective, we created additional panels for teams, members, tasks and links which makes it easier for the user to track the status of their team as they execute their commands.
In terms of colour scheme, we thought that the dark theme of AB3 was uninspiring and made use of own light theme to give this app a nice, warm and welcoming feel. For users that prefer a dark scheme however, we have provided the ability to switch themes as well.
Extensive Testing
The use of picocli meant that all parser classes had to be removed, and the way the commands are generated is different. Hence, all commands and parser tests in AB3 had to be removed and reimplemented.
Furthermore, the increased number of classes, along with all the commands, means that code coverage is likely to decrease and more testing had to be done.
Hence, we took it as an opportunity to do extensive testing for our application through writing effective unit tests for our commands, parsers and model objects. We redesigned how testing is done for commands and manage to cover all commands successfully. We maintained a ~73% code coverage from the original ~72% in AB3, and increased the number of test cases from 248 (in AB3) to 527 (in TruthTable).
Conclusion
Overall, this project has been extremely fulfilling, and we believe our team has managed to create a highly functional app. Over the few months of development, we pushed our limits and picked up skills that are extremely valuable in writing quality code and designing robust software.
This section only scratches the surface of the level of effort that we put into this project, and there were many other things like the countless discussions that went into design decisions big and small, and the invisible effort of documentation in this project. The additional challenges that we overcome as a team are not included here for the sake of brevity.
Hopefully, we hope that this Developer Guide will help you to understand the design and implementation of TruthTable. We welcome all Software Engineering student team leads to try, maintain or even extend our application.