Abstract: Polymorphism is one of the main pillars of objectoriented
paradigm. It induces hidden forms of class dependencies
which may impact software quality, resulting in higher cost factor for
comprehending, debugging, testing, and maintaining the software. In
this paper, a new cognitive complexity metric called Cognitive
Weighted Polymorphism Factor (CWPF) is proposed. Apart from the
software structural complexity, it includes the cognitive complexity
on the basis of type. The cognitive weights are calibrated based on 27
empirical studies with 120 persons. A case study and experimentation
of the new software metric shows positive results. Further, a
comparative study is made and the correlation test has proved that
CWPF complexity metric is a better, more comprehensive, and more
realistic indicator of the software complexity than Abreu’s
Polymorphism Factor (PF) complexity metric.
Abstract: In modern era, the biggest challenge facing the
software industry is the upcoming of new technologies. So, the
software engineers are gearing up themselves to meet and manage
change in large software system. Also they find it difficult to deal
with software cognitive complexities. In the last few years many
metrics were proposed to measure the cognitive complexity of
software. This paper aims at a comprehensive survey of the metric of
software cognitive complexity. Some classic and efficient software
cognitive complexity metrics, such as Class Complexity (CC),
Weighted Class Complexity (WCC), Extended Weighted Class
Complexity (EWCC), Class Complexity due to Inheritance (CCI) and
Average Complexity of a program due to Inheritance (ACI), are
discussed and analyzed. The comparison and the relationship of these
metrics of software complexity are also presented.