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.
요구 사항 정리
기능 요구 사항
로또 발행 기능
당첨 번호 입력 기능
당첨 결과 산출 및 출력 기능
예외 처리
IllegalArgumentException을 발생시키고 "[ERROR]"로 시작하는 메시지를 출력한다.프로그래밍 요구 사항
Java 코드 스타일과 구조
Application클래스의main()메서드에서 프로그램을 시작한다.build.gradle파일은 수정할 수 없고, 지정된 외부 라이브러리 외의 라이브러리는 사용하지 않는다.System.exit()로 프로그램을 종료하지 않는다.테스트와 유효성 검사
JUnit 5와AssertJ를 활용하여 모든 기능 목록을 테스트한다.camp.nextstep.edu.missionutils패키지의Randoms.pickUniqueNumbersInRange()를 사용해 랜덤 값을 생성하고,Console.readLine()을 사용해 입력을 받는다.메서드 구현 원칙
기능 명세서
로또 구입 금액 입력 기능
[ERROR] 구입 금액은 1,000원 단위여야 합니다.[ERROR] 유효한 숫자를 입력해야합니다.로또 발행 기능
당첨 번호 입력 기능
[ERROR] 로또 번호는 1부터 45 사이의 숫자여야 합니다.[ERROR] 로또 번호는 6개여야 합니다.[ERROR] 중복된 숫자가 입력되었습니다.[ERROR] 로또 구입 금액을 입력하지 않았습니다.[ERROR] 구입 금액은 1,000원 이상이어야 합니다.[ERROR] 당첨 번호를 입력하지 않았습니다.[ERROR] 보너스 번호를 입력하지 않았습니다.[ERROR] 구분자는 연속으로 사용될 수 없습니다.[ERROR] 구분자는 입력의 시작이나 끝에 위치할 수 없습니다.당첨 결과 산출 기능
수익률 산출 기능