[Noor Sarrah]ip - #104
Conversation
# Conflicts: # src/main/java/Duke.java # src/main/java/Event.java
# Conflicts: # src/main/java/Duke.java # src/main/java/Event.java
rafaelperes
left a comment
There was a problem hiding this comment.
Good job Sarrah. Maybe you should also take a look at ways to improve your code abstraction (check the SLAP hard concept for example).
| } | ||
| @Override | ||
| public String stringToSave() { | ||
| return "D ==> " + getStatusIcon() + " ==> " + getDescription() + " ==> " + getBy(); |
There was a problem hiding this comment.
maybe you should use constants in order to reduce the need of magic strings ("==>" and etc...)
| Scanner myObj = new Scanner(System.in); | ||
| String command = myObj.nextLine(); | ||
|
|
||
| while (!command.equals("bye")) { |
| Scanner s = new Scanner(f); | ||
| while (s.hasNext()) { | ||
| String[] task = s.nextLine().split(" ==> "); | ||
| if (task[0].equals("T")) { |
There was a problem hiding this comment.
to improve the readability, maybe assign task[0] to some variable? e.g String command = task[0]; Same goes for task[2], tasks[3]...Quite difficulty to understand the meaning.
| } | ||
| public static void addTasks(String description) { | ||
| printDash(); | ||
| if (description.contains("todo")) { |
There was a problem hiding this comment.
refer to the magic strings comment
| printDash(); | ||
| if (description.contains("todo")) { | ||
| try { | ||
| description = description.substring(5); |
There was a problem hiding this comment.
maybe there is a magic number here.
| @@ -0,0 +1,57 @@ | |||
| /*public class List { | |||
There was a problem hiding this comment.
maybe you should remove all the code commented before submit your pull request.
# Conflicts: # src/main/java/Task.java
No description provided.