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

[로또 게임] 박지현 2차 과제 제출합니다. #15

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

Conversation

jlhyunii
Copy link

No description provided.

@meenyweeny
Copy link

w지현💙

Copy link
Collaborator

@genius00hwan genius00hwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전반적으로 MVC 구현을 잘해주었습니다. 다만 패키징도 나눠주는게 좀더 이해하기 편할것 같습니다.

@@ -0,0 +1,30 @@
package lotto;

public class Exception {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이왕 Exception 클래스 만든거 Java의 RuntimeException 같은거 상속한번 받아보지 아쉽네요

//당첨 통계 계산
void produceStatistics() {
int bonusNumber = insert.getBonusNumber();
StatisticsCalculator statisticsCalculator = new StatisticsCalculator();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

의존성이 있는 객체가 있다면 새로 생성할게 아니라 필드에 명시해두고 가져다 쓰는게 일반적입니다. 함수에서 생성하면 너무많이 생성될 수 도 있을것 같아요


//당첨 내역과 수익률
void printAll(int lottoPrice) {
Print print = new Print();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마찬가지로 의존성관리를 좀더 공부해보세요


import camp.nextstep.edu.missionutils.Console;
public class RunApplication {
void run() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굉장히 맘에드는 함수입니다. 가독성이 훌륭합니다. 다만 클래스명이 좀 아쉽네요. 함수명이 단순히 run()이라면 클래스명이라도 좀더 직관적이었으면 좋겠어요.

@@ -0,0 +1,31 @@
package lotto;

public enum WinningEnum {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enum을 잘활용했네요. 다만 enum 객체는 상수처럼 활용하려면 대문자로 사용하는 것이 일반적입니다. ex. THREE(),FOUR()..

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.

3 participants