Open
Conversation
Jeong-Rae
reviewed
Mar 28, 2024
| System.out.print("\n실행 결과"); | ||
| racingGame.race(); | ||
|
|
||
| ResultView.printWinners(racingGame.getWinners()); |
|
|
||
| } | ||
|
|
||
| private Map<String, Integer> setMoveCnt(List<String> carList) { |
There was a problem hiding this comment.
cnt대신 count 로 길게 작성하셔도 됩니다.
ide의 자동기능을 믿어보시면 좋습니다 편해요
| public class RacingGame { | ||
| private final int tryCount; | ||
| List<String> carList; | ||
| public Map<String, Integer> moveCnt; |
There was a problem hiding this comment.
Map 과 같은 객체는 따로 dto나 랩핑 클래스를 만들어서 사용하시는게 더 편리합니다.
안에 어떤 key값이 들어있는지 파악하기가 어려운 단점이 있어서, 명확히 하는게 좋습니다
| public class InputValidate { | ||
|
|
||
|
|
||
| public static void isValidCarName(List<String> carList) { |
There was a problem hiding this comment.
is 접두사는 bool 객체를 반환하는 상황에서 작성되는것이 네이밍 컨벤션입니다
이를 염두하시면서 작성하면 좋을 것 같습니다
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.
구현만 완료,,,
테스트 코드 짜는 방법 모르겠어요,,,