Developer Guide
Acknowledgements
Thanks to Prof Damith C.Rajapakse and Boyd Anderson provide consultation for me.
Setting up, getting started
Refer to the guide Setting up and getting started.
Design
- Architecture
- UI component (UI, Input / Output, DialogBox, MainWindow, Main, Launcher)
- Logic component (Duke, Execution, Command, Parser)
- Model component (Task, TaskList)
-
Storage component (Storage) API: Storage.java
The Storage component,
a. can save duke.txt file to /data folder and load the duke.txt file back /data folder with corresponding format.
b. auto save when user execute done, edit, delete and add command
File formatshowing as below,T | Y | borrow book D | N | return book | 20-11-2019 E | N | party | 21-11-2019 -
Common classes (TaskList)
- Class diagram

- Object diagram

Implementation (Sequence Diagram)
- List Command
The user executelistcommand to show all the tasks in the list.
UI scannedlistcommand from user,Executioncreate a newListCommandandrun()to get the tasks from list, taskList return the items to UI and show to user.

- Delete Command
The user executedelete INDEXcommand to delete the task in the task list.
The working flow of the deleteCommand is shown in the sequence diagram below.

- Done Command
The user executedone INDEXcommand to mark the completed task in the item list.
The working flow of the doneCommand is shown in the sequence diagram below.

- Find Command
The user executefind KEYWORDcommand to search tasks containKEYWORDin the task list.
The working flow of the findCommand is shown in the sequence diagram below.

- Exit Command
The user executeexitcommand to quit the program.
The working flow of the exitCommand is shown in the sequence diagram below.

Testing
-
Testing Guide
There are two ways to run tests:- Using IntelliJ JUnit test runner. Run all tests, right-click on the
src/test/javafolder </br> a. chooseRun‘All Tests’ </br> b. Run a subset of tests, you can right-click on a test package, test class and selectRun‘ParserTest’ </br> - Using Gradle Open a console and run the command gradlew clean test (Mac/Linux: ./gradlew clean test)
- Using IntelliJ JUnit test runner. Run all tests, right-click on the
Appendix: Requirements
Product scope
Target user profile
- has a need to manage and track daily tasks
- prefers desktop apps over other types
- prefers typing to mouse interactions
- is reasonably comfortable using CLI apps
Value proposition
- keep information of all daily tasks
- track daily tasks easily
- record the date of tasks
User Stories
| Version | As a … | I want to … | So that I can … |
|---|---|---|---|
| v1.0 | user | add task with description | record all the tasks |
| v1.0 | user | view all the tasks | know the status of the tasks |
| v1.0 | user | delete the task | remove the task which is assigned to others |
| v1.0 | user | have exit command | quit the system without using mouse |
| v2.0 | user | mark completed tasks | know which tasks are not completed yet |
| v2.0 | user | add task with description and date | know when is the schedule of the task |
| v2.0 | user | search tasks with keyword | view the specific task quickly |
| v2.0 | user | save task list as file | print record into hard copy |
| v2.0 | user | read previous tasks from the file | continue to add task from the previous record |
| v3.0 | user | have interact with system via GUI | have more fun while using the system |
| v3.0 | user | edit the item without deleting it | rectify the task with wrong information quickly |
Use Cases
(For all use cases below, the System is DukePro (Duke) and the Actor is the user, unless specified otherwise)
Use case: Add Todo
- User keys in todo task description
- Duke records the todo task
- Duke shows the todo task added successfully
- Data file updated automatically
Use case: Add Deadline
- User keys in deadline task description and date
- Duke records the deadline task
- Duke shows the deadline task added successfully
- Data file updated automatically
Use case: Add Event
- User keys in event task description and date
- Duke records the event task
- Duke shows the event task added successfully
- Data file updated automatically
Use case: List Items
- User requests to view tasks
- Duke shows the list of tasks
Use case: Delete Item
- User requests to delete a specific task
- Duke deletes the task from the list
- Duke shows the item deleted successfully
- Data files updated automatically
Use case: Done Item
- User requests to update a specific task when it is done
- Duke marks the task as done
- Duke shows the task updated successfully
- Data files updated automatically
Use case: Find Items
- User keys in the keyword to search
- Duke performs searching
- Duke displays the result
Use case: Edit Item
- User requests to edit a specific task with new description
- Duke updated the task in the list
- Duke shows the task updated successfully
- Data files updated automatically
Use case: Exit
- User requests to exit the program
- Duke terminates safely
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 tasks without a noticeable sluggishness in performance.
- The command should be simple enough so that users are able to accomplish most of the tasks faster using typing than using the mouse.
- Should be easy for new users to get used to usage.
Glossary
Mainstream OS: Windows, Linux, Unix, OS-X