10ISP: THE INTERFACE SEGREGATION PRINCIPLE
The Interface Segregation Principle (ISP) derives its name from the diagram shown in Figure 10.1.
In the situation illustrated in Figure 10.1, there are several users who use the operations of the
OPS class. Let’s assume that
User1 uses only
User2 uses only
User3 uses only
Now imagine that
OPS is a class written in a language like Java. Clearly, in that case, the source code of
User1 will inadvertently depend on
op3, even though ...