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