-
Notifications
You must be signed in to change notification settings - Fork 10
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
[로또 게임] 김지웅 2차 과제 제출합니다. #18
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controller의 역할에 대해 좀더 생각해보고 mvc를 더 공부해보세요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mvc에서 비즈니스 로직을 수행하는 역할은 controller가 합니다.
|
||
import java.util.List; | ||
|
||
public class LottoResultChecker { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
객체라기보다는 함수를 실행시키는 역할만 하는 것으로 보이네요.
private final Console console = System.console(); | ||
private final Scanner scanner; | ||
|
||
public LottoInput() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 무슨 의도죠? console은 주어진 요구사항입니다. 굳이 예외처리 하지 않아도 됩니다.
if (console != null) { | ||
input = console.readLine(); | ||
} else { | ||
input = scanner.nextLine(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굳이 왜 scanner 사용을 고집하는걸까요? 가독성이 떨어집니다.
import java.util.List; | ||
|
||
public class Application { | ||
public static void main(String[] args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main 함수에 모든 흐름이 다적혀 있네요. controller는 단순히 실행시키는 역할을 하는 객체가 아닙니다.
No description provided.