Cognitive Weighted Inherited Class Complexity Metric - Maheswaran, K.; Aloysius, A. (Procedia computer science, 2018)
In the software industry, the class complexity of an object oriented programis measured using various factors such as counting the number of lines of code, methods, attributes, functional points, etc.,. Many researchers propose the class complexity metrics for object oriented design. Aloysius et al., has proposed a class complexity metric called Attribute Weighted Class Complexity (AWCC) from Extended Weighted Class Complexity (EWCC).The metric AWCC was calculated by adding the complexity of methods, attributes and complexity due to inheritance. The main limitation of AWCC is that on calculating inherited complexity, the Cognitive Load (CL) assigned to Lth level in inheritance hierarchy was assumed to be 1 always, but the cognitive load to understand the different levels ofinheritance can’t be same. So, there is a need for a metric to overcoming the limitations of AWCC. Hence, a new metric namely Cognitive Weighted Inheritance Class complexity (CWICC) is proposed in this paper. In CWICC, cognitive weights are assigned for each level of inheritance and also calculate the complexity due to the reusing of different types of attributes. The proposed metric has been validated empirically and also theoretically by using the properties of Weyuker’s. The result is matched with otherexisting measures and it shows that the proposed metric is to be a more appropriate indicator to measure the complexity of the class.