-
Notifications
You must be signed in to change notification settings - Fork 300
4단계 - 수강신청(요구사항 변경) #786
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
4단계 - 수강신청(요구사항 변경) #786
Conversation
- Enrollment 추가
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
연휴에 농사일 좀 하고 오느라 답변이 늦었네요.
과정이 끝났음에도 불구하고 포기하지 않고 미션 진행하는 점 👍
객체 설계를 위해 고민한 부분이 느껴지네요.
추가로 객체 설계와 관련해 고민해 봤으면 하는 부분 피드백 남겼고요.
enum도 하나의 객체로 봤으면 하는 부분이 있어 피드백 남겼어요.
src/main/java/nextstep/courses/domain/session/enrollment/Enrollment.java
Show resolved
Hide resolved
src/main/java/nextstep/courses/domain/session/enrollment/Enrollment.java
Outdated
Show resolved
Hide resolved
src/main/java/nextstep/courses/domain/session/enrollment/Enrollment.java
Outdated
Show resolved
Hide resolved
src/main/java/nextstep/courses/domain/session/enrollment/Enrollment.java
Outdated
Show resolved
Hide resolved
src/main/java/nextstep/courses/domain/session/enrollment/EnrollmentManager.java
Show resolved
Hide resolved
- approve - cancel
- SessionTest 생성자 단순화
- SessionTest 생성자 단순화
- SessionTest 생성자 단순화
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
피드백 반영하느라 넘 수고하셨어요. 💯
과정이 끝난지 거의 한 달이 되어 가네요.
끝까지 포기하지 않고 미션 진행한 점 넘 칭찬하고 싶네요.
추상 클래스 질문에 대한 답변도 남겼으니 한번 확인해 보세요.
이번 교육 과정이 앞으로 개발자로 살아가는데 작으나마 도움이 되었기를 바랍니다.
안녕하세요, 과정은 모두 끝났지만 PR이 가능하다고 하여 올려봅니다. 이번 단계에서는 유/무료 강의를 구분하는 설계에 대하여 많이 고민했습니다. 수강 신청을 관리하는 Enrollments 객체 단계에서 유/무료 강의를 구분하는 것이 옳다고 생각하여 Enrollments를 인터페이스로 구현했습니다.
그런데 Enrollment는 강의 객체인 Session의 필드라는 걸 생각하면 Session을 인터페이스로 구현하는 게 맞나? 라는 생각도 드네요.
그리고 Enrollments 인터페이스를 구현한 구현체는 모두 공통적인 필드를 갖는데 인터페이스는 필드를 가질 수 없습니다. 그렇다고 필드를 강제하기 위해 추상 클래스를 쓰는 것은 지양하고 싶었구요. 그래서 생각한 방법이 공통된 필드를 갖는 EnrollmentManager를 컴포지션 형태로 받아서 사용하는 방법입니다. 그런데, 지금 생각해보니 결국 EnrollmentManager도 반드시 포함하도록 제한하는 수단은 없으니 이 문제를 완벽히 해결한 것은 아니네요. 의견 있다면 부탁 드립니다.
마지막까지 리뷰 제공해주셔서 감사드립니다.