Michele Marchesi DIEE – Università di Cagliari p.za D’Armi, 09123 Cagliari michele@diee.unica.it Abstract UML is the emerging standard for expressing OOA/OOD models. In this paper, new metrics for ob- ject-oriented analysis models are introduced, and exist- ing ones are adapted to the entities and concepts of UML. In particular, these metrics concern UML use cases diagrams and class diagrams used during the OOA phase. The proposed metrics are intended to allow an early estimate of development efforts, implementa- tion time and cost of the system under development, and to measure its object-orientedness and quality since the beginning of the analysis phase. The proposed metric suite is described in detail, and its relations with proposed metrics found in literature are highlighted. Some measurements on three software projects are given. 1. Introduction A software metric is a mapping from a software de- velopment domain – like an analysis model or the source code of an application – to a numerical domain, usually the real numbers. This mapping defines an ordi- nal scale, in the sense that different objects belonging to the software domain can be ordered using the corre- spondent metric. To be useful, a metric must be strongly correlated with a quantitative or qualitative feature of the system. The aims of software metrics are essentially two: to give hints on the quality of the system and to es- timate its development and maintenance costs [1]. Recently, object-oriented technology (OOT) has emerged as the choice for software design and develop- ment, and its adoption is growing among software shops. This fact raises new issues in the field of software metrics, as software developed with OOT is very differ- ent from that developed using traditional, procedural ap- proaches. Moreover, OOT makes easier a formal soft- ware development process, since the same model un- derlies analysis, design, implementation and mainte- nance of a system. This fact has consequences also on metrics, as with OOT it is possible to develop sound metrics for OOA and OOD models, and many of these metrics will smoothly translate to corresponding source code metrics. Among others, proposal for metrics for OO systems are reported in [2], [3], [4], [5], [6]. In the past year, the Unified Modeling Language (UML) proposed by Booch, Jacobson and Rumbaugh [7] has emerged as a de-facto standard for expressing OOA/OOD models. This language is formally described in term of itself and is based on seven kinds of graphical diagrams. Among these diagrams, two seem particularly suited to be measured using formal metrics: Class Dia- grams and Use Case Diagrams (UCDs). The metrics proposed in this paper are focused on these two dia- grams. They exclusively use concepts and entities of UML, although could be adapted also to most other OOA notations. The proposed metrics are intended to allow an early measurement of object-orientedness and quality of the system under development, and to make early estimates of its development costs. Moreover, they are easily computed if the UML diagrams are stored in computerized form. In the following, it will be assumed that the reader has a fair knowledge of OOA/OOD con- cepts and of UML. For the sake of clarity, the UML keywords are highlighted in italics when encountered for the first time. The proposed metrics can be computed using quanti- tative measurements on UML diagrams. They were de- veloped starting from the author’s experience and from previous work found in the literature. The aim of the proposed metrics is the measurement of system com- plexity, of balancing of responsibilities among packages and classes, and of cohesion and coupling among system entities. It is common understanding that these features are strongly correlated with the development efforts and the quality of the system. However, as UML is a new standard and as significant software systems are devel- oped in years and not months or weeks, these metrics should be considered as a proposal. We will be able to evaluate their effectiveness and possibly to adapt and improve them, when data on actual projects developed OOA Metrics for the Unified Modeling Language Authorized licensed use limited to: Universita di Cagliari. Downloaded on January 18, 2010 at 08:05 from IEEE Xplore. Restrictions apply.