Object-Oriented Metrics

Slides:



Advertisements
Similar presentations
SPEC Workshop 2008 Laboratory for Computer Architecture1/27/2008 On the Object Orientedness of C++ programs in SPEC CPU 2006 Ciji Isen & Lizy K. John University.
Advertisements

Metrics for OO Design Distinct & measurable characteristics of OO design:- Size:-it is defined as – population,volume,length & functionality Population.
Software Metrics for Object Oriented Design
Figures – Chapter 24.
Metrics for Object Oriented Design Shyam R. Chidamber Chris F. Kemerer Presented by Ambikadevi Damodaran.
Applying and Interpreting Object Oriented Metrics
March 25, R. McFadyen1 Metrics Fan-in/fan-out Lines of code Cyclomatic complexity Comment percentage Length of identifiers Depth of conditional.
Nov R. McFadyen1 Metrics Fan-in/fan-out Lines of code Cyclomatic complexity* Comment percentage Length of identifiers Depth of conditional.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Object Oriented Design
Page 1 Building Reliable Component-based Systems Chapter 7 - Role-Based Component Engineering Chapter 7 Role-Based Component Engineering.
Object-Oriented Metrics. Characteristics of OO ● Localization ● Encapsulation ● Information hiding ● Inheritence ● Object abstraction.
Design Metrics Software Engineering Fall 2003 Aditya P. Mathur Last update: October 28, 2003.
Software engineering for real-time systems
Software Metrics II Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001.
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
Software Engineering Metrics for Object Oriented Programming Developed by – Shrijit Joshi.
March R. McFadyen1 Software Metrics Software metrics help evaluate development and testing efforts needed, understandability, maintainability.
1 Complexity metrics  measure certain aspects of the software (lines of code, # of if-statements, depth of nesting, …)  use these numbers as a criterion.
PVK-Ht061 Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance Maintenance.
Predicting Class Testability using Object-Oriented Metrics M. Bruntink and A. van Deursen Presented by Tom Chappell.
Object Oriented Metrics XP project group – Saskia Schmitz.
Database Complexity Metrics Brad Freriks SWE6763, Spring 2011.
Comp 587 Parker Li Bobby Kolski. Automated testing tools assist software engineers to gauge the quality of software by automating the mechanical aspects.
Chidamber & Kemerer Suite of Metrics
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
“Enhancing Reuse with Information Hiding” ITT Proceedings of the Workshop on Reusability in Programming, 1983 Reprinted in Software Reusability, Volume.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Refactoring.
Paradigm Independent Software Complexity Metrics Dr. Zoltán Porkoláb Department of Programming Languages and Compilers Eötvös Loránd University, Faculty.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Software Measurement & Metrics
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 15b: Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6/e Chapter.
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
Concepts of Software Quality Yonglei Tao 1. Software Quality Attributes  Reliability  correctness, completeness, consistency, robustness  Testability.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Metrics and lessons learned for OO projects Kan Ch 12 Steve Chenoweth, RHIT Above – New chapter, same Halstead. He also predicted various other project.
An Automatic Software Quality Measurement System.
CSc 461/561 Information Systems Engineering Lecture 5 – Software Metrics.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
Measurement and quality assessment Framework for product metrics – Measure, measurement, and metrics – Formulation, collection, analysis, interpretation,
Object-Oriented (OO) estimation Martin Vigo Gabriel H. Lozano M.
Ontology Support for Abstraction Layer Modularization Hyun Cho, Jeff Gray Department of Computer Science University of Alabama
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Object Oriented Metrics
Rohini Sharma Roll No. RA1809A01 Regd. No M.Tech.(CSE) Part Time 3 rd Semester.
Software Engineering Lecture 19: Object-Oriented Testing & Technical Metrics.
1 OO Technical Metrics CIS 375 Bruce R. Maxim UM-Dearborn.
Software Engineering Object Oriented Metrics. Objectives 1.To describe the distinguishing characteristics of Object-Oriented Metrics. 2.To introduce metrics.
Ch 7: From Modules to Objects (Part Two) CSCI 4320.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
OBJECT-ORIENTED DESIGN JEAN SIMILIEN. WHAT IS OBJECT-ORIENTED DESIGN? Object-oriented design is the process of planning a system of interacting objects.
Object Oriented Programming in Java Habib Rostami Lecture 2.
Design Metrics CS 406 Software Engineering I Fall 2001 Aditya P. Mathur Last update: October 23, 2001.
Object Oriented Systems Design
Object Oriented Metrics
Software Metrics 1.
CHAPTER 5 GENERAL OOP CONCEPTS.
Course Notes Set 12: Object-Oriented Metrics
Design Characteristics and Metrics
Towards a Multi-paradigm Complexity Measure
Object-Oriented Metrics
Design Metrics Software Engineering Fall 2003
Design Metrics Software Engineering Fall 2003
Information flow-Test coverage measure
Mei-Huei Tang October 25, 2000 Computer Science Department SUNY Albany
Software Metrics SAD ::: Fall 2015 Sabbir Muhammad Saleh.
PPT6: Object-oriented design
Chapter 8: Design: Characteristics and Metrics
Presentation transcript:

Object-Oriented Metrics

Characteristics of OO Localization Encapsulation Information hiding Inheritence Object abstraction

localization Is a process of placing items in close proximity to each other - OO approaches localize information around objects which means that: - metrics identification and gathering effort recognize “object” as the basis unit of software - within systems of objects, the localization between functionality and objects is not one-to-one relationship. for example one function may involve several objects, and one object may provide many functions

Encapsulation Is the packaging (or binding together) of a collection items - in oo programming languages, encapsulating mechanisms are eg. C++'s classes, Ada's pakages, and modula 3's modules - objects encapsulate: = knowledge of state, advertised capabilities (sometimes called operations, method interfaces, method selectors, or method interfaces), methods, [in the case of composite objects] other objects, [optionally] exceptions, constants,

Encapsulation Impact on metrics: - the basic unit will be object - modify thinking on characterizing and estimating systems

Information hiding Is the suppression (or hiding) of details - The general idea is that we show only that information which is necessary to accomplish our immediate goals. -Information hiding plays a direct role in such metrics as object coupling and the degree of information hiding

Inheritence Is a mechanism whereby one object acquires characteristics from one, or more, other objects - Some object oriented languages support only single inheritance, i.e., an object may acquire characteristics directly from only one other object -Some object-oriented languages support multiple inheritance, i.e. an object may acquire characteristics directly from two, or more, different objects

Abstraction Is a mechanism for focusing on the important details of a concept or items, while ignoring the inessential details - In object abstraction, we treat objects as high-level entities (i.e., as black boxes). -

Morris's OO Metrics Method per class From the standpoint of code reuse ... a large number of methods per object class is desirable because subclasses tend to inherit a larger number of methods from superclasses. It was seem that extensibility will suffer if the number of methods per object class gets too large. A larger number of methods per object class is likely to complicate testing due to the increased object size and complexity. Total no. of methods No. of Methods per Object Class = -------------------------- Total No. of Object Classes

Morris's OO Metrics Inheritance Denpendencies -Inheritance tree depth is likely to be more favorable than breadth in terms of reusability via inheritance. Deeper inheritance trees would seem to promote greater method sharing than would broad trees. -A deep inheritance tree may be more difficult to test than a broad one. -Comprehensibility may also be diminished with a large number inheritance layers Inheritance Tree Depth = max{Inheritance Tree Path Length}

Morris's OO Metrics Degree of coupling between objects -A higher degree of coupling between objects is likely to complicate application maintenance because object interconnections and interactions are more complex. -The higher the degree of object independence (i.e. the more 'uncoupled' objects are from each other) the more likely it is that objects will suitable for reuse within the same applications and within other applications. -Uncoupled objects should be easier to augment than those with a high degree of 'uses' dependencies, due to the lower degree of interaction. -Testability is likely to degrade with a more highly coupled system of objects. -Object interaction complexity associated with coupling can lead to increased error generation during development.

Morris's OO Metrics Degree of coupling between objects Average No. of Uses Dependencies per Object Total No. of Arcs = ------------------- Total No. of Objects

Morris's OO Metrics Degree of cohesion of objects -Objects which are less dependent on other objects for data are likely to be more reusable. -Low cohesion is likely to produce a higher degree of errors in the development process. Low cohesion adds complexity which can translate into a reduction in application reliability. Degree of cohesion of Object Total Fain-in for all Objects = ----------------------------------- Total No. of Objects

Morris's OO Metrics Object Library Effectiveness -If objects are actually being designed to be reusable beyond a single application, then the effects should appear in object library usage statistics. Average Number of object reuse Total Number of Objects Reuse = ----------------------------------- Total No. of Library Objects

Morris's OO Metrics Factoring Effectiveness -the more highly factored an application is, the smaller the number of implementation locations for the average method. -The more highly factored an inheritance hierarchy is the greater degree to which method reuse is likely to occur. -Highly factored applications are likely to be more reliable for reasons similar to those which argue that such applications are more maintainable. The smaller the number of implementation locations for the average task, the less likely that errors were made during coding factoring effectiveness Number of Unique Methods = ----------------------------------- Total number of Methods

Morris's OO Metrics Average Method Complexity -More complex methods are likely to be more difficult to maintain. -Greater method complexity is likely to lead to a lower degree of overall application comprehensibility. -Greater method complexity is likely to adversely affect application reliability. -More complex methods are likely to be more difficult to test. Sum of V(g) of all Methods = ----------------------------------- Total number of application Methods

Chidamber and Kemerer Metrics There are many existing proposed measures developed specifically for object-oriented systems The representative work conducted by Chidamber and kemerer (1994 in IEEE Trans Software engineering) proposed 6 major metrics WMC (Weighted Methods per Class) For a class C with methods M1, M2, …, Mn, weighted respectively with complexity X1,X2,…,Xn, WMC is calculated as the sum of Xu, u = 1 ~ n DIT (Depth of Inheritance Tree) The length of the maximum path from the node to the root of the inheritance tree

NOC (Number of Children) The number of immediate successors of the class CBO (Coupling Between Object Classes) the number of other classess to which the class is coupled RFC (Response for Class) the number of local methods plus the number of methods called by the local methods LCOM (Lack of Cohesion Metric) the number of disjoint (non-intersection) sets of local methods Li and Henry (1995) conducted empirical study and concluded that these metrics can predict maintenance effort