Skip to content

[Ong JunZheng] iP#114

Open
kaboomzxc wants to merge 38 commits into
nus-cs2113-AY2425S1:masterfrom
kaboomzxc:master
Open

[Ong JunZheng] iP#114
kaboomzxc wants to merge 38 commits into
nus-cs2113-AY2425S1:masterfrom
kaboomzxc:master

Conversation

@kaboomzxc

Copy link
Copy Markdown

No description provided.

@LuxLucky7 LuxLucky7 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.

LGTM overall! Do check the indendation nits

Comment thread src/main/java/Task.java Outdated
@@ -0,0 +1,34 @@
public class Task {

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 clean this class is written!

Comment thread src/main/java/Quinn.java Outdated
task.setNotDone();

String message = "\t" + "OK, I've marked this task as not done yet:"
+ System.lineSeparator() + "\t\t" + task;

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 that you've used the lineSeperator() method!

Comment thread src/main/java/Quinn.java Outdated
Task task;

switch (commandLineParts[0].toLowerCase()) {
case "bye":

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do check if the indendation for the case after the switch is correct

Comment thread src/main/java/Quinn.java Outdated
@@ -19,15 +19,29 @@ public void run() {
System.out.print("Enter command: \t");

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 the use of the empty lines within methods to differentiate between different tasks!

Comment thread src/main/java/Quinn.java Outdated
commandLine = sc.nextLine().trim();

switch (commandLine.toLowerCase()) {
String[] commandLineParts = commandLine.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.

can this number 2 be put as a constant?

Comment thread src/main/java/Task.java Outdated
} else {
return "[ ]";
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean coding standard !

Comment thread src/main/java/Quinn.java Outdated
break;
default:
addTask(commandLine);
break;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice change to make this more readable!

Comment thread src/main/java/Quinn.java Outdated
+ System.lineSeparator() + "\t\t" + task;
echo(message);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread src/main/java/quinn/task/Deadline.java Outdated
package quinn.task;

public class Deadline extends Task {
private final String byDateTimeInput;

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 using dueDateTime is more descriptive and concise here. Furthermore adding the word 'input' in the naming dosent't add significant value and can make the code more verbose.

Comment thread src/main/java/quinn/task/Event.java Outdated
Comment on lines +4 to +5
private final String fromDateTimeInput;
private final String toDateTimeInput;

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 using startDateTime and endDateTime is more descriptive and concise here. Furthermore adding the word 'input' in the naming dosent't add significant value and can make the code more verbose.

Comment thread src/main/java/quinn/Quinn.java Outdated
}
}

public void processCommand(String commandLine) throws QuinnException, IOException {

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 it is better to use a more specific name for this method such as checkAndSplitCommand as process might not be a very specific term. See https://nus-cs2113-ay2425s1.github.io/website/se-book-adapted/chapters/codeQuality.html#guideline-name-well

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