Open
Conversation
Comment on lines
+36
to
+44
| private void calculateMaxValue(CarStorage carStorage, int i) { | ||
| if (isOverMaxLocation(carStorage, i)) { | ||
| max= carStorage.getNotAdvanceCar(i).length(); | ||
| } | ||
| } | ||
|
|
||
| private boolean isOverMaxLocation(CarStorage carStorage, int i) { | ||
| return carStorage.getNotAdvanceCar(i).length() > max; | ||
| } |
There was a problem hiding this comment.
현재 구현체에서 carStorage.getNotAdvanceCar(i)의 length() 값을 가져오는 방식보다 carStorage 안에엇 특정한 자동차의 length를 제공하는 메서드를 만드는 방식이 더 좋아보입니다.
Comment on lines
+47
to
+52
| for (int i = 0; i < answer.length(); i++) { | ||
| System.out.print(answer.charAt(i)); | ||
| if (isNotFinalSequence(i)) { | ||
| System.out.print(","); | ||
| } | ||
| } |
There was a problem hiding this comment.
한 메서드에 오직 한 단계의 들여쓰기만 한다라는 객체 지향 생활 원칙을 지켜보는건 어떨까요?
| } | ||
|
|
||
| public static int generateRandomNumber() { | ||
| return (int) (Math.random() * 10); |
There was a problem hiding this comment.
요구사항에는 전진하는 조건은 0에서 9 사이에서 random 값을 구한 후 random 값이 4이상일 경우이다.이라 적혀있지만, 해당 난수 생성은 0 ~ 10 사이의 정수를 반환하고 있어 요구 사항과 달라보입니다. 🥺
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.