Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

IS-A 관계와 HAS-A 관계의 차이점 #59

Open

Description

이펙티브 자바 3판의 [ITEM 18 - 상속보다는 컴포지션을 사용하라] 을 통해 무분별한 클래스 상속이 해악을 일으킨다는 사실을 알게 되었습니다.

그리고 이를 막기 위해서는 올바른 상속 / 컴포지션 관계를 구성해야 한다고 합니다.

상속은 두 클래스가 순수한 IS-A 관계일 때만 써야 한다고 하는데요.

IS-A 관계와 HAS-A 관계는 무엇인지, 그리고 둘은 무슨 차이를 갖는지 알아보아요.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /