Skip to content

ces0135-hub/week1 제출#49

Open
ces0135-hub wants to merge 2 commits intomainfrom
ces0135-hub/week1
Open

ces0135-hub/week1 제출#49
ces0135-hub wants to merge 2 commits intomainfrom
ces0135-hub/week1

Conversation

@ces0135-hub
Copy link

  1. GO, STAY 상태 관리
  • enum 객체인 RaceState를 생성하여 관리
  1. GO인지 STAY인지 결정
  • int random_number = Randoms.pickNumberInRange(0,9);를 통해 랜덤 정수 생성
  • Service 구체화 Class에 getState()를 정의하여 GO인지 STAY인지 결정
  1. RaceCar 객체를 통해 자동차에 대한 정보 관리

  2. Application.java에서 Map을 활용하여 자동차 객체를 저장 후 count 수만큼 "-" 출력

@ces0135-hub ces0135-hub linked an issue Mar 30, 2025 that may be closed by this pull request
Copy link

@macqueen0987 macqueen0987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

자바를 기존에 하시던 분이라 그러신가 모르는 사람이 봐도 굉장히 정석적으로 구현하신것 같습니다.

처음에 볼때는 간단한 과제에 비해 너무 오버엔지니어링하신게 아닌가 싶었는데 오히려 정석적으로 코딩을 하려다 보니 길어진 것을 알고 나서 놀랐습니다.

제일 먼저 사용할 클래스들을 모두 추상적으로, 기본 뼈대만 구현한 후 모두 오버라이딩 하면서 구체화 하는것도 굉장히 인상깊었습니다.

Copy link

@glucosei glucosei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기능 구현하는 방식이 굉장히 세련되다는 느낌을 받았습니다. 다만, 개인적인 감상으로 Application의 main메서드에 너무 많은 기능이 몰려있다는 느낌을 받았습니다. 그래서 service가 특정한 기능을 구현한다기 보다 Application에 종속된 것 같다는 느낌이 들었습니다. 부족한 저의 식견이지만 Application의 책임을 좀 더 분산한다면 좋을 것 같습니다!

@dp44rk
Copy link

dp44rk commented Apr 1, 2025

map과 List 등 다양한 자료형을 활용하여 application을 구현하신부분 흥미롭게 봤습니다XD
또한 랜덤한 확률로 전진하는것을 raceState, getState등의 별도의 객체와 메서드를 통해 관리하시는것이 인상깊었습니다.
RaceService 클래스를 별도의 인터페이스로 구분하신 이유가 궁금합니다!

@hyungin0505
Copy link
Member

map이랑 enum 잘 사용하신 것 같습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[1주차] 레이싱카 과제

5 participants