Skip to content

Commit 3a43b6d

Browse files
weixue123weixue123
authored andcommitted
Added JavaDoc to describe the different classes
1 parent 646b638 commit 3a43b6d

15 files changed

Lines changed: 48 additions & 9 deletions

src/main/java/duke/Duke.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
import duke.tasks.TaskList;
77
import duke.ui.Parser;
88

9+
/**
10+
* The chatbot/to-do list application.
11+
*/
912
public class Duke {
1013
private final TaskList tasks;
1114
private final Storage storage;
1215

1316
/**
14-
* Initializes an instance of Duke to handle ALL the logic of the application.
17+
* Initializes an instance of Duke with a <code>TaskList</code> property, which is essentially the
18+
* state of the application, and a <code>Storage</code> property, which handles the loading and saving
19+
* of tasks when the application starts and shuts down respectively.
1520
*
1621
* @param filepath Path to text file from which tasks are loaded when the app starts, and to
1722
* which tasks are saved when the app terminates.

src/test/java/duke/commands/TestAddTaskCommand.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
import duke.tasks.TaskList;
1414
import duke.tasks.ToDo;
1515

16+
/**
17+
* JUnit test for the <code>AddTaskCommand</code> class in duke.commands
18+
*/
1619
public class TestAddTaskCommand {
1720
private final ToDo toDo;
1821
private final Deadline deadline;

src/test/java/duke/commands/TestByeCommand.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
import duke.tasks.TaskList;
99
import duke.tasks.ToDo;
1010

11+
/**
12+
* JUnit test for the <code>ByeCommand</code> class in duke.commands
13+
*/
1114
public class TestByeCommand {
1215
private final ToDo toDo;
1316
private final TaskList tasks;

src/test/java/duke/commands/TestDeleteCommand.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
import duke.tasks.TaskList;
1414
import duke.tasks.ToDo;
1515

16+
/**
17+
* JUnit test for the <code>DeleteCommand</code> class in duke.commands
18+
*/
1619
public class TestDeleteCommand {
1720
private final ToDo toDo;
1821
private final Deadline deadline;

src/test/java/duke/commands/TestDoneCommand.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
import duke.tasks.TaskList;
1515
import duke.tasks.ToDo;
1616

17+
/**
18+
* JUnit test for the <code>DoneCommand</code> class in duke.commands
19+
*/
1720
public class TestDoneCommand {
1821
private final ToDo toDo;
1922
private final Deadline deadline;

src/test/java/duke/commands/TestFindCommand.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
import duke.tasks.TaskList;
1414
import duke.tasks.ToDo;
1515

16+
/**
17+
* JUnit test for the <code>FindCommand</code> class in duke.commands
18+
*/
1619
public class TestFindCommand {
1720
private final ToDo toDo;
1821
private final Deadline deadline;

src/test/java/duke/commands/TestInvalidInputCommand.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
import duke.tasks.ToDo;
1313
import duke.ui.Parser;
1414

15-
15+
/**
16+
* JUnit test for the <code>InvalidInputCommand</code> class in duke.commands
17+
*/
1618
public class TestInvalidInputCommand {
1719
private final ToDo toDo;
1820
private final TaskList tasks;

src/test/java/duke/commands/TestListCommand.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
import duke.tasks.TaskList;
1414
import duke.tasks.ToDo;
1515

16+
/**
17+
* JUnit test for the <code>ListCommand</code> class in duke.commands
18+
*/
1619
public class TestListCommand {
1720
private final ToDo toDo;
1821
private final Deadline deadline;

src/test/java/duke/tasks/TestDeadline.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
import org.junit.jupiter.api.Test;
99

10-
10+
/**
11+
* JUnit test for the <code>Deadline</code> class in duke.tasks
12+
*/
1113
public class TestDeadline {
1214
private final String description;
1315
private final String dateTimeString;

src/test/java/duke/tasks/TestEvent.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
import org.junit.jupiter.api.Test;
99

10-
10+
/**
11+
* JUnit test for the <code>Event</code> class in duke.tasks
12+
*/
1113
public class TestEvent {
1214
private final String description;
1315
private final String dateTimeString;

0 commit comments

Comments
 (0)