Skip to content

Comments

3주차 미션 구현 완료 (박호건)#4

Open
moongua404 wants to merge 3 commits intoallrounder-backend:mainfrom
moongua404:moongua404
Open

3주차 미션 구현 완료 (박호건)#4
moongua404 wants to merge 3 commits intoallrounder-backend:mainfrom
moongua404:moongua404

Conversation

@moongua404
Copy link
Contributor

No description provided.

if (selected == 4) {
throw new ProgramTerminateException();
}
throw new IllegalArgumentException("[ERROR] 잘못된 입력입니다.");
Copy link

Choose a reason for hiding this comment

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

여기처럼 에러 메세지를 출력하는 부분에서 에러 메시지를 직접 하드코딩하는 것이 아닌 모든 메시지를 하나의 클래스에 상수로 정의한다면 어떨까 싶어요. 클래스에 정의해서 사용한다면 메시지 수정이 편해지고, 혹시 모를 실수를 방지할 수 있을 것 같아요

throw new IllegalStateException("잉크가 부족해 출력이 중단되었습니다.");
}
ink -= consume;
printInterface.print(line);
Copy link

Choose a reason for hiding this comment

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

Printer클래스에서 직접 출력하는 부분은 Controller 또는 View에서 담당하는 것이 책임이 명확하게 분리되어 유지보수가 편할 것 같습니다

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