Repository navigation
[Jia Juin] iP - #50
jiajuinphoon wants to merge 16 commits into
Conversation
| ArrayList<Task> list = new ArrayList<>(); | ||
| Scanner in = new Scanner (System.in); | ||
| command = in.nextLine(); | ||
| String option_1 = "bye"; |
There was a problem hiding this comment.
Your string name could be more precise. To illustrate what I mean, perhaps you could use commandByeWord?
For instance,
String commandByeWord = "bye";
| command = in.nextLine(); | ||
| // if there is no "done", "bye", "list" in the string | ||
| String splitter = in.nextLine(); | ||
| // concat() method returns a String with the value of the String passed into the method, |
There was a problem hiding this comment.
Good explanation of methods for non-technical users! Also, the indentation for comments is observed.
| { | ||
| return List.get(j); | ||
| } |
There was a problem hiding this comment.
The brackets for your methods should follow the Egyptian style (aka K&R). I see you have followed the bracket coding style in Tasks.java.
To illustrate this,
while (!done) {
doSomething();
done = moreToDo();
}
|
|
||
| if (command.equals(option_1)) | ||
| { | ||
| System.out.println("------------------------"); |
There was a problem hiding this comment.
Perhaps you can put the constant strings as constants. For example,
private static final String LINE_BREAK = "----------------------------------------";
| System.out.println("------------------------"); | ||
| i++; | ||
| command = in.nextLine(); | ||
| // if there is no "done", "bye", "list" in the string |
There was a problem hiding this comment.
Good attempt of explaining choice of use of next line of code.
| protected String description; | ||
| protected boolean isDone; | ||
|
|
||
| public Task(String description) { |
There was a problem hiding this comment.
Good job! the names for the methods are well done.
* tag 'branch-Level-5': level-6 done
…es for different command for easier aceess.
A-UserGuide-done
No description provided.