-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Andrea Tan] iP #263
base: master
Are you sure you want to change the base?
[Andrea Tan] iP #263
Conversation
…a. Also separated Task.java into another file.
…nvalidCommandException.java)
src/com/jetbrains/Duke.java
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think maybe switch statements could be used to make the code look more concise?
src/com/jetbrains/Duke.java
Outdated
@@ -2,7 +2,6 @@ | |||
|
|||
import java.util.Scanner; | |||
import java.util.ArrayList; | |||
import java.lang.Throwable; | |||
|
|||
public class Duke { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe some java docs will be useful to make the user understand the code better!
src/com/jetbrains/Duke.java
Outdated
list.add(task); | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good that you kept the line of print statement short:>
src/com/jetbrains/Deadline.java
Outdated
public class Deadline extends Task { | ||
String dueDate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
No description provided.