Which of the following are true statements?

  1. A top-level class can not be called "tightly encapsulated" unless it is declared private.

  2. Encapsulation enhances the maintainability of the code.

  3. A tightly encapsulated class allows fast public access to member fields.

  4. A tightly encapsulated class allows access to data only through accessor and mutator methods.

  5. Encapsulation usually reduces the size of the code.

  6. A tightly encapsulated class might have mutator methods that validate data before it is loaded into the internal data model.


Correct Option: B,D,F

Find more quizzes: