Skip to content

[3단계 - 사다리 타기] 최지수 미션 제출합니다 #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: jisoo78
Choose a base branch
from

Conversation

jisoo78
Copy link

@jisoo78 jisoo78 commented Jun 7, 2025

주노 안녕하세요
3단계 미션도 화이팅입니다

고민한 점

사다리를 통해 실행된 결과를 출발점과 끝점을 통해 나타내는 미션
Controller 클래스에서 모두 해결해도 괜찮나 생각이 들었지만 시작점을 지정해 주고, 움직이고, 결과를 출력하는 과정에서 모두 한 클래스에 넣으면 책임이 과다하다고 생각해 분리해서 진행해 봤어요
아직 명확한 기준은 없지만 출력하는 부분과 다른 기능들을 나눠야겠다고는 생각이 잡히네요

궁금한 점

테스트 코드에서 임의로 사다리를 만들어서 테스트를 진행했어요
다만 작은 크기의 사다리를 만들어서 진행해 큰 문제는 없었지만 나중에 100x100크기의 사다리에서 테스트를 진행하라는 요구사항이 생긴다면 어려움이 생길 거 같아요
임의의 크기를 만들어 진행하는 것은 한계점이 있다고 생각이 들어요

Copy link

@dd-jiyun dd-jiyun left a comment

Choose a reason for hiding this comment

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

지수님 ! 3단계 미션 고생하셨어요 🙌

책임을 나누려는 시도 정말 잘하신 것 같아요!
다만 현재 MVC 구조에서 Controller가 다소 많은 역할을 하고 있는 것 같아서, Model과 View로 조금 더 분리해볼 수 있을 것 같아요.

고민해보시고 리팩토링 해보시면 좋을 것 같습니다 👍🏻

간단한 코멘트 남겨뒀어요! 다음 미션도 화이팅 🔥

@@ -31,13 +32,14 @@ public void run() {
LadderBuilder ladderBuilder = new LadderBuilder(linkConnector);
Ladder ladder = ladderBuilder.build(width, height);


LadderOutputView ladderOutputView = new LadderOutputView();
Copy link

Choose a reason for hiding this comment

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

13번 줄에서 이미 LadderOutputView 인스턴스를 선언해주셨더라고요!
여기 동일한 객체를 한 번 더 생성하고 계신데 기존 객체를 재사용하시면 중복도 줄이고 코드도 더 명확해질 것 같아요.


import java.util.List;

public class LadderResult {
Copy link

Choose a reason for hiding this comment

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

OutputView에서 출력을 담당하고 있는 것으로 보이는데, Result 객체에서도 출력 관련 로직이 있는 이유가 있을까요?
혹시 출력 책임이 두 객체에 나뉘는 구조라면, 역할이 겹치는 부분이 있는지 한 번 정리해봐도 좋을 것 같아요!

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