Skip to content

[Zhitong] ip#110

Open
Zhang-Zhitong wants to merge 7 commits into
nus-cs2113-AY2425S1:masterfrom
Zhang-Zhitong:master
Open

[Zhitong] ip#110
Zhang-Zhitong wants to merge 7 commits into
nus-cs2113-AY2425S1:masterfrom
Zhang-Zhitong:master

Conversation

@Zhang-Zhitong

Copy link
Copy Markdown

No description provided.

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

Nice work! :)

public void accept(String nextLine) {

int index = (nextLine.indexOf(' '));
String commandKeyword = (index == -1)? nextLine : nextLine.substring(0, index).trim();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should there be a space before the "?" ternary operator?

Comment thread src/main/java/Texts.java
@@ -0,0 +1,6 @@

public class Texts {
public static final String GREETINGS = " hello";

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 use all caps for constants.

Comment thread src/main/java/Task.java
@Override
public String toString() {
return "[" + (isDone? "X" : " ") + "]"
+ line;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't this be on the same line (line limit 110 characters)?

int index = (nextLine.indexOf(' '));
String commandKeyword = (index == -1)? nextLine : nextLine.substring(0, index).trim();

final String commandText = (index == -1)? nextLine : nextLine.substring(index).trim();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't you extract this magic number?


public int length = 0;

private boolean isExited = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't the private attributes be grouped together?

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

not much code to review.
do not track binary files in git.

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.

3 participants