Open
Conversation
PandaHun
requested changes
May 2, 2021
Member
PandaHun
left a comment
There was a problem hiding this comment.
gitigonre에 build, gradle 폴더도 추가해주세요
- 공통적으로 코드에 마지막 줄이 없는 경우가 있습니다
이 또한 컨벤션이니 맞춰주세요 - 요구사항인
for->stream변환이 빠진 부분이있습니다.
드린 피드백 반영하여 재리뷰 요청 부탁드립니다.
|
|
||
| ResultView.printResultTitle(); | ||
|
|
||
| for (int i = 0; i < gameNumber; i++) { |
|
|
||
| for (int i = 0; i < gameNumber; i++) { | ||
| ResultView.printResultPosition(cars.run()); | ||
| System.out.println(); |
|
|
||
| public static List<String> inputCarName(){ | ||
| System.out.println("경주할 자동차 이름을 입력하세요.(이름은 쉼표(,) 기준으로 구분)"); | ||
| return Arrays.asList(SCANNER.nextLine().split(",")); |
Member
There was a problem hiding this comment.
매직 넘버란 코드 안에 작성된 구체적인 숫자 혹은 문자열을 말합니다. 그리고 매직 넘버의 단점은 아래와 같습니다.
- 의미를 이해하기 어렵다.
- 복수의 장소에서 사용된다면 변경하기 힘들다.
그런 매직 넘버는 의미를 나타낼 수 있는 상수로 치환하여 코드의 가독성을 높여 보는 것은 어떨까요?
| } | ||
|
|
||
| public List<Car> run() { | ||
| for (Car car: cars) { |
| @@ -0,0 +1,22 @@ | |||
| package utils; | |||
|
|
|||
| public class CarNameValidator { | |||
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.