Open
Conversation
thomasjlalba
left a comment
There was a problem hiding this comment.
I see good effort in keeping up your code standards and quality, good job! Just a few minor suggestions here and there on that aspect.
src/main/java/TheGroad.java
Outdated
Comment on lines
+67
to
+76
| } else { | ||
| String[] eventPartsFrom = inputParts[1].split("/from"); | ||
| String[] eventPartsTo = eventPartsFrom[1].split("/to"); | ||
| taskList[taskCount] = new Event(eventPartsFrom[0].trim(), eventPartsTo[0].trim(), eventPartsTo[1].trim()); | ||
| System.out.println(INDENT + LINE + "\n" + INDENT + "Got it. I've added this task: "); | ||
| taskCount += 1; | ||
| System.out.println(INDENT + taskList[taskCount - 1]); | ||
| System.out.println(INDENT + "You now have " + taskCount + " tasks in the list." | ||
| + "\n" + INDENT + LINE); | ||
| } |
There was a problem hiding this comment.
src/main/java/TheGroad.java
Outdated
Comment on lines
+41
to
+45
| int taskNum = Integer.parseInt(inputParts[1]); | ||
| taskList[taskNum - 1].MarkAsDone(); | ||
| System.out.println(INDENT + LINE + "\n" + MARKED); | ||
| System.out.println(INDENT + taskList[taskNum - 1]); | ||
| System.out.println(INDENT + LINE); |
There was a problem hiding this comment.
Maybe the if/else if/else blocks can be abstracted to its own methods to avoid such a long main method
src/main/java/TheGroad.java
Outdated
| String input = scanner.nextLine(); | ||
| String[] inputParts = input.split(" ", 2); | ||
|
|
||
| if (input.equals("bye")) { |
There was a problem hiding this comment.
Maybe you can avoid magic literals
src/main/java/TheGroad.java
Outdated
| String MARKED = INDENT + "Nice! I've marked this task as done:"; | ||
| String UNMARKED = INDENT + "OK, I've marked this task as not done yet:"; | ||
|
|
||
| System.out.println(GREETING); |
There was a problem hiding this comment.
Good job on refactoring some of the magic strings!
Branch level 5
Branch level 9
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.