Multiple ChoiceBeginner 45s
ISP and fat interfaces
A single Device interface declares print, scan, fax and staple. A simple printer must throw on the last three. What is the recommended fix?
Options
- 1Keep one interface and document which methods throw for which devices
- 2Split the fat interface into small role interfaces and implement only the ones that apply
- 3Replace the interface with an abstract base class holding all four methods
- 4Add boolean capability flags to the interface to describe support
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.