🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: SOLID Principles: all 10 questions

Quiz: SOLID Principles · Question 10 of 10

A basic printer class is forced to implement scan() and fax() with errors. What is the fix?

A basic printer class is forced to implement scan() and fax() with errors. What is the fix?

  1. A.Split the big interface into Printer, Scanner and Fax interfaces
  2. B.Make all three methods static
  3. C.Merge everything into one class
  4. D.Remove the printer class
Answer & explanation

Correct answer: Split the big interface into Printer, Scanner and Fax interfaces

Interface Segregation: clients should not depend on methods they do not use.

Can you get the rest right without peeking?

Take the timed Quiz: SOLID Principles quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →