Code AnalysisIntermediate 60s
Composition over inheritance refactor
class Report(BaseReport, EmailMixin, PdfMixin, CacheMixin):
# inherits render(), send_email(), to_pdf(), cache() from unrelated mixins
pass
# Report is deeply coupled to three mixins it barely uses
Which refactor best follows composition over inheritance?
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.