FUNDAMENTALS OF COMPUTER

SYSTEMS DEVELOPMENT ANALYSIS

APPLICATION DEVELOPMENT PROCESSES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
To implement the Interface Segregation Principle (ISP), use an interface, an abstract class, or abstract methods to extend the functionality of the class.
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -The Interface Segregation Principle (ISP) states that a client should not be exposed to methods it doesn’t need. Declaring methods in an interface that the client doesn’t need pollutes the interface and leads to a “bulky” or “fat” interface.

Detailed explanation-2: -In the field of software engineering, the interface segregation principle (ISP) states that no code should be forced to depend on methods it does not use. ISP splits interfaces that are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them.

Detailed explanation-3: -The Interface Segregation Principle was defined by Robert C. Martin while consulting for Xerox to help them build the software for their new printer systems. He defined it as: “Clients should not be forced to depend upon interfaces that they do not use.”

Detailed explanation-4: -Following the Interface Segregation Principle, we can address the problem of the vehicle interface, solution is-Segregate the Vehicle interface into multiple role interfaces each for specific behavior. In this case, Vehicle interface can be broken down into three interfaces: Toy, Movable, and Flyable.

There is 1 question to complete.