Repository navigation
Step3 - #129
Merged
Merged
Step3#129
Conversation
javajigi
approved these changes
Nov 13, 2018
| this.points = points; | ||
| } | ||
|
|
||
| public AbstractFigures select(int size) { |
Contributor
There was a problem hiding this comment.
이와 같이 구현할 경우 매번 Map을 초기화하는 문제가 있다.
Map이 프로그램이 시작할 때 한번 초기화하고 재사용 가능한 구조로 구현해 본다.
힌트는 다음과 같은 인터페이스를 활용해야 한다.
인터페이스 학습 후 반영해 본다.
interface FigureCreator {
Figure create(List<Point> points);
}
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.
사실 완성한 것은 저번주에 완성했었지만, 방학이었기에 지금 올립니다.
처음 점이 2개 일때와 4개일 때를 어떻게 비교하면 좋을까 고민하다 Map에 있는 Hashmap을 사용하게 되다 상속을 사용하게 되었습니다. 그렇게 완성을 하고 간편히 삼각형도 만들게 되었습니다. 그러면서 중복된다고 생각한 코드는 없앤다고 없앴지만, 확인 부탁드립니다.
상속을 이런식으로 사용하는 것이 맞는지가 너무 궁금합니다.