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

Quiz: Encapsulation and Abstraction · Question 9 of 10

A new WhatsAppNotifier is added. Why does remind(notifier, to) not need any change?

A new WhatsAppNotifier is added. Why does remind(notifier, to) not need any change?

  1. A.It depends only on the abstract Notifier and its send() method, not on any concrete class
  2. B.Python copies the code automatically
  3. C.remind() checks the type with if-else
  4. D.WhatsAppNotifier inherits from remind()
Answer & explanation

Correct answer: It depends only on the abstract Notifier and its send() method, not on any concrete class

Code written against an abstraction works with every new implementation.

Can you get the rest right without peeking?

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

Start the quiz →