Skip to content

Conversation

@doooyeon
Copy link
Member

@doooyeon doooyeon commented Jan 19, 2020

test는 step3에서 작성해보겠습니다. ㅠ

@doooyeon doooyeon self-assigned this Jan 19, 2020
@doooyeon doooyeon changed the base branch from doy to master January 19, 2020 07:31
@doooyeon doooyeon changed the base branch from master to doy January 19, 2020 07:31
private static final int WINNING_MIN_COUNT = 3;

private int countOfMatch;
private boolean isBonusMatch;
Copy link
Member

Choose a reason for hiding this comment

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

이런 전략을 하나로 추상화할 수 없을까요?
나중에 페널티 로또나, 다른 Rank 전략이 생기는 경우에 대해 확장성을 가지는 구조를 어떤 형태일까요?


@Override
public String toString() {
if (this.equals(SECOND)) return String.format("%d개 일치, 보너스 볼 일치 (%d원)", countOfMatch, prizeMoney);
Copy link
Member

Choose a reason for hiding this comment

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

한국어가 아니라 영어로 출력되는 경우에 대해 확장성있는 구조는 어떻게 가져가야할까요?

Choose a reason for hiding this comment

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

https://github.com/WeareSoft/java-lotto/pull/7/files#r368273623
제가 단 댓글과 같은 맥락인것 같군요 😄

}

@Override
public String toString() {
Copy link

@Delf-Lee Delf-Lee Jan 19, 2020

Choose a reason for hiding this comment

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

극단적으로는 출력하는 책임도 분리할 수 있을것 같습니다. 소리나 이미지로 출력하는 것 처럼요. (@toString오버라이딩 전반)

(변경안 아님)


public class LottoSeller {
private static final int PRICE = 1000;
public static final int UNIT_PRICE = 1000;

Choose a reason for hiding this comment

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

로또의 가격은 변경의 여지가 있으니, 외부에서 주입받을 수 있을 것 같습니다.


@Override
public String toString() {
if (this.equals(SECOND)) return String.format("%d개 일치, 보너스 볼 일치 (%d원)", countOfMatch, prizeMoney);

Choose a reason for hiding this comment

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

https://github.com/WeareSoft/java-lotto/pull/7/files#r368273623
제가 단 댓글과 같은 맥락인것 같군요 😄

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