Skip to content

[Barbaracwx] iP#67

Open
Barbaracwx wants to merge 45 commits into
nus-cs2113-AY2324S1:masterfrom
Barbaracwx:master
Open

[Barbaracwx] iP#67
Barbaracwx wants to merge 45 commits into
nus-cs2113-AY2324S1:masterfrom
Barbaracwx:master

Conversation

@Barbaracwx

Copy link
Copy Markdown

No description provided.

@limyuhching limyuhching left a comment

Copy link
Copy Markdown

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!

Comment thread src/main/java/Task.java Outdated
return description;
}

public String getStatusIcon() {

Copy link
Copy Markdown

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

Comment thread src/main/java/Task.java Outdated
return (isDone ? "X" : " ");
}

@Override

Copy link
Copy Markdown

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

Comment thread 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);

Copy link
Copy Markdown

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"

Comment thread src/main/java/Duke.java Outdated
String command = parts[0];
String taskDescription = parts.length > 1 ? parts[1] : "";

switch (command) {

Copy link
Copy Markdown

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

@yicheng-toh yicheng-toh left a comment

Copy link
Copy Markdown

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 thread src/main/java/DeadlineTask.java Outdated
Comment on lines +1 to +2
package PACKAGE_NAME;public class DeadlineTask {
}

Copy link
Copy Markdown

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 {
}

Comment thread src/main/java/Duke.java Outdated
case "event":
tasks[taskCount] = new EventTask(taskDescription);
break;
default:

Copy link
Copy Markdown

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.

Comment thread src/main/java/Duke.java Outdated
String command = parts[0];
String taskDescription = parts.length > 1 ? parts[1] : "";

switch (command) {

Copy link
Copy Markdown

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

@YongbinWang YongbinWang left a comment

Copy link
Copy Markdown

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!

Comment thread src/main/java/Duke.java Outdated
Task[] tasks = new Task[100];
int taskCount = 0;

String line = input.nextLine();

Copy link
Copy Markdown

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