[이은솔] 우테코_레이싱_과제 제출 - #7
Open
EUNSOLY wants to merge 10 commits into
Open
Conversation
- 기능 요구사항을 기반으로 내가 생각해본 단위로 클래스 분할 - ChatGPT한테 내가 먼저 설계한걸 기반으로 질문형식으로 가면서 만들어짐 - 처음엔 Player, Car만 생각했었음
- 반복되는 문자열을 이어붙일수있는 repeat 구글링해서 찾아서 사용 - 이름은 한번 지정되면 변경되지않으니 final로 설계 - 롬복 All쓴 이유는 필드 중에 1개만 final이라서 - 외부에서 name을 사용해야하는 경우가 있기에 Setter 설정
- 입력받고 최초 한번만 선언디면되서 final로 Scanner 객체 생성 - 입력값 외부에서 가져다가 사용할 수 있도록 getter 롬복 적용
- 갖고있는 필드 모두 최초 한번만 생성해서 갖고있으면 굳이 변경될 필요성 없어서 final로 변수 지정 - 중첩댑스2까지만 허용인데 실패... 일단은 완성에 집중 - OptionalInt, stream, Lamda식은 구글링하면서 알게된 부분으로 문법적으로 정확히 알고있지않음
- 진입 클래스에서 순차적으로 흐름에 따라 호출해봄 좋은 방향인지는 아직 잘 모르겠음 - Print.java가 불필요 그냥 Main에서 바로 println사용
- Player에서 count값에 따라 예외처리가 아닌 Car클레스가 갖고있는 render에서의 예외처리로 전환 하면서Player의 중간 댑스를 1개 제거할 수 있었음
- camp.nextstep.edu.missionutils에서 제공하는 Randoms, Console 사용으로 변환 - 실행결과 예시와 동일하도록 System.out.println() 위치 등 변경 등 적용
- Application, Input, Player : JCF 활용 - Car : this 누락 표기
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.
No description provided.