-
Notifications
You must be signed in to change notification settings - Fork 78
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
[Xu JiaChen]iP #60
base: master
Are you sure you want to change the base?
[Xu JiaChen]iP #60
Conversation
src/main/java/Duke.java
Outdated
} | ||
} else if (input.startsWith("mark") || input.startsWith("unmark")) { | ||
// Split the input to separate command and task index | ||
String[] arrOfInput = input.split(" ", 2); |
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.
naming "arrOfInput" can be clearer to indicate that it stores the split of the input
src/main/java/Duke.java
Outdated
System.out.println(message); | ||
System.out.println(" " + tasks.get(index).getStatusIcon() + " " + tasks.get(index).description); | ||
} | ||
} catch (NumberFormatException e) { |
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.
try-catch statementfollows coding standard
src/main/java/Duke.java
Outdated
drawLine(); | ||
} | ||
|
||
// Main method |
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.
good use of encapsulation and methods of sufficient-length
src/main/java/Duke.java
Outdated
System.out.println("What can I do for you?"); | ||
drawLine(); | ||
} | ||
|
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.
sufficiently comprehensible comments
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.
Overall your code is well organised and it follows the coding standards. It is also very readable. The only suggestion I would have is look into using constants rather than magic types.
src/dude/Dude.java
Outdated
|
||
// Method to print the logo and introductory message | ||
public static void hiDude() { | ||
String logo = "### # \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.
Perhaps this logo could be implemented as a constant.
No description provided.