Skip to content
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

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open

Conversation

Barbaracwx
Copy link

No description provided.

Copy link

@limyuhching limyuhching left a 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!

return description;
}

public String getStatusIcon() {

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

return (isDone ? "X" : " ");
}

@Override

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

System.out.println("Nice! I've marked this task as done:\n" + tasks[taskIndex].toString());
}
} else {
String[] parts = line.split(" ", 2);

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"

String command = parts[0];
String taskDescription = parts.length > 1 ? parts[1] : "";

switch (command) {

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

Copy link

@yicheng-toh yicheng-toh left a 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.

Comment on lines 1 to 2
package PACKAGE_NAME;public class DeadlineTask {
}

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.

Suggested change
package PACKAGE_NAME;public class DeadlineTask {
}
package PACKAGE_NAME;
public class DeadlineTask {
}

case "event":
tasks[taskCount] = new EventTask(taskDescription);
break;
default:

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.

String command = parts[0];
String taskDescription = parts.length > 1 ? parts[1] : "";

switch (command) {

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

Copy link

@YongbinWang YongbinWang left a 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!

Task[] tasks = new Task[100];
int taskCount = 0;

String line = input.nextLine();

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants