Open
Conversation
Collaborator
|
repeat은 java 11부터 지원하는데, 아마 저희가 8버전을 사용해서 그럴겁니다! 글자를 반복하고 싶으시면 for loops와 string builder를 사용하시는 방법이 있어요! |
splguyjr
reviewed
Mar 21, 2023
|
|
||
| import camp.nextstep.edu.missionutils.Randoms; | ||
|
|
||
| public class RandomNumberGenerator implements NumberGenerator { |
There was a problem hiding this comment.
NumberGenerator 인터페이스에서 make()를 선언하고
RandomNumberGenerator에서 이를 받아 정의하는 형태로 되어있는데
이러한 형태가 가지는 장점이 있을까요?
Author
There was a problem hiding this comment.
지금 시점에서는 큰 장점이 없는 것 같지만, 다른 숫자생성기가 만들어져야 하는 상황과 같이 앞으로 다른 기능이 추가되어야 할 상황이 온다면, NumberGenerator 인터페이스를 통해 다중 상속이라든지 여러 숫자생성기 클래스에서 기본이 되는 틀이 된다든지 하는 점에서 이 인터페이스를 잘 활용할 수 있을 것 같습니다!
Author
There was a problem hiding this comment.
그리고 더 찾아보니 대규모 프로젝트 개발 시 일관되고 정형화된 개발을 위한 표준화가 가능하다는 장점도 있다고 합니다.
There was a problem hiding this comment.
SOLID의 5가지 원칙중에서 OCP에 해당하는 것 같네요.
하나 배워갑니다!
splguyjr
reviewed
Mar 21, 2023
splguyjr
left a comment
There was a problem hiding this comment.
InputView와 OutputView로 입력과 출력을 담당하는 깔끔한 구조가 보기 좋았어요
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 타입
반영 브랜치
nahyun0121:nahyun0121 -> Dcom-KHU:nahyun0121
클래스
기능
테스트 결과
자바를 제대로 하는 게 처음이라 참고해서 구현했는데 이러한 오류로 동작하지 않았습니다😂 왜 안 되는지 같이 찾아주시면 감사하겠습니다.. 그리고 더 추가하거나 수정해야 할 부분이 있는지 알고 싶습니다! 또 이렇게 세부적으로 클래스들을 나누는 게 좋은 방법인가에 대해서도 알고 싶습니다.