Skip to content

Comments

[1단계 - 블랙잭] 레넌(조형래) 미션 제출합니다.#264

Merged
workromancer merged 42 commits intowoowacourse:broraefrom
brorae:step1
Mar 17, 2022
Merged

[1단계 - 블랙잭] 레넌(조형래) 미션 제출합니다.#264
workromancer merged 42 commits intowoowacourse:broraefrom
brorae:step1

Conversation

@brorae
Copy link

@brorae brorae commented Mar 11, 2022

안녕하세요, 루피!
이번 미션 잘 부탁드립니다!

질문사항

  1. 일급컬렉션에 값을 추가하고, 추가가 제대로 되었는지 확인하는 테스트는 어떤 방식으로 하는게 좋을까요?? 값이 제대로 들어갔는지 확인하려면 test를 위한 getter를 만들게 되거나, size()로 테스트를 하게 되더라구요.

  2. 상수의 사용을 private static final로 사용해왔는데, 여러 클래스에서 같은 의미로 사용된다면 public static final로 사용해도 상관이 없을까요??

  3. 상속 클래스에서 접근제한자를 protected로 두고 사용하는 방식이 좋은 방법인지 궁금합니다!

감사합니다.

hanull and others added 30 commits March 8, 2022 15:53
Copy link

@workromancer workromancer left a comment

Choose a reason for hiding this comment

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

레넌 안녕하세요. 루피입니다.
전반적으로 잘 구현해주셨는데요.
몇 가지 코멘트 남겨두었으니 확인 부탁드려요.
남겨주신 질문들은 이번 미션 마지막까지 구현하시면서 고민해보시고 적절한 방법이 있으면 저도 한번 알려주세요 ㅎㅎ

Copy link

@kang-hyungu kang-hyungu left a comment

Choose a reason for hiding this comment

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

레넌 몇 가지 코멘트 남겼습니다.
수정해보시고 리뷰 재요청주세요.

soominsohn added a commit to soominsohn/java-blackjack that referenced this pull request Mar 16, 2022
* feat(study): add junit test case study

* feat(calculator): add TDD string calculator and test

* docs(README.md): add function implement list

* feat(game input): add get car name input

* feat(validate): add car name input validate

* feat(validate): add car coin input validate

* feat(car): add move car position function

* feat(car): add print car position result

* feat(result): add print game winners

* refactor(magicNumber): change magic number to constant

* refactor: divide functions to reduce indent

* style: adopt google convention

* refactor(Input): change field initialize stategy

* refactor(constant): move constants to each class

* refactor(pattern): change pattern to static final

* feat(winner): change findWinnerByPosition stream method

* feat(arrangement): rearrange public and private method

* refactor(car): change random number generate logic for test

* test(car): add unit test for Car class

* refactor(car): relocate car name validate logic

* test(car): add car name test

* test(input): add input test

* test(inputValidator): add inputValidator test

* style: delete unused packages

* refactor(game): change field initialize locate

Co-authored-by: soominsohn <soominsohn@gmail.com>
Copy link

@workromancer workromancer left a comment

Choose a reason for hiding this comment

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

안녕하세요 레넌~

피드백 반영해주신 내용 잘 확인하였습니다.
전반적으로 객체들 간의 역할이 적절히 잘 나뉘어진 것 같다고 느껴집니다.

간단한 코멘트 남겨두었으니 확인해주세요.
step1 고생 많으셨습니다~ step2 에서 뵈어요 !

@brorae
Copy link
Author

brorae commented Mar 21, 2022

  1. 일급컬렉션에 값을 추가하고, 추가가 제대로 되었는지 확인하는 테스트는 어떤 방식으로 하는게 좋을까요?? 값이 제대로 들어갔는지 확인하려면 test를 위한 getter를 만들게 되거나, size()로 테스트를 하게 되더라구요.
  1. 일급 컬렉션안에 들어가는 객체의 equals나 hashcode를 재정의하여 같은지 확인할 수 있는 방법
  2. isSameAs 메소드를 사용하는 방법
  3. 추가하는 코드에서 예외가 발생하지 않는지 확인하는 방법
  1. 상수의 사용을 private static final로 사용해왔는데, 여러 클래스에서 같은 의미로 사용된다면 public static final로 사용해도 상관이 없을까요??
  • 최대한 private을 사용하는 것이 좋은 것 같습니다. 해당 domain이 상수를 알아야하는지 고민해보고, public으로 선언된다면 설계가 잘못된 것이 아닌지 고민해볼 필요가 있는 것 같습니다.
  1. 상속 클래스에서 접근제한자를 protected로 두고 사용하는 방식이 좋은 방법인지 궁금합니다!
  • protected를 사용하는 것도 괜찮지만, 해당 protected 필드가 제한없이 계속 사용될 수 있기 때문에
    최대한 private으로 두고 사용하는 것이 좋은 것 같습니다. 정말 필요하다면 getter를 사용할 수 있을 것 같습니다.

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.

4 participants