Skip to content

Conversation

@haesa
Copy link
Contributor

@haesa haesa commented Oct 23, 2024

답안 작성

  1. if (shape instanceof Square)
Square square = (Square) shape;
return square.side * square.side;
  1. else if (shape instanceof Rectangle)
Rectangle rectangle = (Rectangle) shape;
return rectangle.height * rectangle.width;
  1. else if (shape instanceof Circle)
Circle circle = (Circle) shape;
return PI * circle.radius * circle.radius;

@haesa haesa self-assigned this Oct 23, 2024
Copy link
Member

@dpfls0922 dpfls0922 left a comment

Choose a reason for hiding this comment

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

정답입니다!

@haesa haesa changed the title [REFACTOR] chapter 6-2 [CHORE] chapter 6-2 Oct 23, 2024
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.

3 participants