StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Object Oriented Metrics - Essay Example

Cite this document
Summary
"Object-Oriented Metrics" paper discloses three perspectives under which Object Oriented metrics can be considered. The first one is the fault analysis by OOM, types and new metrics, and finally their functions. Object-oriented matrix analysis and design of the software have many advantages. …
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER96.1% of users find it useful
Object Oriented Metrics
Read Text Preview

Extract of sample "Object Oriented Metrics"

Running Head: Object Oriented Metrics Introduction An object oriented matrix analysis and design ofsoftware has many advantages. Some of these advantages include readability, decomposition of problem into easily understood object and finally the software helps any modification that may be included. The development of object oriented metrics is a very complex design that requires a number of systematic approaches or steps. Therefore for a good OO to be installed or programmed, a guideline has to be followed. The most important thing to be considered first is the Object Oriented programming metrics. This helps in coming up with metrics that are set in a standard way such that effectiveness and efficiency of the Object - Oriented Analysis techniques in the design of a system may be measures. This paper therefore discloses three perspectives under which Object Oriented metrics can be considered. The first one is the fault analysis by OOM, types and new metrics and finally their functions Fault Analysis. Based on Object Oriented Metrics there are two types of faulty and these include the type I, type II and type III faults. Type I and II are the ones termed as OO faults and type III ones are the non- OO faults. The type I faults are mostly connected to the Object Oriented (OO) and are normally introduced by features such as Inheritance and Polymorphism. The type I faults therefore can be categorized further into two sub-divisions. These are the Inheritance faults and Polymorphism faults derived from the features introducing the faults (Fenton, 1991). The Inheritance OO fault majority is introduced or occur when derived class modifies data / information member of the base class and this finally changes the behavior of the base class, causing the fault in the long runs modification results into changing the environment of the base class that inform causes faults encountered. Then faults caused are either encountered in the derived class or the base class. Polymorphism fault is another type of object oriented fault encountered on the OO programs especially in a case where an object is found to be bound to different classes during run time. There are different combinations of the binding sent during the run time and when this is not tested then a failure is reached which result into Polymorphism fault. For example when two objects send different bindings to send a service request then the total combination is the product of the findings from the two objects - resulting into different combination binding into the occurrence of a fault called Polymorphism fault. The fault actually occurs when testing is not done in the testing phase (Harrison, 1988). The type II faults are special kinds of OO characterized by object copying, dangling reference and object memory usage faults objects copying fault occur if there is a duplication of the original object or the generation of a reference to the original object. This occurs during the implementation of the method of copying whereby the copying method may be incorrect. Dangling reference fault from the word Dangle meaning hang or swing without anything stopping it. Therefore, Dangling reference fault is experienced when an object say object X tries to reference another object say Y that was destroyed by a third object say object Z. the object memory usage fault on the other hand happens when an object allocates during the run time allocates memory but fails to remove the information when no longer required. Basically, this is how the object oriented memory usage fault occurs (Basil, Bariand and Melo, 1996). The type III faults are also called / referred to as a non - OO faults because they are not related to objects. They are traditional faults therefore are classified under the traditional software (Harrison 1988). After looking at the object oriented faults, it is therefore logical to be able to understand the object Oriented Metrics. These are system softwares that are developed to realize the structure and the characteristics of Object Oriented Programs. They are developed to help in the introduction of the occurrence of a fault. The most known example of Object Oriented metrics is the CK metrics. Its usefulness has been discovered in the areas such as prediction of fault phone mobiles. CK Metrics This type of Object Oriented Metrics was first proposed and developed by Chidamber and Kemerer (1998). Kemerer and Chidamber described the CK metrics in u number of ways. There is the weighted method CK class (WMC) - which measures complexity of an interval class. It may also be defined as the sum of the complexities of all methods of a class. The number of methods and the complexity of methods will tell or predict how much time and the efforts which is required to develop and maintain the class. Therefore, the larger the number of methods in a class the greater the potential impact on the children. This is so because children normally tend to inherit all the methods defined in the class. Another explanation for this is that classes with large numbers of methods are more likely to be specific especially when applied thus limiting the probability of reuse. The other type of metrics that has been defined or proposed by Chidamber and Kemerer is depth of inheritance tree (DIT). This is defined as the maximum length from the node to the root of the tree. This implies that when a class is deep in hierarchy, there will be greater number of methods which is likely to be inherited by the class thus making it more complex to predict its behavior. Chidamber and Kemerer (1994) argue that deeper trees constitute greater design complexity, since more methods of classes are involved. Another factor considered in the DIT is that when a given class is deeper in hierarchy, then there is a greater potential of reuse of inherited methods. The third type of metrics that was defined by Chidamber and Kemerer was the number of children (NOC). This refers to the number of immediate subclasses. Actually when the number of children is many, the greater the reuse owing to the fact that inheritance is a form of reuse. Again, the greater the number of children, the greater the likelihood of improper abstraction of the parent class. Normally classes with larger number of students are cases of misuse of sub classing. The argument is based on the sense that a class with large number of children will require more testing of the methods used therefore the number of children has to be considered since information a there number gives the idea of potential influence a class has on the design. The fourth metric designed by CK to object oriented design is the coupling between object classes (CBO). This is defined as the count of the classes to which this class is coupled. It provides the number of modules that are coupled at the current module either as a client or a supplier (Lorenz and Kidd, 1994). In most cases, a class is coupled to another class if it uses the member functions or instance variables of another class. For instance, excessive coupling between objective classes is harmful to modern design and tore rent reuse thus the more independent a class is the easy it is to reuse it in another application. Tentatively, when one wants to make some improvement in the modernity and promote capsulation at the same time, risks or chances of inter-object class couples should be reduced to zero as possible. The assumption behind this idea is that larger number of couples results to higher sensitivity to changes in other subsequent parts of the design making the maintenance more difficult as compared to a case where the interclass coupling is kept to a minimum. Measuring couples is very important since it helps in assessing how complex the testing of various parts of a design is likely to be. This implies tat, testing will be rigorous when inter-classes coupling is experienced or occurs (Chidamber and Kemerer, 1998). The fifth metrics design according to CK is the lack of cohesion in methods (LCOM). This is the number of different methods within a class, which reference a given instance variable. It is advisable to have cohesion within a class because it helps in the promotion of encapsulation. Encapsulation is a way of expressing something in a short clear form that gives the most important facts or ideas to be expressed. The point being clarified under this metrics is that classes are supposed to be classified or split into two or more subclasses- therefore when there is low cohesion complexity will be minimized in order to avoid the occurrence of errors during the development process . The response for a class (RFC) metrics is another vital one that was designed by Chidamber and Kemerer. RFC may be defined as the number of methods in itself of all methods which can be invoked in response to a message sent to an object of a class. For instance when large number of methods is involved in response to a message, then testing and debugging of the class becomes more complicated. This is because a higher understanding level is required on the part of the tester. This means the number of responses that can be invoked from a taker should be low so as to avoid complexity of the class. This will also minimize any possibility of the occurrence of errors during the development process. However, there are some of the weaknesses or drawbacks of the CK metrics. For example when it comes to the measuring of complexity of a class, it might be subjected to business. The metrics also may not be in a position to give a good size and exact estimation of software. Therefore there is likelihood in the occurrence of errors. Lastly the CK metrics do not provide adequate coverage in terms of planning even though they bring the design into play. Metrics for Object Oriented Design (MOOD) The MOOD metrics set means a structural mechanism of the OO paradigm as encapsulation (MHF and AHF), inheritance (MIF and AIF), polymorphism (PF), message-passing (CF) and are expressed as quotients. The MOOD set introduce the following: Method Hiding Factor (MHF) MHF refers to the ratio of the sum of the invisibility of all methods defined in all classes to the total number of methods defined in the system under considerations invisibility of a method. In this context means the percentage of the total classes from which this method is not visible. The attribute hiding factor (AHF) is another metrics classified under the metrics for object oriented Design. It refers to the ratio of the sum of the invisibilities of all attributes defined in all classes to the total number of attributes defined in the system under consideration. The other metrics is the method inheritance factor (MIF) that refers to the sum of inherited methods in all class of the system under consideration to the total number of available methods for all classes. The attribute inheritance factor (AIF) is also another example of MOOD and refers to the ratio of the sum of inherited attributes in all classes of the system under consideration in relation to the total number of available attributes for all the classes. In AIF and MIF the attributes are locally defined plus inherited. The coupling factor (CF) is a common metrics referring to the ratio of the maximum possible number of coupling in the system to the actual number of coupling specific to inheritance. The last metrics is the polymorphism factor (PF). This is the ratio between the actual number of possible different polymorphic situation for class C1 and the maximum number of distinct polymorphic situation class C1. Metrics estimation tools (Object Oriented Metrics analysis tools) These are statistical tools used to analyze the correlation between object Oriented metrics and fault prone classes. Powerful statistical tools such as determining the P-value using a P-value chart, regression analysis odds ratio and the goodness of FOIT is used. A regression analysis is defined using regression models represented using the formula below. Prop (X1, X2 Xn) = Exp (Bo + B1XX1 + . + BnX. -Xn 1+exp (Bo + B1xXx1 +... + BnxXn Where Xi= I = 1, 2 , n which are the explanatory independent variables (00). Exp is the base of the natural logarithm which can be found using scientific calculators and is approximately 2.718. Prob is the probability of detection of a specific type of faults in a class. In a case where there is a univariet logistic regression the probability of detection becomes as follows (Li, 1998). Univariete means the number of explanatory independent variables is only one Xi, i=1 P(X) = Exp (B0 + B1 XX) 1+Exp (B0 + B1 XX) The other kind of metrics analysis is the estimation of regulation co-efficiency. This is done by maximizing the log likely hood function. After maximizing the function, the respective independent variables may be measured when the value of the coefficient is large that is either large negative or positive values the impact or effect of the OO metrics on the probability of faulty detection. p-value This is a statistical significance showing the degree on toward extent is the accuracy of co-efficient estimation. P - Value is the probability of error that is involved in accepting observed results as valid. This requires the knowledge of type I and type II errors. P - Value actually is the probability of accepting a hypothesis that should be rejected. Normally if the statistical significance is large then the probability of accepting the estimated effect of the explanatory independent variable (OO metrics) is very small. The goodness of FIT is a statistical tool showing how well the model fits the data. Higher values of goodness of Fit mean the model of more accurate and vice versa. The goodness of FIT model is redefined as R2 = LLo - LL LL0 Where R2 = goodness of fit LL0 = log likelihood of the data under null hypothesis without any variable. LL = log likelihood of the data under its model. Analysis of the degree of detection can also be done using the odds ratio. This shows the change in odds when the value of an independent variable increases by 1. Theoretically the odds of an event occurring refers to the probability of having a fault over the probability of not having a fault. Mathematically in statistics it analyzes the impact of independent variables that is the object oriented metrics in the independent variables (Basil, Briand and Melo, 1996). New metrics. Studies from the Chidamber and Kemerer (1998) metrics have resulted to the development of new metrics. This includes inheritance coupling (IC), average method coupling (AMC), coupling between methods (CBM) and number of object, memory allocation (NOMA). The inheritance coupling shows the number of parent classes to where a given class is coupled. It is a bit related to the metrics for object oriented design. The IC states that a class is coupled to its percentage class if one of its inherited methods functionally dependent on the new or redefined method in a class. At least one of the following conditions should hold for a class to couple to its parents. One of its inherited methods should use a variable, which is redefined in a new / redefined method. The condition is that one of the class inherited method should use a variable X which in turn depends on the value of another a variable Y defined in a new / redefined methods. The third condition checked is that one of the inherited methods should use a new method and return value of a new method. The last condition that should hold is that one of the inherited methods should use a new parameter method (Lorenz and Kidd, 1994). The other metrics arising from the studies of CK metrics is the coupling between methods (CBM). This gives the total number of redefined methods to which all the inherited methods are coupled. A CBM coupling of inherited method to a new method if and only if it is functionally dependent on the new method in classes. This makes it is easier to measure in total number of new method to which an inherited method is coupled. The difference between the IC and CBM is that IC only measures the number of a parent classes to which a given class is coupled while CBM will measure the total number of function dependency relationship between the inherited method and redefined methods. The number of object/ memory allocation (NOMA) measures the total number of statements that allocated new objects or memory in a class. The advantage with this metrics is that classes with large numbers of objects allocation statement tend to introduce additional complexity for object / memory management (Li,1998). This therefore implies that the higher the NOMA, the higher the probability of detecting object management fault. The last metrics classified under new metrics is the average metrics complexity (AMC). It gives information on the average method size for each class. Counting is not done to pure virtual and inherited method. This is because accuracy of faults is facilitated by large methods if it contains more codes that small methods. Conclusion From the above discussion, object oriented metrics are designed to detect fault. From Chidamber and Kamerer (CK) metrics, the work is actually a good indicator and prediction for fault classes where as response for a class (RFC) is considered as good indicator for object oriented fault. However the advantage of these matrices together with other functions is mentioned. Apart from the six known CK metrics, there are often new metrics that have been developed from studies of CK metrics. The new metrics have been used to tell and predict which class need to be tested using object oriented testing techniques. The testing techniques include obtaining the p- value, goodness of fit, order ratio and analyzing the logistic regression coefficient. Otherwise with the knowledge of the types of metrics and their functions, it would be easier to know which metrics can affectively predict occurrence of a fault and their application. References. Basic, V.R, Briand, L.C, and Melo, W.L (1996). A validation of object oriented design metrics As quality indicators. IEEE .Translations on software engineering, 22 (10): 751 - 761. Chidamber, S.R and Kamerer, C.F. (1994). A metrics suite for object oriented design. IEE Transactions on software engineering, 20(6): 476 - 493. Fenton, N, E. (1991). Software metrics: A rigorous approach. London: Chapman and Hall. Harrison, W. (1980). Using software metrics to allocate testing resources. Journal of Management information system, 4(4): 93 - 105. Li, W. (1998), another metrics suite for object oriented programming, journal of systems and Software. 44: 155 - 162. Lorenz, M and Kidd, J. (1994). Object oriented software metrics London: Prentice Hall Inc. Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Object Oriented Metrics Essay Example | Topics and Well Written Essays - 2500 words”, n.d.)
Object Oriented Metrics Essay Example | Topics and Well Written Essays - 2500 words. Retrieved from https://studentshare.org/miscellaneous/1506104-object-oriented-metrics
(Object Oriented Metrics Essay Example | Topics and Well Written Essays - 2500 Words)
Object Oriented Metrics Essay Example | Topics and Well Written Essays - 2500 Words. https://studentshare.org/miscellaneous/1506104-object-oriented-metrics.
“Object Oriented Metrics Essay Example | Topics and Well Written Essays - 2500 Words”, n.d. https://studentshare.org/miscellaneous/1506104-object-oriented-metrics.
  • Cited: 0 times

CHECK THESE SAMPLES OF Object Oriented Metrics

(Institutional Affiliation) FORMAL REPORT COMPARING THE USE OF THE IDEF METHODOLOGY TO UML

b) UML The approach/rationale for UML is to act as the dominant, publicly accepted, and uniform objected oriented visual modeling language, and as a foundation object description language for the offshoot unified enterprise modeling language (UEML) that has been put forward by IFAC/IFIP (Bernus, Mertins, & Schmidt 1998, pg.... During the systems analysis phase, object-oriented analysis (OOA) is performed; its output is a conceptual model that is comprised of one (sometimes more) UML class diagram, a user-interface mock-up, a group of use cases, and a couple of interaction diagrams....
6 Pages (1500 words) Essay

The Identification Types of the Components of a Cluster

The paper "The Identification Types of the Components of a Cluster" concerns the application of aggregation functions such as summarization and average to derived values is based on conversions to absolute or ratio values.... Labels can be omitted if the types can be distinguished.... hellip; The disjointness for clusters can be weakened for relationship types....
6 Pages (1500 words) Assignment

Quality Dimensions in Computer Software

Object-oriented metrics approach is a representation of an entirely innovative system of that is able to handle a comparatively larger aggregate array of tasks than was hitherto possible.... n another interesting study, Schmidt (2000) is not particularly enthused about the fact that prior to the implementation of the object-oriented metrics, there is no mechanism that enables any credible quality assessment check to be conducted on it during the development process....
2 Pages (500 words) Essay

Attracting and Retaining Talent in the Current Environment

In the essay “Attracting and Retaining Talent in the Current Environment” the author examines the greatest challenge that faces organizations in the current business environment –  finding appropriately qualified and experienced candidates and retaining them.... hellip; This paper would explore ways and means as to how information systems strategy - ISS can be used to aid strategic human resource management - SHRM to attract and retain suitably qualified employees....
11 Pages (2750 words) Research Proposal

Approaches and Implementation Strategy for Julphars

Posting very high profit for the past 5 years it owns 400 medical stores.... Experiencing the value of retained knowledge firsthand the company has decided to leverage and invest more in… The company also plans to enlarge its customer base in other parts of world which are presently beyond its reach....
16 Pages (4000 words) Essay

Success of Different Traceability Tools

ntroductionTraceability tools assume a problem-solving oriented model that pinpoints the challenge applicable within a particular creation connected with the involvement of traceability matrices and is hugely vital in many software package engineering routines.... The paper "Success of Different Traceability Tools" studies traceability necessity methods implemented inside the examination in the stakeholder needs....
8 Pages (2000 words) Essay

Object and Data Modeling for a Car-Sharing System

A use case diagram is a simple demonstration of an end system users communication with the system.... Describing the specifications of this particular case scenario… The various functions that each end user can perform are also highlighted in the use case model. A detailed design of the case model aims to showcase all the major attributes of the systems functions expected to be The participants accessing the system, who can be either the diver or the customer, are both required to register on the system or sign up with their personal information....
6 Pages (1500 words) Assignment

Comparing the Use of the IDEF Methodology to UML

he approach/rationale for UML is to act as the dominant, publicly accepted, and uniform objected-oriented visual modeling language, and as a foundation object description language for the offshoot unified enterprise modeling language (UEML) that has been put forward by IFAC/IFIP (Bernus, Mertins, & Schmidt 1998, pg.... During the systems analysis phase, object-oriented analysis (OOA) is performed; its output is a conceptual model that is comprised of one (sometimes more) UML class diagram, a user-interface mock-up, a group of use cases, and a couple of interaction diagrams....
6 Pages (1500 words) Essay
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us