# 클린 코더스 강의 14.3. ISP(Interface Segregation Principle)

클라이언트가 자신이 이용하지 않는 메서드에 의존하지 않아야 한다는 원칙이다

![](/files/-LpLqAOv3XsBs81BQYNa)

Switch 는 Light 에 대한 의존성을 갖고 있다.&#x20;

Switch 는 Light 뿐만 아니라 Fan, Motor 등도 Turn On 할 수 있다.<br>

### Light 의존성 제거

![](/files/-LpLr7tQBa1NwPYFpRyu)

DIP 원칙에 따라 Switch 는 이제 Light 에 대한 의존성을 갖지 않는다.&#x20;

Switchable 의 이름은 Switch(Client) 에 이름을 따라야 한다.

## 나의 생각

ISP 는 상당히 구체적인 Case 를 설명하기 때문에 이해하기 쉽다. \
주의할 점은 사용하는 Naming 을 정할 때 사용하는 Client 에 이름을 따라야 한다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kimtaesu.gitbook.io/workspace/undefined/14.2.-lsp-liskov-substitution-principle-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
