|
|
 | |  |
| And Now with this Design we are saying, switch will control anything that implements Switchable Interface. | |
 | |  |
|
 |
|
|
|
|
 | |  |
| Jojo Do you know that we have solved our problem by using Abstarct server Pattern which is used to decouple client and Server dependancy | |
 | |  |
|
 |
 | |  |
| Oh Yes, Here we have decoupled the Switch from Light and Fan by introducing the Switchable Interface. | |
 | |  |
|
|
|
|
|
 | |  |
| Yes absolutely You got it Jojo. And that interface is called Abstract Server Interface. | |
 | |  |
|
 |
 | |  |
| But why it was named Abstract Server and not Abstract Client. | |
 | |  |
|
|
|