SOFTWARE QUALITY METRICS
Enviado por Flippy69 • 3 de Marzo de 2013 • 7.207 Palabras (29 Páginas) • 401 Visitas
page 1
SOFTWARE QUALITY METRICS
for
Object Oriented
System Environments
SATC-TR-95-1001
JUNE 1995
National Aeronautics and Space Administration
Goddard Space Flight Center, Greenbelt Maryland 20771
Software
Assurance
Technology
Center
page 2
TABLE OF CONTENTS
I. Introduction
II. Metrics Overview
III. Object-Oriented Overview
IV. Metrics for Object-Oriented Systems
A. Metric Evaluation Criteria
B. Traditional Metrics for Object-Oriented Systems
1. Methods
Metric 1: Cyclomatic Complexity
Metric 2: Lines of Code
C. Object-Oriented Specific Metrics
1. Classes
a. Methods
Metric 3: Weighted Methods per Class (WMC)
b. Messages
Metric 4: Response for a Class (RFC)
c. Cohesion
Metric 5: Lack of Cohesion of Methods (LCOM)
d. Coupling
Metric 6: Coupling Between Object Classes (CBO)
2. Inheritance
Metric 7: Depth of Inheritance Tree (DIT)
Metric 8: Number of Children (NOC)
D. Example
E. Summary
1. Metric Summary
2. COTS for Recommended Object-Oriented Metrics
V. Conclusions
Appendix A: Comprehensive Listing of Object-Oriented Metrics
Appendix B: Object-Oriented Detailed Discussion
1. Object
a. States/Attributes
b. Operations
c. Object Example
2. Class
3. Inheritance
4. Messages
5. Cohesion
6. Polymorphism
7. Object-Oriented Languages
8. Terminology
Appendix C: Cots Packages
Appendix D: Object-Oriented References
page 3
TABLES
Table 1: SATC Metrics for Object-oriented Systems
Table 2: Key Object-Oriented Definitions
Table 3: Summary of Recommended Object-Oriented Metrics
Table 4: Object-Oriented Metrics Supported by COTS
FIGURES
Figure 1: Pictorial Description of Key Object-Oriented Terms
Figure 2: Geometric Classes with Attribute, Operations and Methods
Figure 3: Pseudocode for Perimeter of an Equilateral Triangle
Figure 4: Notation of an Object
Figure 5: Sample Object
Figure 6: Conceptual View
Figure 7: Class with Objects
Figure 8: Inheritance Network
Figure 9: Message Passing
page 4
Software Quality Metrics for Object-Oriented System Environments
I. INTRODUCTION
Object-oriented analysis and design are popular concepts in today’s software development environment. They
are often heralded as the silver bullet for solving software problems,; while in reality there is no silver bullet,
object-oriented has proved its value for systems that must be maintained and modified. Object-oriented
software development requires a different approach from more traditional functional decomposition and data
flow development methods. While the functional and data analysis approaches commence by considering the
systems behavior and/or data separately; object-oriented analysis approaches the problem by looking or system
entities that combine them. Object-oriented analysis and design focuses on objects as the primary agents
involved in a computation; each class of data and related operations are collected into a single system entity.
The concepts of software metrics are well established, and many metrics relating to product quality have been
developed and used. The SATC applies a model for evaluating software quality that has four goals:
(1) Stability of Requirements and Design, (2) Product Quality, (3) Testing Effectively, and
(4) Implementation Effectively. With object-oriented analysis and design methodologies gaining popularity, it
is time to start investigating object-oriented metrics with respect to these goals. We are interested in the
answer to the following questions:
· What concepts and structures in object-oriented affect the quality of the software?
· Can traditional metrics measure the critical object-oriented structures?
· If so, are the threshold values for the metrics the same for object-oriented designs as for
functional/data designs?
· Which of the many new metrics found in literature are useful to measure the critical concepts in
object-oriented?
This report summarizes results of the SATC’s research on metrics for object-oriented systems. We start with a
brief discussion of the metrics recommended by the SATC for object-oriented systems. These metrics include
modifications of “traditional” metrics as well as “new” metrics for specific object-oriented structures. Since the
object-oriented metrics require a cursory understanding of the object-oriented concepts, Section III presents a
pictorial representation of the basic object-oriented structures and defines the key terms. A more extensive
explanation of the object-oriented structures is in Appendix B and is referenced by Section III. In Section IV,
we discuss the proposed object-oriented metrics with respect to the SATC Software Quality Model,
specifically, their relationship to the attributes of quality (Goal 2: Product Quality -Structure/Architecture,
Reuse, Maintainability). In the summary, we will address the availability of COTS packages to facilitate the
collection of these metrics. Details on the COTS packages are given in Appendix C.
II. OVERVIEW - OBJECT-ORIENTED METRICS
In this report, the SATC documents its research into the current status of object-oriented metrics. The
research was done by surveying the literature on object-oriented metrics then applying the SATC experience in
traditional software metrics to select the object-oriented metrics that support the goal of measuring design and
code quality. In addition, we required that a metric be feasible and have a clear relationship to the objectoriented
structures being measured. At this time, many proposed object-oriented metrics lack a theoretical
basis and have not yet been validated. Some of these metrics are too labor intensive to collect, or are too
dependent on the implementation technology. The object-oriented metrics proposed by the SATC can be
related to desirable software qualities.
The SATC’s approach to identifying a set of object-oriented metrics was to focus on the primary, critical
constructs of object-oriented design and to select metrics that apply to those areas. The suggested metrics are
page 5
...