Since the birth of software engineering which was an arisen academics after the breaking out of software crisis in 1960's, the researches on software engineering went forward continuously. On one hand, accumulated large quantities of achievements and technologies had formed the more mature traditional software engineering; On the other hand, unceasingly introduced of the advanced project method caused it to consummate day by day. Along with the widespread application of computer software, people set new higher request to its quality. It was need us urgently to take precise, forcasting, repetable control on the software developing process and products. The software measurement could be one effective method to control the software quality.The goal of software measurement is to use scientific methods to appraise the software quality objectively, powerfully carry on control and management to software developing process, obtain highgrade software by low cost. According to traditional software measure methods, there are Halstead method, Line of Code (LOC)method, McCable method, WoodWard method, Harrison method and so on. The traditional measure methods are substituted gradually by object-oriented(OO) measure methods as a result of that can not be a very good reflection of some technical characteristics of 00 system. The popular existing 00 measure methods are C&K measure set as well as MOOD measure set and so on, all include the class cohesion measure.Cohesion is one kind of the important software interior attributes. It symbolizes the close degree between interior elements each other in one module. It is usually considered to have strong relativity with some exterior attributes such as maintainability, reusability and reliability. Therefore high degree of cohesion becomes the goal that software developers always pursue. A large number of existing measure methods are mainly based on the similar degree among methods in a class, all of these measure methods can be divided into three classifications: cohesion measures based on graphic theory, cohesion measures based on information theory, cohesion measures based on program slicing. This article has analyzed and summarized the existing cohesion measures, concludes that there are three common disadvantages in them: whether they have excluded especial methods, whether they have satisfied the theory confirmation criteria of a well cohesion measure, whether they have considered the different influencing degree to cohesion measure caused by dissimilar interactive degree among the elements in a class.Aiming at these above questions, We've finished the following reseaches:1. this article depicts class cohesion through the joint intensity among interior members within a class and adopts the calculation of dependent relations among class members to define their joint intensity. Thereby this new means overcomes the deficiencies in existing methods and implements a more accurate class cohesion measurement.2. In the first place, we utilize a specific language-independent model which is a simple directed graph to abstract an object-oriented system, and then pick up the dependent relationships between attributes and methods within a class to establish DWFC (Directed Weighted False Chart) model. We give the formal discriptions of this modle and infer some definitions and theorem.3. We introduce the conception of weight to constitute a new cohesion measure method based on this model.4. I prove that this new method satisfies the four properties of a good measurement from a theoretical way devised by Briand and practically testify that it can represent object-oriented cohesion measurement more exactly and logically than the existing ways.5. At the same time, in view of the limitation within existing cohesion measure confirmation criteria, we propose to let consistency between measure result and personal intuition judgement one of the essential measure confirmation criteria in this article. Therefore, we import PROBE scale measure method and use relativity and validity to estimate the consistency between measure result and personal intuition judgement, consequently improve the existing cohesion measure confirmation criteria. We have also confirmed the validity and superiority through contrast experiment.6. Finally, we propose an automatic measure tool model which is individual, extensible and environment-independent. Taking java language as an example, we implement an automatic cohesion measure tool based on this language. |