Software Metrics Past Paper PDF SCP-PF113

Summary

This document is a collection of lecture notes on Software Metrics for a particular course at St. John Paul II College of Davao. The lecture notes cover topics such as software metric classifications, size metrics, token count, function points, object-oriented metrics, and service-oriented architecture metrics.

Full Transcript

ST. JOHN PAUL II COLLEGE OF DAVAO COLLEGE OF INFORMATION AND COMMUNICATION TECHNOLOGY Physically Detached Yet Academically Attached Week 8 Lesson Title Software Metrics Determine the qualit...

ST. JOHN PAUL II COLLEGE OF DAVAO COLLEGE OF INFORMATION AND COMMUNICATION TECHNOLOGY Physically Detached Yet Academically Attached Week 8 Lesson Title Software Metrics Determine the quality of the current product or process to Learning Outcome(s) improve that quality and predict the quality once the software development project is complete. At SJPIICD, I Matter! LEARNING INTENT! Terms to Ponder Software metric is a standard of measure of a degree to which a software system or process possesses some property. Size metric is a direct measure of software. Object Oriented metrics focus on class and design characteristics and can be used to measure the quality of an object-oriented design. Service-oriented architecture defines a way to make software components reusable via service interfaces. Component-Based Software Engineering: Methods and Metrics enhances the basic understanding of components by defining categories, characteristics, repository, interaction, complexity, and composition. Essential Content Definition of Software Metrics Many definitions for software metrics but the most widely used is a measure for the pieces or characteristics of applications in their life cycle, which mapping the modules of an application to numerical values. SCP-PF113 | 67 ST. JOHN PAUL II COLLEGE OF DAVAO COLLEGE OF INFORMATION AND COMMUNICATION TECHNOLOGY Physically Detached Yet Academically Attached Software Metrics Classifications There are many classifications for software metrics in the literature. There are three main types: Products: Explicit results of software development activities, deliverable, documentation, by products. Processes: Activities related to production of software. Resources:Inputs into the software development activities hardware, knowledge, people. Other researches classify the software metrics as follows: Implementation metrics, Testing metrics, Designing metrics, Management metrics and son on. A classification for software metrics based on software engineering approaches : Object Oriented metrics , Service Oriented Architecture metrics, Component Based Software Engineering metrics. In addition to the most commonly type used Size metrics. Types Of Software Metrics I. SIZE METRICS - Lines of Code (LOC) It is the number of lines of code in application that includes the namespace, classes, and methods. In addition to blank lines, comment lines, data declarations. There is another metric of line of code called Non-Commented LOC (NCLOC). It is the same of LOC, but it did not consider the blank lines, comment lines, data declarations. Because these things do not use by the application. See figure 1. The usage of LOC as follows: determine the size of modules to estimate the time or the requirement in implementation or maintenance. For example, the Windows NT 3.1 contains 4-5 million LOC, but Windows SCP-PF113 | 68 ST. JOHN PAUL II COLLEGE OF DAVAO COLLEGE OF INFORMATION AND COMMUNICATION TECHNOLOGY Physically Detached Yet Academically Attached 2003 server contains 50 million LOC, and that gives us an overview of the huge difference between the two systems. Figure 1. Example Lines of Code (LOC). Image source: Ali A. Aljadaa. December 2014. Software Metrics. https://www.researchgate.net/publication/272830375_Software_Metrics - Token Count Each software is considered to be a summation of tokens, which may be operators or operands. n1 = number of unique operators n2 = number of unique operands. N1 = number of total occurrences of operators. N2 = number of total occurrence of operands. Token Count = N1 + N2 - Function Points (FP) LOC is not the only way to measure size of software. the other way is function points (FP), and defined as ” a unit of measurement to express the amount of business functionality an information system (as a product) provides to a user”. This metric comprise software in five major components: 1. Number of external inputs, low complexity, 3; high complexity, 6. 2. Number of external outputs,low complexity, 4; high complexity, 7. 3. Number of logical internal files, low complexity, 7; high complexity, 15. SCP-PF113 | 69 ST. JOHN PAUL II COLLEGE OF DAVAO COLLEGE OF INFORMATION AND COMMUNICATION TECHNOLOGY Physically Detached Yet Academically Attached 4. Number of external interface files, low complexity, 5; high complexity, 10. 5. Number of external inquiries, low complexity 3; high complexity, 6. To calculate the FP you must calculate function count (FC) as following formula: Figure 2. FC Formula Image source: Ali A. Aljadaa. December 2014. Software Metrics. https://www.researchgate.net/publication/272830375_Softw are_Metrics Where W the weighting factors of five components. X are the count of each component in software. Then we must calculate the value adjustment factor (VAF) as following formula: Figure 3. V AF Formula Image source: Ali A. Aljadaa. December 2014. Software Metrics. https://www.researchgate.net/publication/272830375_Softw are_Metrics Where C is the score for general system characteristic i. -Note: you can see the list of general system characteristic in. Finally, calculate the FP as following formula: Figure 4. FP Formula Image source: Ali A. Aljadaa. December 2014. Software Metrics. https://www.researchgate.net/publication/272830375_Software_Metrics II. OBJECT ORIENTED METRICS - Coupling between Objects (CBO) CBO refers to the number of coupled classes with a specific class in other words, rate of number of links between number of classes. See formula: Figure 5. CBO Formula Image source: Ali A. Aljadaa. December 2014. Software Metrics. https://www.researchgate.net/publication/272830375_Sof tware_Metrics SCP-PF113 | 70 ST. JOHN PAUL II COLLEGE OF DAVAO COLLEGE OF INFORMATION AND COMMUNICATION TECHNOLOGY Physically Detached Yet Academically Attached If the CBO = 0, it means that the class do not have any relation with other classes in the system, and maybe it is not a part of the system. The normal value for CBO is between 1 to 4 and that gives us the class can be more reusable. Over that means too tightly coupled class which make the testing and upgrading the system more complex. - Depth of Inheritance Tree (DIT) DIT refers to the maximum inheritance path from the nood to the root class. Example, In Java language any class has a java.lang.Object as super class (root). The DIT value of the class java.lang.Object is 0, and any subclass of this calss has DIT value 1, then any subclass of that class will have a value 2 of DIT metric, and so on. Figure 5. Example of DIT Image source: Ali A. Aljadaa. December 2014. Software Metrics. https://www.researchgate.net/publication/272830375_Software_Metrics - Number of Children (NOC) NOC means the number of immediate subclasses subordinated to a class hierarchy. In other simple words, it is the number of subclasses of class. The normal range of NOC value is between 1 to 4. More childs of class means more reusability, and that indicates the class it may require more testing of its own methods. SCP-PF113 | 71 ST. JOHN PAUL II COLLEGE OF DAVAO COLLEGE OF INFORMATION AND COMMUNICATION TECHNOLOGY Physically Detached Yet Academically Attached Figure 6. Example of NOC Image source: Ali A. Aljadaa. December 2014. Software Metrics. https://www.researchgate.net/publication/272830375_Software_Metrics - Weight Methods per Class (WMC): In object oriented programming there is at least one method for each class. WMC refers to the summation of complexity of all methods for a specific class. Figure 6. Example of WMC Image source: Ali A. Aljadaa. December 2014. Software Metrics. https://www.researchgate.net/publication/ 272830375_Software_Metrics The importance of this metric are in three things.  Firstly, number of methods and summation of complexity of them, predict the time required to implementation and maintenance.  Secondly, the large number of methods effects directly childrens, because they inherit all methods.  Finally, the larger number of methods in class make it more specific, and that means less reuse. SCP-PF113 | 72 ST. JOHN PAUL II COLLEGE OF DAVAO COLLEGE OF INFORMATION AND COMMUNICATION TECHNOLOGY Physically Detached Yet Academically Attached - Response For a Class (RFC) RFC refer to the number of the methods that can be called in response to a message or invoke a specific class III. SERVICE ORIENTED ARCHITECTURE METRICS 1. Number of Services (NS) NS is the count of services in the system. The range value of NS is from 0 to infinity. 2. Network Cohesion in the System( NCY) This metric used to identify the number of direction relations between the nodes in the software. 3. Services Interdependence in the System (SIY) This metric represents the number of pairs of services which depend on each other. 4. Absolute Importance of the Service (AIS) This metric represents the number of clients which depends on one service. 5. Sizes of Input and Output Messages It is ”The number of arguments of a method (of a function, of an operation, etc.)”. IV. COMPONENT BASED SOFTWARE ENGINEERING METRICS 1. Time to Use This metric used to estimate the time need for developer to learn how to use the component. 2. Required Interfaces This metric refer to the number of interfaces requires to operate the component from others. 3. Error of Propagation This metric used as physical security, which means the ability of random error in the information transmitted from Component X to Y results in an erroneous state of Y. SCP-PF113 | 73

Use Quizgecko on...
Browser
Browser