A Cohesion Metric for Classes in Object-Oriented Systems

객체지향 시스템의 클래스에 대한 응집도

  • Chae, Hong-Seok (Dept. of Computer Science, Korea Advanced Institute of Science and Technology) ;
  • Gwon, Yong-Rae (Dept. of Computer Science, Korea Advanced Institute of Science and Technology) ;
  • Bae, Du-Hwan (Dept. of Computer Science, Korea Advanced Institute of Science and Technology)
  • 채홍석 (한국과학기술원 전산학과) ;
  • 권용래 (한국과학기술원 전산학과) ;
  • 배두환 (한국과학기술원 전산학과)
  • Published : 1999.09.01

Abstract

객체지향 시스템의 개발은 클래스를 통해서 이루어진다. 즉, 문제 영역에 존재하는 중요한 대상 또는 개념을 클래스로 모델링하고, 이로부터 생성된 객체들 사이의 메시지 교환을 통해서 시스템은 구축된다. 또한, 클래스는 정보 은닉을 제공함으로써, 객체지향 시스템의 재사용성과 유지보수성에 상당한 기여를 한다. 그러나, 설계 단계에서 실세계의 대상을 부적절하게 모델링하거나, 또는 유지보수 단계에서 클래스에 무분별한 변경을 가하는 경우 클래스의 품질은 악화될 수 있고, 이는 결국 시스템을 유지보수 하거나 확장하는데 상당한 장애를 초래한다.응집도는 모듈의 구성 요소들 사이의 연관성 정도를 나타내는 척도로서 전통적으로 모듈의 품질을 평가하기 위한 기준으로 사용되어 왔다. 이 논문에서는 클래스의 품질을 평가하는 방법으로서의 클래스 응집도를 제안한다. 즉, 클래스가 실세계의 대상을 적절하게 모델링한다면, 그 구성요소들 사이에 밀접한 관련이 있고 결국 높은 응집도를 가지게 될 것이다. 반대로 실세계의 대상에 대한 적절한 모델이 아니라면, 그 클래스의 구성 요소들 사이에는 밀접한 관련성이 없을 것이고 따라서 낮은 응집도를 보일 것이다.Abstract Object-oriented systems are developed by means of classes; that is, classes captures the essential entities or concepts in the problem domain, and the system is embodied by the interactions of objects instantiated from the classes. In addition to the basic units of object-oriented systems, classes serves as the units of encapsulation, which considerably promote the modifiability and the extensibility of them. However, improper modeling in the design phase or uncontrolled changes during the maintenance phase can degrade the quality of classes, which leads to systems cumbersome to maintain and extend.Cohesion refers to the degree of connectivity among the elements of a single module, and is being used as a factor which characterizes the quality of a module. In this paper, we propose a new cohesion metric for assessing the quality of classes. If a class captures properly the essential features of objects, the members of the class surely have strong relationship among them. On the contrary, the poor relationship among class members can indicate that the class is not a proper model of objects.

Keywords

References

  1. Proc.of 1th ACM Conf. on Object-Oriented Systems,Languages,and Applications Encapsulation and Inheritance in Object-Oriented Programming Languages Synder,A.
  2. Proc. of Symp.on Software Reusability Cohesion and Reuse in an Object-Oriented System Bieman,J.M.;Kang,B.-K.
  3. Empirical Software Engineering Journal v.3 no.1 A Unified Framework for Coi\hesion Measurement in Object-Oriented Systems Briand,L.C.;Daly,J.W.;Wust,J.
  4. Proc.of 6th ACM Conf. on Object-Oriented Systems,Languages,and Applications Towards a Metrics Suite for Object Oriented Design Chidamber,S.R.;Kemerer,C.F.
  5. IEEE Trans.on Software Engineering v.20 no.6 A Metrics Suite for Object Oriented Design Chidamber,S.R.;Kemerer,C.F.
  6. Software Metrics Handersojn-Sellers,B.
  7. Proc.of Int.Symp.on Applied Corporate Computing Measuring Coupling and Cohesion in Object-Oriented Systems Hitz,M.;Montazeri,B.
  8. Journal of Systems and Software v.23 no.2 Object-Oriented Metrics that Predict Maintainability Li,W.;Henry,S.
  9. Proc.of 5th Int. Symp.on Software Metrics,Bethesda A Cohension Measure for Classes in Object-Oriented Systems Chae,H.S.;Kwon,Y.R.
  10. A Critique of Cohesion Measures in the Object-Oriented Program Gupta,B.S.
  11. IEEE Trans. on Software Engineering v.22 no.4 Chidamber and Kemerer's Metrics Suite:A Measurement Theory Perspective Hitz,M.;Montazeri,B.
  12. IEEE Trans. on Software Engineering v.22 no.10 A Validation of Object-Oriented Design Metrics as Quality Indicators Basili,V.R.;Briand,L.C.;Melo,W.L.
  13. Describing Object-Oriented Software:What maintainers need to know Wilde,N.(et al.)
  14. IEEE Trans.on Software Engineering v.18 no.12 Maintenance Support for Object-Oriented Programs Wilde,N.;Huitt,R.
  15. Journal of Object-Oriented Programming v.1 Designing Reusable Classes Johnson,R.E.;Foote,B.
  16. IEEE Software Assuring Good Style for Object-Oriented Programs Lieberherr,K.J.;Holland,I.M.