Open
Conversation
BaeJinho4028
left a comment
There was a problem hiding this comment.
요구사항대로 오버엔지니어링 없이 잘 작성해주셨습니다. 커밋도 깔끔하네요 👍
이번주차 과제 고생하셨어요!
| int attempts = getAttempts(); | ||
| Racing racing = new Racing(cars, attempts); | ||
| racing.start(); | ||
| printWinners(racing.getWinners()); // try-catch 제거 |
Author
There was a problem hiding this comment.
처음엔 try-catch로 예외 처리를 했었는데, 테스트 코드 실행 후 오류가 발생하여 보았더니... 예외를 직접 던져야 한다는걸 알게되어서...😭 try-catch는 지우고 주석으로 잠시 기록해둔 후, 커밋할 때 잊어버려 지우지 못한 것 같습니다...
| String[] names = Console.readLine().split(","); | ||
| return Arrays.stream(names) | ||
| .map(Car::new) | ||
| .collect(Collectors.toList()); |
There was a problem hiding this comment.
'collect(Collectors.toList())'와 그냥 'toList()'는 무슨 차이가 있을까요?
Author
There was a problem hiding this comment.
toList()는 수정 불가능한 리스트를 반환하고, collect(Collectors.toList())는 수정 가능한 리스트를 반환합니다!
| import java.util.List; | ||
| import java.util.stream.Collectors; | ||
|
|
||
| public class Racing { |
| @@ -0,0 +1,29 @@ | |||
| ## ✅ 핵심 기능 목록 (체크리스트) | |||
There was a problem hiding this comment.
체크리스트 좋네요. 완성되었으니 체크 표시 하면 좋을 것 같습니다.
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.