-
Notifications
You must be signed in to change notification settings - Fork 284
코드 리뷰 PR #116
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
base: main
Are you sure you want to change the base?
코드 리뷰 PR #116
Conversation
기존: 상행/하행을 나눠서 환승 불가능...? 현재: 예외 처리 조건을 다시 읽어보니 출발역/도착역이 이어져 있으면 된다! (어떻게든 도착하면 장땡)
Suxxxxhyun
left a comment
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.
개인적으로 코드가 너무 깔끔한것 같습니다..!! ㅎㅎ.. 전 쓸데없이 연결정보를 관리하는 클래스를 별도로 만들었는데 그 부분없이도 구현할 수 있는걸 배웠네요!! 총 거리와 총 시간 메소드도 파라미터를 제공한 라이브러리 이용해서 stream으로 깔끔하게 처리되는게 인상적입니다..!! 오늘도 재현님께 많이 배워갑니다 !! ✨✨✨
| final Scanner scanner = new Scanner(System.in); | ||
| // TODO: 프로그램 구현 | ||
|
|
||
| // 객체 생성 |
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와 service에 대한 객체 생성하는 관심사를 특정 클래스에서 하고싶다면 Configuration클래스를 만드는건 어떨까요? 스프링부트에서 @configuration이 Bean을 등록해주는 어노테이션이니까요!
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.
최종 코테에서 사용할 템플릿을 만들다보니 같은 형식으로 만들어졌군요 ㅜㅜ
다시 고민해봐야겠습니다!!
|
|
||
| while (true) { | ||
| String mainFunc = inputController.inputMainFunc(); | ||
| if (mainFunc.equals("Q")) { |
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.
Q나 1같은 값은 Function enum클래스로 접근해서 작성하셨을 수 있을 것 같아요!
| return Result.createResult(totalDistance, totalTime, shortestPath.getVertexList()); | ||
| } | ||
|
|
||
| private WeightedMultigraph<String, DefaultWeightedEdge> createGraph(RouteInfo[] routeInfos) { |
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 String mainFunctionValidate(String input) { | ||
| mainFunctionValidation.isBlank(input); |
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.
이미 isBlank메소드가 static으로 할당되어있기때문에 mainFunctionValidation.isBlank가 아닌, MainFunctionValidation.isBlank로 하는게 더 적합할 것 같습니다!
No description provided.