Advanced
Object-Oriented Programming Concepts
Q85 / 100
What is "mixin composition" used to solve compared to traditional multiple inheritance?
Correct! Well done.
Incorrect.
The correct answer is A) It provides a way to reuse behavior across unrelated classes while avoiding the ambiguity of the diamond problem, often by linearizing the inclusion order
A
Correct Answer
It provides a way to reuse behavior across unrelated classes while avoiding the ambiguity of the diamond problem, often by linearizing the inclusion order
Explanation
Languages like Ruby use a method resolution order (MRO) to linearize mixins, so each included module has a well-defined place in the lookup chain, avoiding diamond ambiguity.
Progress
85/100