Research Article Open Access

A VF-IMF Cohesion Metric for Object-Oriented Classes

Joy Christy Antony Sami1 and Umamakeswari Arumugam1
  • 1 SASTRA Deemed to be University, India

Abstract

Cohesion in Object Oriented (OO) modules impact reusability, efficiency and complexity of software. OO Programmers are mandated to create software with high cohesion. The testing phase in Software Development Life Cycle (SDLC) is not only concerned about creating error free software but also assess quality of code through software metrics. The metric‘Lack of Cohesion in Methods (LCOM)’ is one of the significant OO metric for measuring level of cohesion in software modules. LCOM and its improvised versions of cohesion metrics output degree of cohesion in software modules rather than providing solutions to reconstruct the poorly cohesive modules. Further, the traditional cohesion metrics do not differentiate the possible levels such as high, medium and low cohesions. Thus, in this paper a novel, Variable Frequency – Inverse Method Frequency (VF-IMF) based machine learning metric is proposed to assess the level of cohesion in modules and also to group module methods to instill high cohesion. The proposed metric is experimented over three sample modules represents each level of cohesion. The experimental results show that the proposed metric clearly differentiates the three levels of cohesion and offers a compromised solution for building high cohesive modules than traditional LCOM metrics. The metric is also validated against Weyuker’s properties and is proven to be a valid metric as it satisfies all the 9 properties.

Journal of Computer Science
Volume 16 No. 4, 2020, 422-429

DOI: https://doi.org/10.3844/jcssp.2020.422.429

Submitted On: 10 July 2019 Published On: 10 April 2020

How to Cite: Sami, J. C. A. & Arumugam, U. (2020). A VF-IMF Cohesion Metric for Object-Oriented Classes. Journal of Computer Science, 16(4), 422-429. https://doi.org/10.3844/jcssp.2020.422.429

  • 3,259 Views
  • 1,193 Downloads
  • 0 Citations

Download

Keywords

  • TF
  • IDF
  • LCOM
  • MALCOM
  • TCC
  • LC