-
Notifications
You must be signed in to change notification settings - Fork 117
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
base: master
Are you sure you want to change the base?
[Zhitong] ip #110
Conversation
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this 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.
No description provided.