Skip to content

[Jia Juin] iP - #50

Open
jiajuinphoon wants to merge 16 commits into
nus-cs2113-AY1920S2:masterfrom
jiajuinphoon:master
Open

jiajuinphoon wants to merge 16 commits into
nus-cs2113-AY1920S2:masterfrom
jiajuinphoon:master

Conversation

@jiajuinphoon

Copy link
Copy Markdown

No description provided.

Comment thread src/main/java/Duke.java Outdated
ArrayList<Task> list = new ArrayList<>();
Scanner in = new Scanner (System.in);
command = in.nextLine();
String option_1 = "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.

Your string name could be more precise. To illustrate what I mean, perhaps you could use commandByeWord?
For instance,
String commandByeWord = "bye";

Comment thread src/main/java/Duke.java Outdated
command = in.nextLine();
// if there is no "done", "bye", "list" in the string
String splitter = in.nextLine();
// concat() method returns a String with the value of the String passed into the method,

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 explanation of methods for non-technical users! Also, the indentation for comments is observed.

Comment thread src/main/java/Duke.java Outdated
Comment on lines +7 to +9
{
return List.get(j);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The brackets for your methods should follow the Egyptian style (aka K&R). I see you have followed the bracket coding style in Tasks.java.
To illustrate this,
while (!done) {
doSomething();
done = moreToDo();
}

Comment thread src/main/java/Duke.java Outdated

if (command.equals(option_1))
{
System.out.println("------------------------");

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 can put the constant strings as constants. For example,
private static final String LINE_BREAK = "----------------------------------------";

Comment thread src/main/java/Duke.java Outdated
System.out.println("------------------------");
i++;
command = in.nextLine();
// if there is no "done", "bye", "list" in the string

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 attempt of explaining choice of use of next line of code.

Comment thread src/main/java/Task.java Outdated
protected String description;
protected boolean isDone;

public Task(String description) {

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 job! the names for the methods are well done.

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.

2 participants