Advanced
Object-Oriented Programming Concepts
Q100 / 100
Why might overusing "static" methods and classes undermine the benefits of OOP design?
Correct! Well done.
Incorrect.
The correct answer is A) Static methods cannot be overridden or polymorphically dispatched, and heavy reliance on them can create hidden global state and make unit testing (mocking) more difficult
A
Correct Answer
Static methods cannot be overridden or polymorphically dispatched, and heavy reliance on them can create hidden global state and make unit testing (mocking) more difficult
Explanation
Because static methods are bound at compile time and not part of an object's polymorphic interface, overusing them reduces flexibility, increases coupling to specific implementations, and complicates substituting test doubles.
Progress
100/100