Open
Conversation
rohsik2
reviewed
Mar 19, 2023
Collaborator
rohsik2
left a comment
There was a problem hiding this comment.
동작하는 코드를 작성하신것부터 이미 첫 걸음을 넘어신겁니다! 코드를 서로다른 메소드로 분리해보세요!
| while(!validInput) { | ||
| try { | ||
| System.out.println("시도할 회수는 몇회인가요?"); | ||
| attempt = scanner.nextInt(); |
Collaborator
There was a problem hiding this comment.
Scanner 대신 console.readLine() -> Integer.parseInt 라는 함수로 파싱을 해서 사용하실 수 있습니다!
nahyun0121
reviewed
Mar 21, 2023
nahyun0121
left a comment
There was a problem hiding this comment.
저처럼 자바에 익숙치 않으신 것 같은데 직접 다 구현해보려고 하신 것 같아서 대단해요! 저는 제 머릿속에 그린 구조와 가장 비슷하게 구현했던 분의 코드를 참고하여 구현했는데 이렇게 하면서 모르는 부분 공부하는 것도 단기간에 도움이 되었습니다:)
|
|
||
| String input = Console.readLine(); | ||
|
|
||
| String[] car_name = input.split(","); |
There was a problem hiding this comment.
시도 횟수를 입력 받을 때 예외 처리를 잘 해주셨는데, 여기서 자동차 이름들을 입력받을 때도 조건이었던 5글자인지 확인하고 예외 처리하는 부분도 추가하면 더 좋을 것 같습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.