-
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
[Barbaracwx] iP #67
base: master
Are you sure you want to change the base?
[Barbaracwx] iP #67
Conversation
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 work! Keep it up!
src/main/java/Task.java
Outdated
return description; | ||
} | ||
|
||
public String getStatusIcon() { |
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 camelCase for method
src/main/java/Task.java
Outdated
return (isDone ? "X" : " "); | ||
} | ||
|
||
@Override |
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 @OverRide to show overriding of parent's method
src/main/java/Duke.java
Outdated
System.out.println("Nice! I've marked this task as done:\n" + tasks[taskIndex].toString()); | ||
} | ||
} else { | ||
String[] parts = line.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.
Good use of plurality for naming "parts"
src/main/java/Duke.java
Outdated
String command = parts[0]; | ||
String taskDescription = parts.length > 1 ? parts[1] : ""; | ||
|
||
switch (command) { |
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.
Right use of indentation for switch case
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.
Code mostly follows required standard and quality.
src/main/java/DeadlineTask.java
Outdated
package PACKAGE_NAME;public class DeadlineTask { | ||
} |
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.
You might want to add some spaces between the package and the class.
package PACKAGE_NAME;public class DeadlineTask { | |
} | |
package PACKAGE_NAME; | |
public class DeadlineTask { | |
} |
src/main/java/Duke.java
Outdated
case "event": | ||
tasks[taskCount] = new EventTask(taskDescription); | ||
break; | ||
default: |
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 like how you handle invalid inputs for the switch case.
src/main/java/Duke.java
Outdated
String command = parts[0]; | ||
String taskDescription = parts.length > 1 ? parts[1] : ""; | ||
|
||
switch (command) { |
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 you could consider creating a separate method for the switch case
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 good job so far. You followed the coding standards well, good practice of OOP concepts as well. Keep up the good work!
src/main/java/Duke.java
Outdated
Task[] tasks = new Task[100]; | ||
int taskCount = 0; | ||
|
||
String line = input.nextLine(); |
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.
Consider changing your variable name to something more appropriate such as userInput.
Implement find
Added JavaDoc comments
No description provided.