-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
@yesjehmi
그러셨군요, Lotto가 WinningLotto를 받아서 matchCount를 찾고 이를 바로 Lotto 내부에서 Rank에게 물어봐서 결과를 던지게 되어 있네요. 이렇게 하는 건 어떨까요~?
WinningLotto가 Lotto를 상속받게 만들고 WinningLotto에게 lotto의 matchCount를 물어보는 방식이 더 좋을 것 같다는 생각이 듭니다.
자식의 변경사항에 의해서 부모가 변경되는 일이 없도록 처리의 위치를 옮기는 것이죠
그리고 bonusBall 도 winningLotto가 알고 있으니까 winningLotto에서 match 작업을 하는 것이 좋을 것 같은데 어떻게 생각하시나요~?
Metadata
Metadata
Assignees
Labels
No labels