-
Notifications
You must be signed in to change notification settings - Fork 461
페어매칭 미션 연습하기 #154
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
Open
Combi153
wants to merge
20
commits into
woowacourse:main
Choose a base branch
from
Combi153:Combi153-exercise
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
페어매칭 미션 연습하기 #154
Conversation
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
InputView 객체는 readCommand 메소드를 이용해 기능 명령어를 입력받는다. 기능 명령어 입력 시 입력 형식이 타당한지 Validator 객체로 검증한다. Validator 객체는 기능 명령어가 문자 한 개로 입력되지 않았다면, 오류를 발생시킨다.
Controller 객체는 InputView 객체로부터 기능 명령어 입력 값을 받는다. Command 객체를 통해 입력 값이 명령어가 맞는지 검증한다. 명령어가 아닐 경우 오류를 발생시킨다.
Controller 객체의 executeCommand 메소드는 명령어를 입력받아, 명령어에 맞는 기능을 수행한다. Controller 객체는 입력 받은 명령어가 어떤 명령어인지 확인한 결과를 반환한다.
InputView 객체가 사용자에게 과정, 레벨, 미션을 입력 받는다. Validator 객체는 사용자의 입력이 ", "로 구분되었는지 검증하고, 그렇지 않다면 오류를 발생시킨다. 사용자의 입력은 ", "로 나누어 리스트 자료형으로 반환하도록 한다.
Controller 에서 입력을 받으면 Course, Level, Mission 객체가 각 입력값을 검증한다. 검증 시 각 입력값에 대한 존재 여부를 검증하며, Mission 객체는 레벨과 미션이 서로 부합하는지 여부도 검증한다.
MatchingHistory 객체는 매칭 이력을 관리하는 객체이다. hasMatchingOf 메소드를 통해 매칭 이력이 있는지 확인하여 반환한다.
MatchingProgram 객체는 과정에 따라 나뉘어진 크루원의 이름을 읽는다. 크루원의 이름을 셔플한 후, 2명(마지막 3명 허용)씩 매칭한다.
MatchingProgram 객체는 매칭에 관한 기능을 담당한다. PairMatchingMachine 객체를 통해 페어 매칭한 결과를 얻는다. MatchingHistory 객체를 통해 페어 매칭 결과를 검증한다. 매칭이 3번 실패할 시 오류를 발생시킨다.
MatchingProgram 객체는 매칭에 관한 기능을 담당한다. PairMatchingMachine 객체를 통해 페어 매칭한 결과를 얻는다. MatchingHistory 객체를 통해 페어 매칭 결과를 검증한다. 매칭이 3번 실패할 시 오류를 발생시킨다.
개발을 완료한 기능을 체크한다. 매칭 검증 기능에 대한 내용을 수정한다.
inputView에서 네, 아니오 중 하나인지 검증한다. 반환값은 boolean 값으로 하도록 한다.
매칭 조회 시 매칭 이력이 없을 경우 오류를 발생시킨다. 매칭 이력이 있는 경우 매칭 결과를 출력한다. 매칭 초기화 시 매칭 이력을 모두 없앤다.
조건문에서 부정 !을 추가한다.
InputController, MainController 로 분리한다.
enum 으로 상수화하여 사용한다.
개발 완료한 기능을 체크한다. 개발할 기능 목록을 수정한다.
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.
No description provided.