[행성 로또] 심호경 미션 제출합니다.#149
Open
simhokyung wants to merge 36 commits intowoowacourse-precourse:mainfrom
Open
Conversation
- 로또 당첨 내역 기능 구현
- 0개가 일치하는 경우를 빠뜨려서 수정함.
- 1000단위로 검증하던거 500단위로 수정
- validateNull(numbers); - validateSize(numbers); - validateRange(numbers); - validateDuplicate(numbers);
- LOTTO_SIZE 도입 - MIN_NUMBER 도입 - MAX_NUMBER 도입
- 상수 도입으로 인한 매직넘버 제거 - 도메인 안에서 추가검증 구현 - 보너스 번호와 당첨 버호 중복 금지 검증 추가
- matchCount,IsBonus,prize 필드에 private 추가하여 보안 강화 - 안쓰는 메서드 제거
- WinCountCalculator의 기능을 간소화하고자 WinningNumbers 도메인에 countMatches, isBounusMatched 메서드 추가
- private 생성자를 도입하여 객체 생성 금지시킴 - 로또 당첨을 집계하는 순수한 함수이므로, 클래스의 인스턴스 상태에 의존하지 않기 때문에 static으로 선언하여 코드의 간결성과 효율성을 높임 - WinningNumbers에 추가된 countMatches 기능과 isBonusMatched 기능을 사용하여 메서드 변경 - WinCountCalculator -> ResultCalculator로 이름 변경
- WinningDetailsCalculator -> CountByRank로 이름 수정
- OutputView에 있는 printErrorMessage를 이용하기 위해 validator에서 [ERROR] 메시지 제거
-주제에 맞게 LottoController로 이름 변경
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.
💻 우테코 8기 최종 - 행성 로또
Console을 이용하여 우테코 로또 발매기인 행성 로또를 구현한다.
구입 금액에 맞춰 로또를 발행하고, 당첨 내역을 출력한다.
📥 입출력 명세
▫ 입력
▫ 출력
▫ 실행 예시
📄기능 구현 목록
1) 입력 흐름
2) 주요 기능
3) 예외 및 주의사항 체크
4) 도전 목표
5) 프로그래밍 요구사항 체크
6) 테스트 기능 목록 체크