Open
Conversation
- showResult(): 기존 매칭 이력이 없을 경우, 다시 과정, 레벨, 미션 입력으로 돌아가는 구조에서 기능 선택 입력으로 돌아가도록 수정함
sinminseok
reviewed
Dec 11, 2024
|
|
||
| ### 페어 매칭 기능 | ||
|
|
||
| - [x] "#############################################\n |
There was a problem hiding this comment.
리드미도 어쨌든 개발자가 직접 관리해야 하는 자원이기 때문에 추후 변경이 있으면 직접 변경해야 합니다. 때문에 출력값또한 언제든지 변경될 수 있기에 너무 구체적으로 적기보단, "미션 출력 기능" 이런식으로 간단하게 적는게 좋다고 들었어요!
|
|
||
| private static Pairs pairs = new Pairs(); | ||
|
|
||
| private static final String PAIR_MATCHING_FUNC = "1"; |
There was a problem hiding this comment.
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.
계산이 많아서 가독성이 살짝 떨어지는거 같습니다! 메서드로 분리하면 좋을거 같아요
| import pairmatching.domain.Course; | ||
| import pairmatching.exception.PairmatchingException; | ||
|
|
||
| public class CrewNameRepository { |
| import pairmatching.view.InputView; | ||
| import pairmatching.view.OutputView; | ||
|
|
||
| public class PairCheckService { |
There was a problem hiding this comment.
Controller 하위 계층이 Service 계층으로 보이는데, View 관련 기능들이 깊은 계층에 들어오면 사용자 입출력 관계가 비지니스 로직과 가까워져 위험할 수 있을거 같습니다!(개인적인 생각) 영진님은 어떻게 생각하시나요 ?
| import java.util.Map; | ||
| import pairmatching.repository.CrewNameRepository; | ||
|
|
||
| public class CrewNameList { |
There was a problem hiding this comment.
클래스 네이밍에 List,Set 과같은 자료 타입이 들어가는걸 조심해야 합니다(클린코드)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
예상 시나리오
예외 처리
구현 기능 목록
기능 선택 보기를 입력 받는 기능
크루원 목록 생성 기능
페어 매칭 기능
과정: [과정 목록]\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, 자동차경주"를 출력한다.
페어 초기화 기능
종료 기능