Open
Conversation
boyekim
reviewed
May 7, 2024
| FOURTH(4, 50000, "4개 일치 (50000원)- "), | ||
| THIRD(5, 150000, "5개 일치 (1500000원)- "), | ||
| SECOND(5, 30000000, "5개 일치, 보너스 볼 일치(30000000원)- "), | ||
| FIRTH(6, 2000000000, "6개 일치 (2000000000원)- "); |
There was a problem hiding this comment.
enum 활용을 잘 하신 것 같습니다! 같은 의미인 것 끼리 모아서 메시지를 구성할때에도 편리할 것 같아요
메시지까지 묶을 생각은 못했었는데 배워갑니다
boyekim
reviewed
May 7, 2024
| if(priceNum % LOTTO_UNIT != 0){ | ||
| throw new IllegalArgumentException("[ERROR] 구입 금액은 1000원 단위로 입력되어야 합니다."); | ||
| } | ||
| } |
boyekim
reviewed
May 7, 2024
| return arr; | ||
| } | ||
| public double calculateRate(int arr[], int price){ | ||
| int total = arr[0] * 5000 + arr[1] * 50000 + arr[2] * 1500000 + arr[3] * 2000000000; |
boyekim
reviewed
May 7, 2024
| lottoNums = new ArrayList<>(); | ||
| for (int i = 0; i < CNT_LOTTO_NUMBER; i++) { | ||
| int uniqueNumber = numbers.get(i); | ||
| while (lottoNums.contains(uniqueNumber)) { |
There was a problem hiding this comment.
궁금한점이 있습니다. numbers에는 이미 유니크한 숫자들이 shuffle되어있는 것 아닌가요? 이미 중복되지 않는 것은 보장된 것 같은데 한번 더 중복을 체크하시는 이유가 궁금합니다.
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.
"모든 원시 값과 문자열을 포장한다" 이 부분을 정확히 이해하지 못해서, 그 부분은 감안해서 리뷰해주시면 될 것 같습니다!
test 코드 때문에 메서드를 public으로 설정한 경우가 많은데 ,,, 다른 방법이 있다면 리뷰 남겨주세요!