Developer Guide
- Design
- Implementation
- Documentation, logging, testing, configuration, dev-ops
- Appendix: Requirements
- Appendix: Instructions for manual testing
- Appendix: Effort
- Acknowledgement
Design
Architecture
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 addTask d/project meeting g/CS2101 type/event date/2021-10-10
.
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 component’s 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.
Logic component
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 theSweeBookParser
class to parse the user command. - This results in a
Command
object (more precisely, an object of one of its subclasses e.g.,AddTaskCommand
) which is executed by theLogicManager
. - The command can communicate with the
Model
when it is executed (e.g. to add a task). - The result of the command execution is encapsulated as a
CommandResult
object which is returned back fromLogic
.
The Sequence Diagram below illustrates the interactions within the Logic
component for the execute("addTask d/project meeting g/CS2101 type/event date/2021-10-10")
API call.
Here are the other classes in Logic
(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
SweeBookParser
class creates anXYZCommandParser
(XYZ
is a placeholder for the specific command name e.g.,AddTaskCommandParser
) which uses the other classes shown above to parse the user command and create aXYZCommand
object (e.g.,AddCommand
) which theSweeBookParser
returns back as aCommand
object.
Model component
Here is an overview of the model component.
The Model
component,
- stores the list of contacts and list of tasks (contained in UniquePersonList and TaskList respectively)
- stores the currently ‘selected’
Person
andTask
objects (e.g., results of a search query) as separate filtered lists which is exposed to outsiders as an unmodifiableObservableList<Person>
orObservableList<Task>
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)
Taking a closer look at the person and tasks models, here is the class diagram.
Person
and Task
models are similar such that,
- they share a
Group
class, which can be eitherCS2103T
orCS2101
Specifically for Person
,
- the model stores the phone number, email and socials
- socials refer to their Telegram and Github usernames
Lastly, specfically for Task
,
- a task has a date (to specify a deadline or time of event), description, priority, and recurring frequency
- recurring frequency can be in terms of weekly, monthly and yearly
- priority can be low, medium or high
- a task can be instantiated as a
Todo
,Deadlne
orEvent
UI component
The API of this component is specified in Ui.java
The UI consists of a MainWindow
that is made up of parts e.g.CommandBox
, ResultDisplay
, PersonListPanel
, StatusBarFooter
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
Storage component
The Storage component,
- can save contact list/task records/user preference data in json format, and read them back into corresponding objects.
- inherits from
ContactListStorage
,TaskRecordsStorage
, 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 the Storage component’s job is to save/retrieve objects that belong to the Model)
Implementation
This section describes some noteworthy details on how certain features are implemented.
Edit feature ( edit
and editTask
commands)
Implementation
The edit feature allows users to edit specific fields in tasks or contacts. The implementation for both contacts (edit
) and
tasks (editTask
) are similar. Therefore we can generalize the implementation of the edit feature by exploring how the editTask
command works for tasks.
Given below is a sequence diagram of the execution of an edit command: Click here for better resolution
The general logic of the editTask
command is similar to addTask
(which can be found above),
with the following differences:
- editTask uses a
EditTaskDescriptor
to store the specified values that the user want to change - when EditTaskCommand is executed, we create a new task, where the value of each field is given more priority to the
EditTaskDescriptor
than the non-edited task. (i.e if a field is non-null in EditTaskDescriptor, the value of that field in the new task will be equal to that field in theEditTaskDescriptor
. Else, it will remain unchanged from the old task) - we then replace this new task with the current task in the model
Given below is an example usage scenario of how a contact is edited:
- The user enters the edit command with the specified fields to be edited. (e.g edit 1 n/Johm Doe tg/johndoeee))
- SWEe-book updates the contact with the new updated fields, with non-updated fields left unchanged.
editTask
command, a date must be specified
for recurring tasks and deadline/event tasks. Else, an error message will be shown to the user. (It does not make sense for a task that is recurring, or that is a deadline/event, to have no date!)
Alternative considerations
- Alternative 1: Update the fields of the old task, without creating a new task.
- Pros: Less logic needed, less complexity. (No need for
EditTaskDescriptor
class) - Cons: Hard to debug, and more prone to errors, as we are mutating the object in the list
- Pros: Less logic needed, less complexity. (No need for
Recurring Tasks feature
Implementation
The recurring task feature allows users to add tasks that can be repeated by week, month, or year. It is facilitated
by RecurringFrequency
, which is a optional component of Task
. Additionally, the following operations are implemented
in Task
, TaskList
, TaskRecords
and Date
:
-
Task#updateRecurringTaskDate()
- Task updates its Date to the current week/month/year, based on the recurringFrequency of the Task. -
Date#isLastWeek()
,Date#isLastMonth()
,Date#isLastYear()
- Checks current Date of Task against real-time date. -
Date#getDateForThisWeek()
,Date#getDateForThisMonth()
,Date#getDateForThisYear()
- Updates Date to be within current week/month/year. -
TaskList#updateRecurringTasksDates()
- Iterates through list of Tasks and updates its Date if Task is recurring. -
TaskRecords#updateRecurringTasks()
- Calls for TaskList to update recurring Tasks.
TaskRecords#updateRecurringTasks()
is used in the ModelManager
on boot-up of the application to update all Tasks, if
required. Below is a sequence diagram after the initialisation of the ModelManager
:
Do note that Date
is required for a Task
to be recurring. Notably, Date
is optional for Todo
.
Given below is an example usage scenario of how a recurring task is added and how it behaves upon re-launching of the SWEe-book application.
- Step 1. The user launches the application. A recurring
Task
is added, where the user specifies therecurringFrequency
to be weekly, and theDate
to be from the previous week. TheTask
is added, but theDate
is not updated yet, even if it is not of the current week. TherecurringFrequency
of the task is marked asweek
. - Step 2. The user re-launches the application.
ModelManager
callsTaskRecords#updateRecurringTasks()
, which then callsTaskList#updateRecurringTasksDates()
, which then callsTask#updateRecurringTaskDate()
on the task added. Since theTask
added was recurring (itsrecurringFrequency
is marked asweek
, itsDate
is updated to the current week, with the same day. - Step 3. The user then launches the application a week after. The
Task
is updated similarly to Step 2, and since it is checked against real-time, it is updated to the current week.
Given below is an activity diagram when a user adds a recurring task and restarts his SWEe-book application.
Alternative considerations
- Alternative 1: Let the user choose when to refresh his tasks to their new dates, rather than on start-up of the application.
- Pros: Allows user more control over their recurring tasks
- Cons: Less intuitive since tasks are not updated to real-time, having a refresh command just for recurring tasks is not ideal.
Sort Tasks Feature
The sort tasks feature allows users to sort the task list according to their needs. They can sort the tasks by their descriptions, groups, priorities and date. They can also choose whether they want the sorting be in ascending or descending order. This gives users 8 different ways to sort their tasks.
The following is the Activity Diagram for the sort tasks command.
Implementation
The Sequence Diagram below illustrates the interactions between the Logic
component and Model
component for the execute("sortTasks param/desc o/a")
API call. It also shows how it interacts with the UI
Component through the illustration of the command’s interaction with JavaFx’s ObservableLists
(FilteredList
and SortedList
).
The JavaFx package automatically detects any changes to the task list, implemented with JavaFX’s ObservableList
. This includes detecting changes in the comparators and filters applied on it. When the SortTasksCommand
is executed, it removes any existing filters applied on the task list to reset the task list back to its original state before setting a comparator to it. The FilterTasksCommand
works the same way as well by setting the comparator
to null
while setting the predicate
to the appropriate predicate (filter).
Done Tasks Feature
Implementation
The doneTask feature allows users to mark a specific task as done. Given below is a sequence diagram of the execution of a doneTask command: Click here for better resolution
Given below is an example usage scenario of how a task is marked as done: Preconditions: Valid task index provided.
- User keys in doneTask command with the specific index of task. (e.g. doneTask 1)
- The first task in task list is marked as done.
The following activity diagram summarizes the actions taken when DoneTaskCommand is executed:
Alternative considerations
- Alternative 1 (current choice): Separate updating of a task’s status into its own command
- Pros: More streamlined command for ease of use
- Our target user (CS2103T students) are likely to update task statuses a with must higher frequency than information like task description or task priority etc. Hence, having a dedicated command to update status of task streamlines the user workflow.
- Cons: Additional command increases complexity, harder to maintain.
- Pros: More streamlined command for ease of use
- Alternative 2: Integrate updating of task status into ‘editTask’ command
- Pros: Fewer commands for user to remember as well as fewer commands for developers to maintain
- Cons: More troublesome to when user just wants to update task status.
Documentation, logging, testing, configuration, dev-ops
Appendix: Requirements
Product scope
Target user profile:
- is a CS2103T/CS2101 student
- has a need to keep track of tasks pertaining to CS2103T/CS2101 module
- has a need to keep track his/her CS2103T/CS2101 group mates’ contact details
- prefer desktop apps over other types
- can type fast
- prefers typing to mouse interactions
- is reasonably comfortable using CLI apps
Value proposition: Manage contacts of group mates and daily tasks faster than a typical mouse/GUI driven app
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 |
* * * |
user | add a new person | |
* * * |
user | delete a person | remove entries that I no longer need |
* * * |
user | find a person by name | locate details of persons without having to go through the entire list |
* * |
user | hide private contact details | minimize chance of someone else seeing them by accident |
* |
user with many persons in the contact list | sort persons by name | locate a person easily |
* |
user | Add a new task to the list | keep track of the tasks that needs to be done |
* * * |
new user | Have an overview of my groupmate details like telegram, email and name. | So I can easily contact them |
* * * |
forgetful user | have a list of tasks | follow up on it and not miss out tasks |
* |
user | delete a task in the list | delete the tasks that are no longer needed |
* |
user | mark a task in the list as done | keep track of which tasks are done or not yet done |
* * * |
long term user | quickly check deadlines in order of priority (sort) | clear the tasks due one at a time |
* * * |
user | filter the task according to the different modules | know what I can do for each module |
* * |
user | edit specific fields in a task | conveniently change specific fields without needing to delete and add back a task |
Use cases
(For all use cases below, the System is the SWEe-book
, Actor is the user
while person can be used interchangeably with contact (as in contact list), unless specified otherwise)
Use case (UC01): Add a person
MSS
- User adds a person
-
System shows the details of the person
Use case ends.
Extensions
- 2a. The details are invalid or incomplete.
-
2a1. System shows an error message.
Use case resumes at step 2.
-
Use case (UC02): Delete a person
MSS
- User requests to list persons
- System shows a list of persons
- User requests to delete a specific person in the list
-
System deletes the person
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. System shows an error message.
Use case resumes at step 2.
-
Use case (UC03): Edit a person’s particulars
MSS
- User requests to list persons
- System shows a list of persons
- User requests to edit a specific person in the list
-
System shows the details of the updated person
Use case ends.
Extensions
- 3a. The details are invalid or incomplete.
-
3a1. System shows an error message.
Use case resumes at step 3.
-
Use case (UC04): Find a person / a group of people
MSS
- User requests to find a person / a group of people using some keywords
-
System shows a list of persons pertaining to the keywords
Use case ends.
Use case (UC05): Add a task
MSS
- User keys in a task.
-
System shows the details of the task added to task list.
Use case ends.
Extensions
- 2a. The task details are invalid or incomplete.
- 2a1. System shows an error message about the incorrect or missing details.
Use case ends.
Use case (UC06): Edit a task
MSS
- User requests to edit a specific person in the list
-
System shows the details of the updated person
Use case ends.
Extensions
- 1a. The details are invalid or incomplete.
-
1a1. System shows an error message.
Use case resumes at step 3.
-
Use case (UC07): Delete a task
- User requests to list tasks.
- System shows a list of tasks.
- User keys in an index.
-
The task of specified index in task list is removed.
Use case ends.
Extensions
- 1a. User keys in an invalid index.
-
1a1. System displays an error message about invalid index.
Use case ends.
-
Use case (UC08): Have an overview of group mates’ contact details
- User keys in a group of which its members’ contact details are needed.
-
System displays the contact information of the group members of specified group
Use case ends.
Extensions
- 1a. User keys in an invalid group.
-
1a1. System displays an error message about invalid group.
Use case ends.
-
Use case (UC09): Have a list of tasks
- User keys in the command to list the tasks.
-
System displays the list of tasks.
Use case ends.
Extensions
- 1a. User keys in an invalid command.
- 1a1. System displays an error message about invalid command.
Use case ends.
Use case (UC10): Sort tasks
- User keys the command, the parameter and order which he wants the tasks to be sorted by.
-
System displays the tasks in the parameter and order specified.
Use case ends.
Extensions
- 1a. User keys in an invalid parameter or order.
-
1a1. System displays an error message about invalid parameter or order.
Use case ends.
-
Use case (UC11): Filter tasks
- User keys in a filter criterion.
-
System displays the tasks pertaining to the criterion specified.
Use case ends.
Extensions
- 1a. User keys in an invalid criterion.
- 1a1. System displays an error message about invalid criterion. Use case ends.
Use case (UC12): Mark a task as done
- User requests to list tasks.
- System shows a list of tasks.
- User keys in an index.
- The task of specified index in task list is marked as done.
Use case ends.
Extensions
- 1a. User keys in an invalid index.
- 1a1. System displays an error message about invalid index.
Use case ends.
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.
- System should respond within three seconds.
- System still works even if the data file is missing.
- If the data file is corrupted, the corrupted file is overwritten with an empty data file.
- System will not collect any information from the user to abide by the Personal Data Protection Act.
Glossary
Term | Meaning |
---|---|
Mainstream OS | Windows, Linux, Unix, OS-X |
Private contact detail | A contact detail that is not meant to be shared with others |
CLI | Command-Line Interface |
Group | a group of either CS2103T or CS2101 students |
Index | the ordering of task in the task list |
Appendix: Instructions for manual testing
Given below are instructions to test the app manually.
- Note: These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.
- Note that only refactored or new features from AB3 are shown here.
Adding a Contact
- Prerequisites: No existing contact with the same…
- Name of
John Doe
, ignoring case-sensitivity and whitespaces between first/middle/last names (i.e “john doe” and “john doe” are the same as “John Doe”) - Email of
johnd@example.com
- Telegram and GitHub usernames of
johndoe
- Name of
-
Testcase 1:
add n/John Doe g/CS2103T g/CS2101 p/98765432 e/johnd@example.com tg/johndoe gh/johndoe
Expected: Command result box shows the person is added with the correct fields specified. The added person should appear as the last person of the contact list in the GUI.
-
Testcase 2:
add n/Jane Doe g/CS2103T g/CS2101 p/98765432 e/janed@example.com tg/janedoe gh/janedoe
Expected: Unable to add person due to duplicate phone number. Command result box shows
A person with this phone number (98765432) already exists in the contact list.
-
Other similar testcases: Trying to add any person which does not meet the prerequisites
Expected: Unable to add person due to the duplicated field. Command result box shows
A person with this <duplicated field> (<duplicated field value>) already exists in the contact list.
Editing a contact
- Prerequisites:
- There are at least 1 contact in the list
-
Testcase 1:
edit 1 tg/@newusername gh/newusername
Expected: Edits the usernames of first contact in the list to the new usernames.
-
Testcase 2:
edit 1 p/91234567
Expected: Edits the phone number of first contact in the list to the new phone number.
Filtering contacts by group
-
Testcase 1:
group CS2101
Expected: Contact list returns the list of people in the group
CS2101
. -
Testcase 2:
group CS2103T
Expected: Contact list returns the list of people in the group
CS2103T
. -
Testcase 3:
group CS1111
Expected: Error message shown due to invalid group name.
Editing a task
- Prerequisites:
- For each testcase, please use the following task by using the addTask command:
addTask d/finish coding g/CS2101 type/todo
- Assume that the task list only contains the above task.
- For each testcase, please use the following task by using the addTask command:
-
Testcase 1:
editTask 1 type/event
Expected: Error message shown as an event needs to have an associated date.
-
Testcase 2:
editTask 1 type/event date/2021-11-11
Expected: Edits the first task in the list with the correct updated fields. Command result shows edited task fields, and GUI updates the corresponding fields of the task.
-
Testcase 3:
editTask 1 recurring/week
Expected: Edits the first task in the list with the correct updated fields. Command result shows edited task fields, and GUI updates the corresponding fields of the task.
Sorting task lists
- Sorting task list with valid parameter and order
- Prerequisites: The task list is from the sample task list data that comes with the jar file is first run.
- Test case:
sortTasks param/desc o/a
Expected task list (sorted by description in ascending order lexicographically):- Create slides
- OP1 Presentation
- OP1 script
- Project Meeting
- Update User Guide
- Test case:
sortTasks param/date o/d
Expected task list (sorted by date in reverse chronological order)- Project Meeting (Dec 21 2021)
- Update User Guide (Dec 11 2021)
- OP1 Presentation (Nov 21 2021)
- Create slides (Nov 17 2021)
- OP1 script (Nov 11 2021)
- Sorting task list with invalid parameter, order or both
- Prerequisites: The task list is from the default task list data that comes with the jar file.
- Test case:
sortTasks param/tasktype o/a
Task list does not change and SWEe-book returns an error message with its correct usage. - Test case:
sortTasks param/date o/c
Task list does not change and SWEe-book returns an error message with its correct usage.
Filtering task lists
- Filtering task list with a valid criterion
- Prerequisites: The task list is from the sample task list data that comes with the jar file is first run.
- Test case:
filterTasks date/2021-11-11
Expected task list (filtered by date of 11 Nov 2021):- OP1 script
- Test case:
filterTasks g/CS2103T
Expected task list (filtered by group of CS2103T):- Update User Guide
- Project Meeting
- Filtering task list with an invalid criterion
- Prerequisites: The task list is from the sample task list data that comes with the jar file is first run.
- Test case:
filterTasks pty/1
Task list does not change and SWEe-book returns an error message with its correct usage. - Test case:
filterTasks g/CS2107
Task list does not change and SWEe-book returns an error message with its correct usage.
Marking a task as done
- Marking a task’s status as done successfully
-
Prerequisites: There is at least one task in task list. List all tasks using the
listTasks
command. Assume there is a taskProject Meeting
that is not done at index 1 of task list. -
Test case:
doneTask 1
Expected: TaskProject Meeting
status is updated to done. A success message, with details of task that is marked as done, is shown.
-
- Attempting to mark a task as done with invalid index
-
Prerequisites: List all tasks using the
listTasks
. Assume there are a total of 4 tasks. -
Test case:
doneTask 6
Expected: An error message is shown, indicating that given index exceeded total number of tasks. -
Test case:
doneTask -1
Expected: An error message is shown, indicating that index should not be negative.
-
- Attempting to mark a task, that is already done, as done
-
Prerequisites: List all tasks using the
listTasks
. Assume there is a taskProject Meeting
that has been marked as done at index 1 of task list. -
Test case:
doneTask 1
Expected: An error message is shown, indicating that task has already been marked as done.
-
Adding a task
- Adding a task with all fields
- Test case:
addTask d/Project Meeting g/CS2101 type/Todo date/2021-11-11 pty/low recurring/week
Expected: Task with all the above fields added to the task list. Task list in GUI is updated with this new task, added to the bottom of the list -
For incorrect addTask commands, try:
addTask d/<any description> g/<not CS2101 or CS2103T> <other valid params>
,addTask <other valid params> type/<not Todo, Event or Deadline> <other valid params>
,addTask <other valid params> pty/<not low, med or high> <other valid params>
,addTask <other valid params> recurring/<not week, month, or year>
- Adding a task without optional fields
- Test case:
addTask d/Assignment g/CS2103T type/Todo
Expected: Task with all the above fields added to the task list. Task list in GUI is updated with this new task, added to the bottom of the list - Test case:
addTask d/Assignment g/CS2103T type/Event
Expected: No task is added and error is shown. Event type task must have a date attached, date is not optional for events. - Test case:
addTask d/Assignment g/CS2103T type/Event
Expected: No task is added and error is shown. Deadline type task must have a date attached, date is not optional for deadlines. - Test case:
addTask d/Rehearsal g/CS2101 type/Todo recurring/month
Expected: No task is added and error is shown. Task with recurring field must have a date as well.
- Test case:
- Test case:
Listing all tasks
- List all tasks
- Prerequisite: Have some tasks saved in
[JAR file location]/data/taskrecords.json
- Test case:
listTasks
Expected: Task list in GUI is updated to show all saved tasks.
- Prerequisite: Have some tasks saved in
Deleting a task
- Deleting a task from SWEe-book
-
Prerequisites: There are 2 tasks in task list. List all tasks using the
listTasks
command. At index1
we haveProject Meeting
, and at index2
we havePresentation
-
Test case:
deleteTask 1
Expected: TaskProject Meeting
is deleted and removed from task list. A success message with details of the deleted task is shown. -
Test case:
deleteTask 3
Expected: An error message is shown, indicating that given index exceeded total number of tasks. -
Test case:
deleteTask -3
Expected: An error message is shown, indicating that index should not be negative.
-
Appendix: Effort
Adding new UI components
- After V1.2, our team had yet to modify the existing AB3 UI , despite already implementing one of the main components of SWEe-book, namely task management, and made some adjustments to the existing contact list component. We encountered some difficulties in reflecting task list in the UI, and also modifying it with features such as FilterTasks and SortTasks, and thus at that time most of the task management is still reflected on the CLI only. Fortunately, our group managed to make use of Java SortedList and FilteredList to help us implement the task management UI component.
Implementing dynamic features
- SWEe-book features implemented require the user to type in commands in the CLI to be executed. As our group implemented more features which allow for more variations and contextualization, such as task priority, we realized that this may be too troublesome for a part of our target audience as they may have to type relatively long commands, especially for task management. Thus, to minimize this, we decided to make some feature fields optional. This means that when the user does not specify the field, it will be set to a default value. For example, when task priority is not specified, it will be automatically set to a default value of “medium”. We believe that this will make SWEe-book more convenient to use as our target audience do not need to type too long of a command, while still being given the option to specify more details.
Showing warnings when the data file is invalid or empty
- When the app starts up, it will load the data from the respective data files (.json files). When an error occurs, it is difficult to display an error message onto the Ui as it would break the current design pattern where a message will only appear through a user-input command from the class CommandResult. Loading from the storage files should not go through a series command. However, It is also not good to not inform the users about the error and just simply give an empty contact list or task list. To counter that, we just simply make the Ui pop-up a new window to inform the users about the error, whether the data files are missing or corrupted.
Acknowledgement
Code reuse
- The following code is reused from here. The code is used to check if usernames are valid via regex.
- The following code is reused from here. The code is used to enable users to launch hyperlinks in their default browser by clicking on them in the GUI.
Documentation and diagrams
A large part of the documentation and diagrams are reused from the AddressBook-Level3 project created by the SE-EDU initiative.