Skip to content
Sharp

Object-oriented programming · interview question

How can business operations help in maintaining an object's encapsulation?

Multiple choiceMediumchapter-3-curatedpremiumoopcontrolled-mutation
Choose one answer
Answer and explanation

Correct answer

C. By providing methods that encapsulate logic for safe mutations

Why

Business operations encapsulate logic within methods that safely modify the object's state, maintaining encapsulation and ensuring the object's invariants are respected.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →