Skip to content

coordinate Step4 complete - #121

Merged
javajigi merged 6 commits into
code-squad:forevereverfrom
foreverever:step4
Oct 23, 2018
Merged

javajigi merged 6 commits into
code-squad:forevereverfrom
foreverever:step4

Conversation

@foreverever

Copy link
Copy Markdown

step3,4 동시에 진행 하라고 하셔서, step4까지 완료 후 pr했습니다.

@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

public Rectangle(List<Point> points) {
this.points = points;
check();

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.

check()를 먼저 한 후에 값을 할당하는 것이 낫지 않을까?

Comment thread src/main/java/domain/Rectangle.java Outdated
int yCnt = 0;
int check = 0;
for (Point point : points) {
check += cntCoordinateValue(xCnt, yCnt, point);

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.

굳이 xCnt, yCnt 로컬 변수 생성하지 말고 cntCoordinateValue(0, 0, point); 구현하는 것은 어떤가?

private List<Point> points;

public double getLength(List<Point> points) {
public Line(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.

points.size()가 2인지 체크해야 하지 않을까?


private List<Point> points;

public Rectangle(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.

points.size()가 4인지 체크해야 하지 않을까?


private List<Point> points;

public Triangle(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.

points.size()가 3인지 체크해야 하지 않을까?

@javajigi
javajigi merged commit 12bf530 into code-squad:foreverever Oct 23, 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