Comprehensive and Detailed Explanation from Exact Extract:
Encapsulation in ABAP OO and ABAP Cloud ensures that internal object details are hidden from outside consumers.
A. Attributes can be changed through public methods → ✅ Correct, because controlled access is provided through getter/setter or other methods.
B. Attributes can be changed by the client program directly → ❌ Incorrect, this violates encapsulation.
C. Attributes cannot be changed → ❌ Incorrect, they can be changed, but only via allowed mechanisms.
D. Attributes can only be changed by the class itself → ✅ Correct, ensuring business logic consistency.
This aligns with RAP behavior definitions (BDEF) where internal attributes are encapsulated and only manipulated through behavior implementation methods.
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit