摘要
为弥补CK套件中每类加权方法数量、继承树深度和方法内聚缺乏度等度量指标的缺陷,提出了如下改进的度量指标:每类加权方法参数复杂性(WMACC)、每类加权方法属性复杂性(WACC)、相对继承树深度(RDIT)、方法内聚性(CM)和封装率(ER).用Java的Util包中的类作为测试数据比较了ICK度量套件和CK套件,结果表明,WMACC和CM更准确地反映了方法的复杂性和内聚性,RDIT更适合于纯面向对象系统的环境.WACC和ER提供了对属性复杂性和封装性的度量.
To overcome the shortcomings of CK suite in terms of its metrics, such as WMC ( weighted methods per class), DIT ( depth of inheritance tree), and LCOM ( lack of cohesion in methods) for object-oriented software, an improved CK (ICK) suite was proposed. In the ICK suite, weighted method argument complexity per class (WMACC), weighted attribute complexity per class (WACC), relative DIT (RDIT), cohesion in methods (CM), and encapsulation ratio (ER) were defined. The ICK suite was evaluated and compared with the CK suite using the classes in the Util package of Java, and the results show that WMACC and CM describe the complexity and cohesion of methods better, and RDIT is more suitable for object-oriented software. WACC and ER provide metrics for attribute complexity and performance in encapsulation, respectively.
出处
《西南交通大学学报》
EI
CSCD
北大核心
2008年第1期35-39,共5页
Journal of Southwest Jiaotong University