Assuming the class and method names provide good definitions of their own functionalities,
which are probably true? (Choose all that apply.)
A. These classes appear to have low cohesion.
B. These classes appear to have high cohesion.
C. These classes appear to have weak validation.
D. These classes appear to have strong validation.
E. These classes appear to have weak encapsulation.
F. These classes appear to have strong encapsulation.
for this question the answer is A,E
but i doubt on answer E
encapsulation is based on how instance variables are binded within instance method in class by making instance variable as private & method as public
please anyone help me to clarify this
thanks in advance
James Boswell wrote:Encapsulation also means binding the methods with the data they operate on. With that in mind, do you think the method findEmployeesByState belongs in Payroll? Or connectToRDBMS in Employee?