-
Notifications
You must be signed in to change notification settings - Fork 512
24.12.11 최종 코테 대비 풀이 #171
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?
24.12.11 최종 코테 대비 풀이 #171
Conversation
- showResult(): 기존 매칭 이력이 없을 경우, 다시 과정, 레벨, 미션 입력으로 돌아가는 구조에서 기능 선택 입력으로 돌아가도록 수정함
|
|
||
| ### 페어 매칭 기능 | ||
|
|
||
| - [x] "#############################################\n |
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 static Pairs pairs = new Pairs(); | ||
|
|
||
| private static final String PAIR_MATCHING_FUNC = "1"; |
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.
1,2,3,Q 이러한 값들을 Enum 으로 관리하면 편하더라구요!
|
|
||
| public Optional<Pair> findByCourseLevelMission(final Course course, final Level level, final Mission mission) { | ||
| return pairs.stream() | ||
| .filter(pair -> pair.getCourse() == course && pair.getLevel() == level && pair.getMission() == mission) |
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.
계산이 많아서 가독성이 살짝 떨어지는거 같습니다! 메서드로 분리하면 좋을거 같아요
| import pairmatching.domain.Course; | ||
| import pairmatching.exception.PairmatchingException; | ||
|
|
||
| public class CrewNameRepository { |
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.
Repository 로 관리하니 역할이 분리되서 좋네요!
| import pairmatching.view.InputView; | ||
| import pairmatching.view.OutputView; | ||
|
|
||
| public class PairCheckService { |
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 계층으로 보이는데, View 관련 기능들이 깊은 계층에 들어오면 사용자 입출력 관계가 비지니스 로직과 가까워져 위험할 수 있을거 같습니다!(개인적인 생각) 영진님은 어떻게 생각하시나요 ?
| import java.util.Map; | ||
| import pairmatching.repository.CrewNameRepository; | ||
|
|
||
| public class CrewNameList { |
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.
클래스 네이밍에 List,Set 과같은 자료 타입이 들어가는걸 조심해야 합니다(클린코드)
예상 시나리오
예외 처리
구현 기능 목록
기능 선택 보기를 입력 받는 기능
크루원 목록 생성 기능
페어 매칭 기능
과정: [과정 목록]\n
미션:\n
- 레벨1: [미션 목록]\n
- 레벨2: [미션 목록]\n
- 레벨3: [미션 목록]\n
- 레벨4: [미션 목록]\n
- 레벨5: [미션 목록]\n
############################################\n
과정, 레벨, 미션을 선택하세요.\n
ex) 백엔드, 레벨1, 자동차경주"를 출력한다.
페어 조회 기능
과정: [과정 목록]\n
미션:\n
- 레벨1: [미션 목록]\n
- 레벨2: [미션 목록]\n
- 레벨3: [미션 목록]\n
- 레벨4: [미션 목록]\n
- 레벨5: [미션 목록]\n
############################################\n
과정, 레벨, 미션을 선택하세요.\n
ex) 백엔드, 레벨1, 자동차경주"를 출력한다.
페어 초기화 기능
종료 기능