DOC PREVIEW
UMD CMSC 735 - A Quantitative Approach to Software Management and Engineering

This preview shows page 1-2-3-18-19-36-37-38 out of 38 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1UMCP - CSESEGCMSC 735A Quantitative Approach to Software Management and EngineeringModels and Measures (Product, OO)Mikael LindvallFraunhofer Center forExperimental Software EngineeringUMCP - CSESEGOutline– Product Metrics– The Object-Oriented Paradigm– Object-Oriented Metrics– Applications of OO metrics• Impact Analysis• Architectural Evaluation• Change of OO-systems2UMCP - CSESEGProduct MetricsUMCP - CSESEGProduct Metrics– Product metrics aim to:• Better understand the quality of the product• Assess the effectiveness of the process• Improve the quality of work performed– By measuring on the produced artifacts in a cost-efficient way!3UMCP - CSESEGWhat are the produced artifacts?abc de f123Program ado while Xcall b;call c;call dend while;Subroutine ccall e;if y then call fend;SpecificationDesign ImplementationTest casesUMCP - CSESEGWhat are the possible metrics?abc de f123Program ado while Xcall b;call c;call dend while;Subroutine ccall e;if y then call fend;SpecificationDesign ImplementationFunction PointsPages of documentationEstimated lines of code...CohesionCouplingComplexityNumber of Modules...Cyclomatic complexityHalstead’s theoryLines of codeData bindingsSpan...Test casesCoverageReliability...4UMCP - CSESEGWhat are the object-oriented metrics?• If we understand the characteristics of OO• Then we can define OO metrics• Let’s start from the beginning….UMCP - CSESEGThe Object-Oriented Paradigm5UMCP - CSESEGThe Object Oriented Paradigm• Organizes software as objects • Objects incorporate both data and behavior (attributes and methods)• Characteristics:Identity*Abstraction Classification*EncapsulationInheritance*PolymorphismPersistenceUMCP - CSESEGIdentityObject have states and behaviorsA reference (handle) distinguishes different objects6UMCP - CSESEGClassificationObjects with the same features (attributes and behaviors) are grouped into a classEach class defines a possibly infinite set of objectsUMCP - CSESEGClassificationBicycle objectsBicycle classAttributesframe sizewheel sizegearsmaterialMethodsshiftmoverepairabstractintoPolygon objectsabstractintoPolygon classAttributesverticesborder colorfill colorMethodsdrawerasemove7UMCP - CSESEGInheritanceInheritance is the sharing of properties among classesProperties are attributes and behaviors A class can be general and specialized into subclassesEach subclass incorporates or inherits all the properties of its superclass(es)UMCP - CSESEGStructure identificationPersonnameageDoctorOfficeattend_patient()NursehospitalSurgeonspecialtyFamily Doctorhome addressSurgeonnameageofficespecialtyattend_patient()Family Doctornameageofficehome addressattend_patient()NursenameagehospitalDoctornameageofficeattend_patient()nameattributesmethod(s)inheritancecommunication8UMCP - CSESEGObject-Oriented MetricsUMCP - CSESEGComplexity, Coupling and Cohesion• Complexity– Everything is about complexity– Coupling, Size, Number of methods etc• Coupling– The degree of interdependence between parts– Two parts are coupled when one part uses another part– Parts can be systems, subsystems, modules, classes• Cohesion– Refers to the internal consistency within parts– High if methods share variables9UMCP - CSESEGGeneral Guidelines• Complexity: keep low• Coupling: keep low• Cohesion: keep high• Why?UMCP - CSESEGGeneral Guidelines• Complexity: keep low– Easier to understand• Coupling: keep low– Easier to change• Cohesion: keep high– Easier to replace and control10UMCP - CSESEGChidamber and Kemerer’s Metrics SuiteProbably the most well-known set of OO metricsThe suite is complete and based on OO characteristics• Weighted Methods per Class (WMC) • Depth of Inheritance (DIT)• Number of children (NOC)• Coupling Between Objects (CBO)• Response for a class (RFC)*• Lack of Cohesion in Methods (LCOM)Ref: Chidamber94UMCP - CSESEGWeighted Methods per Class (WMC)• If Class C1 has methods M1…Mn, and• c1…cn is the complexity of each method• Then:• If all method complexities are considered to be equal, then WMC = n, the number of methods.∑==niicWMC1Family Doctornameageofficehome addressattend_patient()WMC = 111UMCP - CSESEGDepth of Inheritance (DIT)• Depth of inheritance of the class is the DIT metric for the class. PersonnameageDoctorOfficeattend_patient()NursehospitalSurgeonspecialtyFamily Doctorhome addressDIT = 3UMCP - CSESEGNumber of children (NOC)• NOC equals the number of immediate subclassesPersonnameageDoctorOfficeattend_patient()NursehospitalSurgeonspecialtyFamily Doctorhome addressNOC = 212UMCP - CSESEGCoupling Between Objects (CBO)• CBO for a class is a count of the number of other classes to which it is coupledPersonnameageNurseOfficeattend_patient()NursehospitalSurgeonspecialtyFamily Doctorhome addressDoctornameageofficeattend_patient()CBO = 1UMCP - CSESEGLack of Cohesion in Methods (LCOM)• Class C1 has m methods • Class C1 has a attributes• LCOM measures the level of use of attributes among methods13UMCP - CSESEGLack of Cohesion in Methods (LCOM)Family Doctornameageofficehome addressattend_patient()cure_patient()bill_patient()nameageofficehome addresscure_patient()attend_patient()bill_patient()LCOM=Maxnameageofficehome addresscure_patient()attend_patient()bill_patient()LCOM=MinUMCP - CSESEGBibliography• Fowler97. Martin Fowler and Kendall Scott, UML Distilled: Applying the standard object modeling language, Addison-Wesley, 1997• Booch94. Grady Booch, Object-Oriented Analysis and Design with Applications, The Benjamin/Cummings Publishing Company, Inc, second edition, 1994• Lorenz94. Lorenz, M., and J. Kidd, Object-Oriented Software Metrics, Prentice-Hall, 1994• Chidamber94. Chidamber, S.R. and Kemerer, C. F.; A Metrics Suite for Object Oriented Design, IEEE Transactions on Software Engineering, vol.20, no6, June 1994.• Basili95. Basili, Victor R.; Briand, Lionel and Melo, Walcelio; A validation of Object-Oriented design metrics, Communications of the ACM, XXX14UMCP - CSESEGApplication of Object-Oriented Metrics3 Case studiesUMCP - CSESEGChange-Management inObject-Oriented Software EvolutionMikael Lindvall15UMCP - CSESEGOutline• Requirements-Driven Impact Analysis (RDIA)– What it is– Why developers do it• The empirical study– The PMR Project and RDIA– Research Questions– Evaluation of RDIA• SummaryUMCP - CSESEGRequirements-Driven Impact Analysis(RDIA)The activity of determining how new requirements (defined, but not


View Full Document

UMD CMSC 735 - A Quantitative Approach to Software Management and Engineering

Download A Quantitative Approach to Software Management and Engineering
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view A Quantitative Approach to Software Management and Engineering and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view A Quantitative Approach to Software Management and Engineering 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?