Skip to content
Sharp

Object-oriented programming · interview question

How would you explain a potential issue when forcing inheritance for reuse in an interview?

Multiple choiceHardchapter-5-curatedpremiumoopinheritance-basics
Choose one answer
Answer and explanation

Correct answer

D. It can lead to brittle code due to tight coupling.

Why

Forced inheritance for code reuse can lead to brittle code due to tight coupling between classes, making it difficult to modify and extend the codebase without affecting other parts of the system.

Test yourself on Object-oriented programming

A free test with instant, explained results. No account needed.

Start free test
All Object-oriented programming questions →