Skip to content

coordinate Step5 complete - #124

Merged
javajigi merged 3 commits into
code-squad:forevereverfrom
foreverever:step5
Oct 25, 2018
Merged

javajigi merged 3 commits into
code-squad:forevereverfrom
foreverever:step5

Conversation

@foreverever

Copy link
Copy Markdown

coordinate Step5 complete.
please give me a feedback.
thank you.

@javajigi
javajigi changed the base branch from master to foreverever October 25, 2018 07:56

@javajigi javajigi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

상속 적용 잘 했네요.
상속 연습을 위한 추가 피드백 남겨 봅니다.

Comment thread src/main/java/domain/Rectangle.java Outdated

private void check(List<Point> points) {
checkSize(points);
checkSize();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

이 부분에 대한 예외 처리를 부모인 Figure가 담당하도록 구현해 본다.
즉, 중복을 제거해 본다.

Comment thread src/main/java/domain/PointsFactory.java Outdated
return points;
}

private static void checkDuplicationPoint(List<Point> points) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

중복에 대한 예외 처리를 Figure가 담당하도록 구현하는 것은 어떨까?

@javajigi javajigi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

피드백이 제대로 반영되지 않아 다시 피드백 남겨요.

Comment thread src/main/java/domain/Figure.java Outdated
}

private void checkSize(List<Point> points) {
if (points.size() <= MIN_RANGE || points.size() >= MAX_RANGE) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

이와 같이 구현하면 Line의 points가 2인지, 삼각형이 3인지를 체크할 수 있나요?
기존의 로직 구현과는 다른 것 아닌가요?

기존 코드에서 checkSize()에서 다른 부분만 추상 메소드로 구현하고 중복을 제거해 본다.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

checkSize()에서 다른 부분만 추상 메소드로 구현하라는 말씀이 이해가 잘 안갑니다.
checkSize()에서 다른 부분은 자식클래스에서 추상 메소드가 아닌 부모 메소드에서 구현해야하는게 아닌가요?

일단, 기존 로직에서 checkSize()의 중복 부분을 제거하는 것에 초점을 맞춰 구현하였습니다. 부모 클래스의 checkSize()를 추상메소드가 아닌 실제 메소드로 구현하였고, 각 자식클래스한테 size를 받아 판단하도록 하였습니다.

@javajigi
javajigi merged commit e869fe7 into code-squad:foreverever Oct 25, 2018
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