Skip to content

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

Open
wants to merge 9 commits into
base: melodist
Choose a base branch
from

Conversation

melodist
Copy link

@melodist melodist commented May 1, 2025

안녕하세요, 과정은 모두 끝났지만 PR이 가능하다고 하여 올려봅니다. 이번 단계에서는 유/무료 강의를 구분하는 설계에 대하여 많이 고민했습니다. 수강 신청을 관리하는 Enrollments 객체 단계에서 유/무료 강의를 구분하는 것이 옳다고 생각하여 Enrollments를 인터페이스로 구현했습니다.
그런데 Enrollment는 강의 객체인 Session의 필드라는 걸 생각하면 Session을 인터페이스로 구현하는 게 맞나? 라는 생각도 드네요.
그리고 Enrollments 인터페이스를 구현한 구현체는 모두 공통적인 필드를 갖는데 인터페이스는 필드를 가질 수 없습니다. 그렇다고 필드를 강제하기 위해 추상 클래스를 쓰는 것은 지양하고 싶었구요. 그래서 생각한 방법이 공통된 필드를 갖는 EnrollmentManager를 컴포지션 형태로 받아서 사용하는 방법입니다. 그런데, 지금 생각해보니 결국 EnrollmentManager도 반드시 포함하도록 제한하는 수단은 없으니 이 문제를 완벽히 해결한 것은 아니네요. 의견 있다면 부탁 드립니다.
마지막까지 리뷰 제공해주셔서 감사드립니다.

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 participant