1. Home
  2. Computer Science MCQs
  3. PHP
  4. Polymorphism is also know as

Added 22 Jan 2024

Polymorphism is also know as

  1. switch
  2. overact
  3. encapsulation
  4. class switching Correct answer

Correct answer

D. class switching

10 views

MCQSEXAM

Explanation

In Matt Zandstra's PHP Objects, Patterns and Practice — the source of this question — polymorphism is described as class switching: client code works with a common interface while different classes supply different implementations behind it.

In practice this lets you replace long switch or if chains with subclasses that each override the same method.

Keep preparing with more Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs