Open
Conversation
mvc 구조를 기반으로 controller, model, view 패키지 생성 구현할 기능 목록을 README.md에 정리
로또를 자동 발급과 수동 입력을 지원하고 번호를 오름차순 정렬해 일관된 출력 보장
등수별 상금 enum을 제공하고 당첨 결과를 관리하기 위한 LottoResult 추가
금액/번호 입력을 검증해 [ERROR] 메세지 출력 및 재입력, 구매 로또 목록과 당첨 통께 포멧 출력 구성
예외 발생시 반복 입력 처리를 진행하고 로또 운영 로직을 통해 당첨 결과와 수익률 계산등을 구현
개수, 범위, 중복 예외 케이스 확인 및 테스트 진행
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.
구현 내용 요약
UML 클래스 다이어그램
classDiagram class Application { +main(String[] args) } class LottoController { +run() -readPurchaseAmount() int -createLottos(int) List<Lotto> -readWinningNumbers() Lotto -readBonusNumber(Lotto) int -LottoLogic(List<Lotto>, Lotto, int, int) LottoResult -countMatches(Lotto, Lotto) int -calculateProfitRate(int, int) double } class InputView { +purchasePrice() int +winningNumbers() Lotto +bonusNumber() int } class OutputView { +printError(String) +Lottos(List<Lotto>) +printLottoResult(LottoResult) } class Lotto { -numbers : List<Integer> +RandomLotto() +addNumber(int) +getNumber(int) int +contains(int) boolean +getNumbers() List<Integer> } class Rank { +getReward() int +valueOf(int) Rank } class LottoResult { +first : int +second : int +third : int +fourth : int +fifth : int +returnValue : double } Application ..> LottoController : run() LottoController ..> InputView : 입력 LottoController ..> OutputView : 출력 LottoController ..> Lotto : 로또 발행 및 비교 LottoController ..> Rank : 상금 계산 LottoController ..> LottoResult : 결과 생성