oftware Engineering is the branch of computer science which is mainly concerned with developing large applications. There are number of quality attributes which are available to measure the quality of softwares i.e., maintainability, reusability, availability, reliability, cohesion, coupling, security, scalability, testability, usability etc.
Cohesion can be defined as the relatedness of elements in a module. There can be two types of modules in software system: ? Highly Cohesive Module ? Low Cohesive Module Highly Cohesive Module is defined as those modules whose elements have a tight relationship among themselves. A Low Cohesive Module is defined as the module that has some elements that have little or no cohesion relation to others. Class consists of following two members: ? Attributes ? Methods Attributes can be defined as the things where the objects stores the data i.e., variables. On the other hand, Methods can be defined as Functions and Procedures that are attached to an Object and allowing the object to perform the different actions.
Class Cohesion Metrics are applicable on the following two phases:
? High Level Design (HLD Phase) ? Low Level Design (LLD Phase)Several HLD and LLD metrics have been proposed in the literature to measure cohesion. HLD metrics require the information that is available during the HLD phase, such as types of attributes and method parameters. LLD metrics requires the information that is available during LLD phase, such as attributes referenced by the methods.
As we know that, there have been proposed a number of cohesion metrics in the literature in order to measure the cohesion of various software systems. But most Class Cohesion Metrics shows the undefined values for some special cases given as follows:
? Classes consisting of fewer than two methods. ? Classes that do not contain any attributes. ? Classes in which none of the methods has parameters.
This guideline is used for all journals. These are the manuscript preparation guidelines used as a standard template for all journal submissions. Author must follow these instructions while preparing/modifying these guidelines. This guideline is used for all journals. This guideline is used for all journals. These are the manuscript preparation guidelines used as a standard template for all journal submissions. Author must follow these instructions while preparing/modifying these guidelines. This guideline is used for all journals. This guideline is used for all journals. These are the manuscript preparation guidelines used as a standard template for all journal submissions. Author must follow these instructions while preparing/modifying these guidelines. This guideline is used for all journals. This guideline is used for all journals. These are the manuscript preparation guidelines used as a standard E-mail : [email protected] In 1998In ,2004, authors of [1], [2], [6], [7], [8], [9], [10], [11], [12], [13] and [14] excluded all classes that come under special cases mentioned above for which 12 object oriented class cohesion metrics like LCOM1, LCOM2, LCOM5, TCC, LCC, NHD, CC, SCOM, COH, DCD, DCI and CAMC gives undefined cohesion values and cohesion value can never be infinity.
template for all journal submissions. Author must follow these instructions while preparing/modifying these guidelines. This guideline is used for all journals.
In 2011, [3] introduces criteria for assigning cohesion values to classes of special cases, such as classes having lesser than two methods, classes containing no attributes, classes having methods with no parameters. They used a value-assignment criteria to assign values to special cases. But they have not included two factors including inheritance and the accessibility levels i.e., public, protected and private). Through this value-assignment criteria, the applicability of considered metrics in paper increases to 100%. This paper worked on same criteria as [3] mentioned i.e criteria for assigning cohesion values for special cases, such as classes having lesser than two methods, classes containing no attributes, classes having methods with no parameters and additionally, it will include a factor of inheritance i.e., the inherited attributes and methods would be included. This paper considered four scenarios: ? both inherited methods and attributes are excluded, ? only inherited attributes are excluded, ? only inherited methods are excluded, both inherited methods and attributes are included. Following table shows assigned values are used for metrics to calculate cohesion for special case: Following we take an example of class named test1.class to show the calculation of cohesion using this tool: 1. This following snapshot shows "Select Input File", this will browse and select .class file. After selecting a class file, we will select one option from four options: ? exclude all, ? exclude method, ? exclude variable ? include all. Exclude All will exclude all inherited members of a class in cohesion calculation, Exclude Method will exclude inherited methods in cohesion calculation, Exclude Variable will exclude inherited methods in cohesion calculation, and Include All will include all inherited members of a class in cohesion calculation. This tool will calculate cohesion for normal classes as well as for special classes also.
But in this paper, we have just included the result only for special classes like classes those have less than two methods, classes that do not contain attributes, classes whose methods have no parameters.
of class test1 using 12 metrics calculated for the scenario in which both inherited methods and attributes are excluded.
3. The following snapshot shows the cohesion values of class test1 using 12 metrics calculated for the scenario in which inherited methods are excluded. We have considered 55 classes of special cases and calculated cohesion for classes using each The above chart shows that with including inherited methods and attributes shows the better cohesion results. In it, m refers to methods, a refers to attributes and p refers to parameters. These results shows that including the inherited members the cohesion of a classes increases, thus it improves the applicability of cohesion metrics by using assigned values for special cases in all four scenarios increase the cohesion of maximum number of classes.
As there are number of metrics that show undefined values for classes of special cases. This paper proposed a tool for cohesion calculation and studied four scenarios (1) both inherited methods and attributes are excluded, (2) only inherited attributes are excluded, (3) only inherited methods are excluded, and (4) both inherited methods and attributes are included. After studying these scenarios we get the results that relevancy of maximum of metrics increases with including the inherited metrics.
Improving the applicability of object-oriented class cohesion metrics. Information and Software Technology 2011. 53 p. .
Measuring the discriminative power of object-oriented class cohesion metrics. IEEE Transactions on 2011. 37 p. . (Software Engineering)
Fault prediction and the discriminative powers of connectivity-based objectoriented class cohesion metrics. Information and Software Technology 2012. 54 p. .
A Precise method-method interaction-based cohesion metric for object-oriented classes. ACM Transactions on Software Engineering and Methodology 2012. 21 p. 8. (TOSEM))
IMPACT OF COHESION ON RELIABILITY. Journal of Information and Operations Management 2012. 3 (1) .
Improving cohesion metrics for classes by considering dependent instance variables. Software Engineering 2004. 30 p. . (IEEE Transactions on)
Measuring design-level cohesion. IEEE Transactions on 1998. 24 p. . (Software Engineering)
A new cohesion metric and restructuring technique for object oriented paradigm. Computer Software and Applications Conference Workshops (COMPSACW), 2012. 2012. IEEE.
The impact of service cohesion on the analyzability of service-oriented software. Services Computing, 2010. 3 p. .
Feature cohesion in software product lines: an exploratory study. Software Engineering (ICSE), 2011 33rd International Conference on. IEEE, 2011. 2012. 9.