Hands-on practice for this lecture. Work through the exercises and quizzes to reinforce what you've learned.
Exercise 1 of 1
Trim the fat. Refactor a bloated interface into small, focused contracts and see how it simplifies your implementation classes.
Implementing Methods:
Printable
Focuses only on printing.
Scannable
Focuses only on scanning.
Faxable
Focuses only on faxing.
âœ‚ï¸ Interface Segregation Principle: No client should be forced to depend on methods it does not use. Large interfaces should be split into smaller, more specific ones so that clients only need to know about the methods that are relevant to them.
Practical exercises to master the concepts.
Split a SmartDevice interface into Switchable and Dimmable.