Repository navigation
coordinate Step5 complete - #124
Merged
Merged
Conversation
javajigi
suggested changes
Oct 25, 2018
|
|
||
| private void check(List<Point> points) { | ||
| checkSize(points); | ||
| checkSize(); |
Contributor
There was a problem hiding this comment.
이 부분에 대한 예외 처리를 부모인 Figure가 담당하도록 구현해 본다.
즉, 중복을 제거해 본다.
| return points; | ||
| } | ||
|
|
||
| private static void checkDuplicationPoint(List<Point> points) { |
Contributor
There was a problem hiding this comment.
중복에 대한 예외 처리를 Figure가 담당하도록 구현하는 것은 어떨까?
javajigi
suggested changes
Oct 25, 2018
javajigi
left a comment
Contributor
There was a problem hiding this comment.
피드백이 제대로 반영되지 않아 다시 피드백 남겨요.
| } | ||
|
|
||
| private void checkSize(List<Point> points) { | ||
| if (points.size() <= MIN_RANGE || points.size() >= MAX_RANGE) { |
Contributor
There was a problem hiding this comment.
이와 같이 구현하면 Line의 points가 2인지, 삼각형이 3인지를 체크할 수 있나요?
기존의 로직 구현과는 다른 것 아닌가요?
기존 코드에서 checkSize()에서 다른 부분만 추상 메소드로 구현하고 중복을 제거해 본다.
Author
There was a problem hiding this comment.
checkSize()에서 다른 부분만 추상 메소드로 구현하라는 말씀이 이해가 잘 안갑니다.
checkSize()에서 다른 부분은 자식클래스에서 추상 메소드가 아닌 부모 메소드에서 구현해야하는게 아닌가요?
일단, 기존 로직에서 checkSize()의 중복 부분을 제거하는 것에 초점을 맞춰 구현하였습니다. 부모 클래스의 checkSize()를 추상메소드가 아닌 실제 메소드로 구현하였고, 각 자식클래스한테 size를 받아 판단하도록 하였습니다.
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.
coordinate Step5 complete.
please give me a feedback.
thank you.