-
Notifications
You must be signed in to change notification settings - Fork 7
Pr1 done #10
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
base: master
Are you sure you want to change the base?
Pr1 done #10
Conversation
xSAVIKx
left a comment
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.
Please update your code to pass all the tests.
| int result = 0; | ||
| for (int i = 0; i < a.length(); i++) { | ||
| if (a.charAt(i) != a1.charAt(i)) { | ||
| return result++; |
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.
for sure, you shouldn't return result here, you should only increment it here.
|
|
||
| } | ||
|
|
||
| private static void makeChoice () { |
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.
This function should be renamed, as it don't really "make any choice", it just prints your "help" or "menu" messages.
| if (input.equals("help")) { | ||
| makeChoice(); | ||
| scanner.next(); | ||
| } |
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 personally don't like such solution, where you move some switch clauses into separate if-else statements, I'd really prefer some other implementation where all possible commands would be inside one switch.
No description provided.