hiding


Encapsulation is a way of hiding the implementation details of a class from outside access and only exposing a public interface that can be used to interact with the class. In Java, encapsulation is achieved by declaring the instance variables of a class as private, which means they can only be accessed within the class.



Table 3: Metrics definition Metrics Description Method Hidding Factor(MHF) Ratio of the sum of the invisibilities of all methods defined in all classes to the total number of methods defined in the system under consideration. Attribute Hidding Factor(AHF) Ratio of the sum of the invisibilities of all attributes