Polymorphism is also know as
Correct answer
D. class switching
10 views
D. class switching
10 views
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.
Not sure why the answer is D? Ask here and get an explanation.