-
Notifications
You must be signed in to change notification settings - Fork 209
[자동차 경주] 박성은 미션 제출합니다. #191
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
SungeunP
wants to merge
16
commits into
woowacourse-precourse:main
Choose a base branch
from
SungeunP:main
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
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
커밋 단위의 구현할 기능 목록을 나열
- 프로그램의 전체적인 입출력 스켈레톤을 구현한다. 1. 경주에 참가하는 자동차 이름을 입력받는다. 2. 시도할 횟수를 입력받는다. 3. 실행 결과를 출력한다. 4. 실행 결과에 따른 최종 우승자를 출력한다.
- 각 단계별 실제 로직을 구현한다. 문자열을 입력받아 제한 사항을 적용하여 ',' 기준 문자열 parsing을 진행한다. - 제한 사항을 위반한 경우 exception을 발생시켜, process를 통한 program exit이 아닌 예외를 통한 gracefully-exit을 적용했다.
- 횟수를 입력받고, 변수에 저장한다. - 숫자가 아닌 경우를 대비하여 try catch exception 구조를 적용했다. - 입력된 횟수가 양수 정수에 해당하지 않는 경우, exception을 통해 프로그램을 종료한다.
- 횟수 만큼 iteration하며, 매 iteration마다 조건에 맞게 자동차를 전진시킨다. - 요구 사항에 맞추어, depth 2를 초과하지 않도록 설계하였다. - 이를 위해 round를 iterate하는 부분과, round에 해당하는 car들을 iterate하는 부분을 모듈화 하였다. - 객체지향 원칙에 따라 전체 로직의 각 stage를 class의 method로 분리하였고, 최대한 객체지향 원칙에 따르도록 리펙토링 했다.
- 실행 결과를 보고 단독 우승자 혹은 다수의 우승자를 출력한다. - 프로그램의 안정성을 위해 native method를 최대한 사용하려고 했다. 이를 위해 Math.max, Array,join 등의 method를 사용하였다.
- 요구사항에 제시된 코드 컨벤션(네이밍, 객체지향 원칙)을 적용하였습니다. - String 형에서 Number로 parsing하는 과정을 안정화 하였습니다. - App의 run method에 exception catch를 추가하여 main method에서 커버하도록 수정하였습니다. - 누락된 주석을 추가했습니다.
- 레이싱 게임 전반을 커버하는 테스트 코드를 작성했습니다. - Stage별 모든 상황에 대한 테스트 코드와 레이싱 경기 시행에 대한 테스트 코드를 작성했습니다.
- 테스트 코드에 통과하기 위해 UX탐구를 통한 Output 수정을 할 수 없었음으로 UX탐구 단계는 제거합니다.
- 중복 로직 삭제 - 잘못 구현돼있던 로직 수정
This reverts commit 7c68e9b.
- 각 기능별 테스트 코드를 작성하였다.
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.