Computer Engineering and Applications ›› 2010, Vol. 46 ›› Issue (12): 64-67.DOI: 10.3778/j.issn.1002-8331.2010.12.017

• 研发、设计、测试 • Previous Articles     Next Articles

Measurement method for object-oriented class complexity

ZENG Yi1,CHAI Yan-xin1,WU Guang-jin2,CHENG Quan-liang1,WANG Yan-li1,LI Juan1   

  1. 1.College of Computer Science,Chongqing University,Chongqing 400030,China
    2.Department of Science and Technology,Chongqing Rural Commercial Bank,Chongqing 400020,China
  • Received:2008-12-30 Revised:2009-03-09 Online:2010-04-21 Published:2010-04-21
  • Contact: ZENG Yi

面向对象类的复杂性的度量方法

曾 一1,柴艳欣1,吴光金2,程全良1,王艳丽1,李 娟1   

  1. 1.重庆大学 计算机学院,重庆 400030
    2.重庆农村商业银行 科技信息部,重庆 400020
  • 通讯作者: 曾 一

Abstract: This paper analyzes several measure methods of object-oriented software complexity that have already existed,and points out their deficiencies of reflecting class complexity,and then proposes a new measure method of class complexity under the direction of software complexity decomposition.This method decomposes class complexity into three subsections—class member complexity,class member relation complexity and encapsulation complexity.Measure method for each subsection is proposed res-pectively,and then obtains the whole complexity.Here,class complexity is reflected by Sum of Implemented Method Complexity(SIMC) and Sum of Class Interface Complexity(SCIC);class member relation complexity is expressed by analysis of fake bipartite graph which is proposed in the paper;encapsulation complexity is expressed by visible rate of the member.At last,the rationality and feasibility of this method are validated from the application.

Key words: object-oriented software, complexity measurement, complexity decomposition

摘要: 简要分析了已有的几种面向对象软件复杂性度量方法,指出了这些方法在反映类复杂性方面存在的不足,运用软件复杂性分解的思想,提出了一种新的类复杂性度量方法。该方法将类复杂性分解为类成员复杂性、类成员关系复杂性和封装复杂性三个复杂性分量,对各分量分别度量,进而得出总复杂性。其中,类成员复杂性采用类所实现的成员的复杂性SIMC、类接口复杂性之和SCIC反映;类成员关系复杂性通过对文中提出的伪二部图进行分析反映;封装复杂性采用成员可见率反映。最后,通过实例验证了该方法的有效性和可行性。

关键词: 面向对象软件, 复杂性度量, 复杂性分解

CLC Number: