Skip to content

Conversation

@JHyun0302
Copy link

No description provided.

Copy link

@Suxxxxhyun Suxxxxhyun left a 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: 프로그램 구현

// 객체 생성

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을 등록해주는 어노테이션이니까요!

Copy link
Author

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")) {

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) {

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);

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로 하는게 더 적합할 것 같습니다!

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