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차 과제 제출합니다. #14

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

Conversation

Yewon2ee
Copy link

No description provided.

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 패턴적용을 잘해주었습니다. 패키징도 하여 더 이해하기 쉬웠습니다. 다만 예외처리로직이 많이 부족해보이네요. 요구사항을 다 지키지 못한것입니다. 요구사항이 지켜져 있지 않으면 아무리 코드를 예쁘게 짜도 무용지물입니다ㅠㅠ

public class Application {
public static void main(String[] args) {
UserView userView = new UserView();
LottoCalculator lottoCalculator = new LottoCalculator();
Copy link
Collaborator

Choose a reason for hiding this comment

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

의존성 주입이군요!! 이게 왜 의존성 주입인지 공부해봅시다!

package service;

public class Enum {
public enum MatchingResult{
Copy link
Collaborator

Choose a reason for hiding this comment

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

ENUM 맵이라는 자료구조를 한번 공부해보세요~~

int count = 0;
List<Integer> numbers = lotto.getNumber();
boolean matchingBonusNumber = false;
for (int j = 0; j < numbers.size(); j++) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

contains() 함수를 공부해보세요~~

return matchingResult;
}

public int calculateTotalPrizeMoney(int[] matchingResult) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

상금을 계산하는것도 등수를 판별하는 객체에 부여할 역할일까요? 고민해보세요~


public class LottoGenerator {
public List<Integer> generateLottoNumber(){
List<Integer>numbers = Randoms.pickUniqueNumbersInRange(1,45,6);
Copy link
Collaborator

Choose a reason for hiding this comment

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

저라면 randomNumber도 한번 검증 해줄듯~~ㅋㅋ


//사용자 입력 출력 관련된 거
public class UserView {

Copy link
Collaborator

Choose a reason for hiding this comment

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

잘못된 입력에 대한 검증이 안되어 있습니다.

//사용자로부터 구입할 로또 개수를 입력받는다
public int getLottoQuantity(){
String input = Console.readLine();
return Integer.parseInt(input)/1000; //인트로 변환, 1000원에 1장
Copy link
Collaborator

Choose a reason for hiding this comment

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

입력에 정수값이 안들어오면 어떡하죠?

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.

2 participants