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

[Zhitong] ip #110

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

Conversation

Zhang-Zhitong
Copy link

No description provided.

Copy link

@RCPilot1604 RCPilot1604 left a comment

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();

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?

@@ -0,0 +1,6 @@

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

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.

@Override
public String toString() {
return "[" + (isDone? "X" : " ") + "]"
+ line;

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();

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;

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?

Copy link

@okkhoy okkhoy left a comment

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