Conversation
Added Greet, Echo, and Exit
Switched all Arrays to ArrayList
# Conflicts: # src/main/java/duke/Duke.java
Ashley-Lau
left a comment
There was a problem hiding this comment.
Overall, good effort in the checks for the input. However, do make sure not to put too much code into one line!
| return userInput; | ||
| } | ||
|
|
||
| public static String GetItem(String userInput) throws IllegalToDoException, InvalidCommandException, EmptyCommand { |
There was a problem hiding this comment.
Follow camelCase naming convention for methods
|
|
||
| public class Event extends Task { | ||
|
|
||
| protected String at; |
There was a problem hiding this comment.
Private may be a better access modifier since no class extends Event.
|
|
||
| public class Event extends Task { | ||
|
|
||
| protected String at; |
There was a problem hiding this comment.
naming for at could be more descriptive of what it represents
| private static void AcknowledgeAddition(String command, ArrayList<Task> unfilteredTasks) { | ||
| if (isToDo(command) || isDeadline(command) || isEvent(command)) { | ||
| System.out.println(LINE + "Got it. I've added this task:\t"); | ||
| System.out.println(String.format("\t%d.", unfilteredTasks.size()) + unfilteredTasks.get(unfilteredTasks.size() - 1) + "\n" + String.format("\tNow you have %d tasks in the list.\n", unfilteredTasks.size()) + LINE); |
There was a problem hiding this comment.
Too many characters on this line! Occurred on other lines in this code
| unfilteredTasks = loadFile(FILE_PATH, unfilteredTasks); | ||
| } catch (FileNotFoundException e) { | ||
| File dukeCheckpoint = new File(FILE_PATH); | ||
| try { |
There was a problem hiding this comment.
Instead of nesting try-catch block, try to include then in the same level.
try {
...
} catch (FileNotFoundException e) {
...
} catch (FileNotFoundException e){
...
}
| + "What do you need to do?\n" | ||
| + LINE; | ||
|
|
||
| public static String getCommand(String userInput) { |
There was a problem hiding this comment.
Why are some methods private and some public? Seems to me that they are all only used in this class
Added optional for user: DateTime Format
Added Find function
Added JavaDoc
No description provided.