# Introduction 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. # a) Class Cohesion 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. # II. # Related Work 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 : rupinder.16835@lpu.co.in 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. # a) Review Stage 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. # The following snapshot shows the cohesion values 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. # III. # Conclusion 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. ![-oriented software quality, class cohesion, cohesion metric, HLD, LLD.](image-2.png "") 1![The assigned values for the metrics under consideration[3] In the table 2.1 m refers to method, a refers to attribute and assigned before means the metric does not show undefined value for the case shown inrespective column b) Final Stage This paper proposed a tool named SoftMetric Tool to show the comparisons and results of four scenarios using Netbeans IDE 7.3. Java is a high-level programming language originally developed by Sun Microsystems and released in 1995 [4]. Netbeans is a Java IDE that is open source and free. Most developers recognize the NetBeans IDE as the original free Java IDE [5]. i. SoftMetric SoftMetric Tool is implemented using Netbeans. This tool will calculate the cohesion values for the following 12 metrics: ? TCC (Tight Class Cohesion) ? LCC (Loose Class Cohesion) ? NHD (Normalized Hamming Distance) ? CC (Class Cohesion) ? SCOM (Class Cohesion Metric) ? LCOM1 (Lack of Cohesion 1) ? LCOM2 (Lack of Cohesion 2) ? LCOM5 (Lack of Cohesion 5) ? COH ? DCD (Degree of Cohesion -Direct) ? DCI (Degree of Cohesion -Indirect) ? CAMC (Cohesion Among Methods in a Class) Following is shown the snapshot of the tool: Global Journal of Computer Science and Technology Volume XIII Issue VII Version I](image-3.png "1 :") ![The following snapshot shows the cohesion values of class test1 using 12 metrics calculated for the scenario in which inherited attributes are excluded. following snapshot shows the cohesion values of class test1 using 12 metrics calculated for the scenario in which both inherited methods and attributes are included.6. The following snapshot shows comparison of four scenarios, which shows that with including inherited members increase the overall cohesion of a class i.e., with including inherited member improve the applicability of maximum metrics of the literature.four scenarios for each class. Following bar-chart shows the overall conclusion for four scenarios.Volume XIII Issue VII Version I](image-4.png "4.") 21![Figure 2.1 : Results of four scenarios for 55 classes](image-5.png "Figure 2 . 1 :") ![](image-6.png "") ![](image-7.png "") © 2013 Global Journals Inc. (US) © 2013 Global Journals Inc. (US) Global Journal of Computer Science and Technology * Fault prediction and the discriminative powers of connectivity-based objectoriented class cohesion metrics AlDallal Jehad Information and Software Technology 54 2012 * Identification of Nominated Classes for Software Refactoring Using Object-Oriented Cohesion Metrics SafwatMIbrahim International * Improving the applicability of object-oriented class cohesion metrics AlDallal Jehad Information and Software Technology 53 2011 * Measuring the discriminative power of object-oriented class cohesion metrics AlDallal Jehad IEEE Transactions on 37 2011 Software Engineering * An Investigation of Design Level Class Cohesion Metrics KuljitKaurandSingh Hardeep * A Precise method-method interaction-based cohesion metric for object-oriented classes AlDallal Jehad LionelCBriand ACM Transactions on Software Engineering and Methodology 21 8 2012 TOSEM) * A new cohesion metric and restructuring technique for object oriented paradigm MehmetKaya JamesWFawcett Computer Software and Applications Conference Workshops (COMPSACW) IEEE 2012. 2012 * IMPACT OF COHESION ON RELIABILITY AYadav RAKhan Journal of Information and Operations Management 3 1 2012 * Feature cohesion in software product lines: an exploratory study SvenApel DirkBeyer Software Engineering (ICSE), 2011 33rd International Conference on. IEEE 2011. 2012 9 * Improving cohesion metrics for classes by considering dependent instance variables HeungChae YongRaeSeok Doo HwanKwon Bae Software Engineering 30 2004 IEEE Transactions on * The impact of service cohesion on the analyzability of service-oriented software MikhailPerepletchikov CasparRyan ZahirTari Services Computing 2010 3 * Measuring design-level cohesion JamesMBieman Byung-KyooKang IEEE Transactions on 24 1998 Software Engineering