Skip to content
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

[자바] 상속을 통한 구현과 인터페이스를 통한 구현에 대한 차이 #43

Open
SeokRae opened this issue May 8, 2022 · 0 comments
Labels

Comments

@SeokRae
Copy link
Collaborator

SeokRae commented May 8, 2022

  • 클래스 상속 구조 (root, super, sub class) 구조에 대해서 알고 있는지?

    • is A 관계란?
  • 상속의 장점

    • 프로그램 구조에 대한 이해도 (공통 속성)
    • 재사용성 향상
    • 확장성 확장
    • 유지보수성 향상
  • 상속의 단점

    • 캡슐화 원칙이 깨지는 문제 (객체의 무결성 문제)
    • protected 필드에 대한 유효하지 않은 값을 할당할 수 있는 문제 -> 필드를 private로 수정하고 operation을 통해 수정
    • 슈퍼 클래스와 서브클래스 간의 의존성이 증가되는 문제
@SeokRae SeokRae added the 자바 label May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant