What is encapsulation and what are its advantages?
a) Encapsulation is hiding the internal state of an object and only exposing the necessary functionality. Advantages include increased security and easier maintenance.
b) Encapsulation is exposing the internal state of an object and all its functionality. Advantages include flexibility and faster execution.
c) Encapsulation is a programming concept unrelated to object-oriented programming.
d) Encapsulation is a method for naming variables in a program.