Open
Conversation
…a. Also separated Task.java into another file.
…nvalidCommandException.java)
jingxueguo
reviewed
Feb 5, 2021
src/com/jetbrains/Duke.java
Outdated
Comment on lines
+23
to
+32
| if (input.equals("list")) { | ||
| displayList(list); | ||
| System.out.println("\n"); | ||
| } else if (input.contains("done")) { | ||
| String[] command = input.split(" "); | ||
| task = list.get(Integer.parseInt(command[1]) - 1); | ||
| System.out.println("Good job! I've marked this task as done:\n " + | ||
| task.markDone() + | ||
| "\n"); | ||
| } else if (input.contains("delete")) { |
There was a problem hiding this comment.
do you think maybe switch statements could be used to make the code look more concise?
jingxueguo
reviewed
Feb 5, 2021
src/com/jetbrains/Duke.java
Outdated
| import java.util.ArrayList; | ||
| import java.lang.Throwable; | ||
|
|
||
| public class Duke { |
There was a problem hiding this comment.
Maybe some java docs will be useful to make the user understand the code better!
jingxueguo
reviewed
Feb 5, 2021
src/com/jetbrains/Duke.java
Outdated
| System.out.println("Alright! I've added this task: \n " + | ||
| task + "\nNow you have " + list.size() + | ||
| " task(s) in the list. \n"); | ||
| } else { |
There was a problem hiding this comment.
I think it is great that you implemented Duke Exceptions early!
|
Hello! I think you did a great job following the Java coding standard, and for implementing the Duke Exceptions early by level-6! |
jingxueguo
reviewed
Feb 5, 2021
src/com/jetbrains/Duke.java
Outdated
| } else if (input.contains("done")) { | ||
| String[] command = input.split(" "); | ||
| task = list.get(Integer.parseInt(command[1]) - 1); | ||
| System.out.println("Good job! I've marked this task as done:\n " + |
There was a problem hiding this comment.
I think it's good that you kept the line of print statement short:>
rjeez
reviewed
Feb 6, 2021
src/com/jetbrains/Deadline.java
Outdated
|
|
||
| import java.lang.Throwable; | ||
| public class Deadline extends Task { | ||
| String dueDate; |
There was a problem hiding this comment.
I think dueDate should be used instead of by as the former is more understandable!
… well as fileReader())
# Conflicts: # data/duke.txt # src/duke/Deadline.java # src/duke/Duke.java # src/duke/Event.java # src/duke/Task.java # src/duke/ToDo.java
# Conflicts: # src/duke/DukeIncompleteCommandException.java # src/duke/Event.java # src/duke/Parser.java # src/duke/Task.java # src/duke/TaskList.java # src/duke/ToDo.java
# Conflicts: # src/duke/.idea/workspace.xml # src/duke/TaskList.java # src/duke/Ui.java # src/duke/out/production/duke/duke/.idea/workspace.xml # src/duke/out/production/duke/duke/Parser.class # src/duke/out/production/duke/duke/TaskList.class # src/duke/out/production/duke/duke/Ui.class # src/duke/out/test/test/ParserTest.class
A-Assertions
# Conflicts: # src/main/java/Parser.java
# Conflicts: # docs/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.