Skip to content

Commit

Permalink
ejercicio lámpara
Browse files Browse the repository at this point in the history
  • Loading branch information
gitblanc committed Dec 12, 2024
1 parent 4a54698 commit a290fdf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,17 @@ En definitiva, con una **interfaz** el cliente no se inmuta si cambia el cómo,

>[!Example]
>![](img/Pasted%20image%2020240602132813.png)
>[!Example]
>Este ejercicio cayó en varios exámenes:
>![](img/Pasted%20image%2020241212160815.png)
>
>¿Cómo lo podríamos mejorar?
>
>![](img/Pasted%20image%2020241212160838.png)
>- El botón especifica el contrato de los dispositivos que puede controlar a través de una interfaz.
>- Ahora el botón puede controlar cualquier dispositivo que implemente la interfaz proporcionada por él.
> - ¡Incluso aquellos que aún no han sido inventados!
- **ISP** (*Interface Segregation Principle*, Principio de segregación de interfaces):
- Sugiere que los clientes no deberían tratar con la clase original, sino sólo con la interfaz correspondiente
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a290fdf

Please sign in to comment.