Object-oriented cohesion subjectivity amongst experienced and novice developers: an empirical study

  • Authors:
  • Steve Counsell;Stephen Swift;Allan Tucker;Emilia Mendes

  • Affiliations:
  • Brunel University, Uxbridge, Middlesex, UK;Brunel University, Uxbridge, Middlesex, UK;Brunel University, Uxbridge, Middlesex, UK;University of Auckland, New Zealand

  • Venue:
  • ACM SIGSOFT Software Engineering Notes
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

The concept of software cohesion in both the procedural and object-oriented paradigm is well known and documented. What is not so well known or documented is the perception of what empirically constitutes a cohesive 'unit' by software engineers. In this paper, we describe an empirical investigation using object-oriented (OO) classes as a basis. Twenty-four subjects (drawn from IT experienced and novice groups) were asked to rate ten classes sampled from two industrial systems in terms of their overall cohesiveness; a class environment was used to carry out the study. Three hypotheses were investigated as part of the study, relating to class size, the role of comment lines and the differences between the two groups in terms of how they rated cohesion. Several key results were observed. Firstly, class size (when expressed in terms of number of methods) only influenced the perception of cohesion by novice subjects. Secondly, well-commented classes were rated more highly amongst IT experienced than novice subjects. Thirdly, results suggest strongly that cohesion comprises a combination of various class factors including low coupling, small numbers of attributes and well-commented methods, rather than any single, individual class feature per se. Finally, if the research supports the view that cohesion is a subjective concept reflecting a cognitive combination of class features then cohesion is also a surrogate for class comprehension.