Measuring class cohesion based on dependence analysis

  • Authors:
  • Zhen-Qiang Chen;Bao-Wen Xu;Yu-Ming Zhou

  • Affiliations:
  • Department of Computer Science and Engineering, Southeast University, Nanjing 210096, P.R. China;Jiangsu Institute of Software Quality, Nanjing 210096, P.R. China;State Key Laboratory of Software Engineering, Wuhan University, Wuhan 430072, P.R. China

  • Venue:
  • Journal of Computer Science and Technology
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Classes are the basic modules in object-oriented (OO) software, which consist of attributes and methods. Thus, in OO environment, the cohesion is mainly about the tightness of the attributes and methods of classes. This paper discusses the relationships between attributes and attributes, attributes and methods, methods and methods of a class based on dependence analysis. Then the paper presents methods to compute these dependencies. Based on these, the paper proposes a method to measure the class cohesion, which satisfies the properties that a good measurement should have. The approach overcomes the limitations of previous class cohesion measures, which consider only one or two of the three relationships in a class.