Code AnalysisIntermediate 60s
Fat interface / ISP violation
class Machine:
def print(self, doc): ...
def scan(self, doc): ...
def fax(self, doc): ...
def staple(self, doc): ...
class SimplePrinter(Machine):
def print(self, doc):
...
def scan(self, doc):
raise NotImplementedError
def fax(self, doc):
raise NotImplementedError
def staple(self, doc):
raise NotImplementedError
Which principle is violated and what is the recommended refactor?
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.