3.3 – Information Hiding
Information Hiding

Information hiding allows you to provide me with just the information I need for my module to work. You do not need to give me access to everything in your module, and you do not have to know how my module works.
Information Hiding Through Encapsulation

Access Modifiers

There are four different levels of access in Java

Public Methods

Protected Behaviors

Package

Default Access Modifier

Private Access Modifier

Information Hiding is powerful idea. You control what information you want to share and what behaviors you want to let others see. You reveal assumptions through interfaces that others can rely on and hide changeable things like implementation details.
Information hiding allows you to build flexible, reusable, and maintainable systems.
'공부 > Object-Oriented Design' 카테고리의 다른 글
| 3.5 – Inheritance Issues (0) | 2021.09.26 |
|---|---|
| 3.4 – Conceptual Integrity (0) | 2021.09.22 |
| 3.2 – Separation of Concerns (0) | 2021.09.21 |
| 3.1 – Coupling and Cohesion (2) | 2021.09.21 |
| 2.6 – Generalization (0) | 2021.09.18 |
댓글