Which two describe benefits of encapsulation?

Which two describe benefits of encapsulation? (Choose two.)

Which two describe benefits of encapsulation? (Choose two.)

A.
Code is more useful because attributes of the class can be accessed by other classes for both
reading and writing.

B.
Code is more efficient because attributes of the class can be accessed directly by other
classes, without the overhead of going through
access methods.

C.
Code is more reusable because the attributes of the class are protected from direct modification
by other code.

D.
Code is more flexible because the attributes can be modified directly from code in other
packages.

E.
Code is safer because attributes of the class CANNOT be directly modified by code outside the
class.



Leave a Reply 0

Your email address will not be published. Required fields are marked *