Skip to content

Commit

Permalink
A-JavaDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
douglaslewpc committed Mar 3, 2021
1 parent 12f4746 commit 2e2b12d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
17 changes: 15 additions & 2 deletions src/main/java/parser/Parser.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/*
* The Parser class deals with making sense of the user input
* */
package parser;

import exceptions.DukeException;
Expand Down Expand Up @@ -37,6 +40,10 @@ public String processUserCommand(String userCommand) {
return "invalid_user_input";
}
}
/*
* The processTodo method within the Parser class processes the user input into the required format for the Todo Class
* @params userInput is a String[] that stores the user input
* */

public String processTodo(String[] userInput) {
String description = "";
Expand All @@ -62,7 +69,10 @@ public String processTodo(String[] userInput) {
}
return description;
}

/*
* The processEvent method within the Parser class processes the user input into the required format for the Event Class
* @params userInput is a String[] that stores the user input
* */
public String[] processEvent(String[] userInput) {
String[] information = new String[2];
information[0] = "";
Expand Down Expand Up @@ -97,7 +107,10 @@ public String[] processEvent(String[] userInput) {
}
return information;
}

/*
* The processDeadline method within the Parser class processes the user input into the required format for the Deadline Class
* @params userInput is a String[] that stores the user input
* */
public String[] processDeadline(String[] userInput) {
String[] information = new String[2];
information[0] = "";
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/storage/Storage.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/*
* The Storage class deals with saving tasks into files and loading tasks from files.
* */
package storage;

import java.util.Scanner;
Expand Down
13 changes: 11 additions & 2 deletions src/main/java/tasklist/TaskList.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/*
* The TaskListStores the task list and has operations to add/delete tasks
*/
package tasklist;

import commands.Task;
Expand All @@ -15,11 +18,17 @@ public TaskList() {

private int taskCount = 0;
public static final String border = " ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――";

/*
* The add task method within the TaskList class adds tasks from the list
* @params task contains information of the task to be added to the list
* */
public void addTask(Task task) {
tasks.add(task);
}

/*
The deleteTask method within the TaskList class deletes tasks from the list
* @params taskNum specifies the task to be deleted
* */
public void deleteTask(int taskNum) {
if (taskNum < taskCount && taskNum >= 0) {
System.out.println(border);
Expand Down

0 comments on commit 2e2b12d

Please sign in to comment.