Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[로또] 박수현 미션 제출합니다. #206

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

Suxxxxhyun
Copy link

제가 사용한 domain은 아래와 같습니다.

  • InputView (입력화면)
  • OutView (출력화면)
  • PurchaseAmount (구매금액과 로또갯수를 저장하기 위한 객체)
  • PurchaseLottos (로또갯수에 따른 로또 목록을 저장하기 위한 객체)
  • LottoOneSet (하나의 로또를 저장하기 위한 객체)
  • Lotto (당첨번호를 저장하기 위한 객체)
  • BonusNumber (보너스 번호를 저장하기 위한 객체)
  • WinningHistory(ENUM) (RANK에 따라, 당첨번호를 맞춘 갯수와 상금을 저장하기 위한 객체)
  • ProfitCalculator(당첨내역과 수익률을 저장하기 위한 객체)

suhyun added 30 commits November 6, 2023 08:51
… 이루어졌거나, 0보다 작거나, 천원단위가 아닌경우 이에 맞는 예외메시지를 출력합니다.
… 때문에 이를 활용하기 위해 LottoOneSet클래스를 생성합니다. LottoOneSet클래스를 통해 하나의 로또 리스트를 생성합니다. 이때, 하나의 로또 리스트를 생성할때, 1부터 45까지 이루어져있는 숫자 및 이 숫자들이 중복되지 않게 구현합니다. 이를 구현하기 위해, 제공된 List<Integer> numbers = Randoms.pickUniqueNumbersInRange(1, 45, 6);메소드를 활용합니다.
… 담당하는 WinningHistory의 ENUM클래스를 생성하였습니다. 또한, 모든 로또 리스트를 순회하여, 1등부터 5등까지 몇번나왔는지를 HashMap을 이용해 구현하였습니다.
…소드를 구현하였습니다. WinningHistory의 순서를 바꿔서, 굳이 내림차순정렬하지 않도록 구현하였습니다.
…ange()로 반환된 리스트가 불변객체임을 알게 되었고, 불변리스트를 정렬할 수 없기에 새로운 리스트를 토대로 정렬하도록 수정하였습니다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant