Software Engineering Unit-II
Software Engineering Unit-II
Unit-II
Software Measurement:
• A measurement is a manifestation of the size, quantity, amount,
or dimension of a particular attribute of a product or process.
• Software measurement is a titrate impute of a characteristic of a
software product or the software process.
• It is an authority within software engineering. The software
measurement process is defined and governed by ISO
Standard.
Software Measurement Principles
1.Product Metrics: Product metrics are used to evaluate the state of the product,
tracing risks and undercover prospective problem areas. The ability of the team to
control quality is evaluated. Examples include lines of code, cyclomatic
complexity, code coverage, defect density, and code maintainability index.
2.Process Metrics: Process metrics pay particular attention to enhancing the
long-term process of the team or organization.These metrics are used to optimize
the development process and maintenance activities of software.Examples
include effort variance, schedule variance, defect injection rate, and lead time.
3.Project Metrics: The project metrics describes the characteristic and execution
of a project. Examples include effort estimation accuracy, schedule deviation, cost
variance, and productivity.Usually measures-
3. Number of software developer
4. Staffing patterns over the life cycle of software
5. Cost and schedule
6. Productivity
Advantages of Software Metrics
Cyclomatic complexity= E - N + 2
Where, E is total number of edges and N is total number of nodes.
• So, the Cyclomatic complexity can be calculated as
Given,
E = 10,
N=8
So,
Cyclomatic complexity
=E-N+2
= 10 – 8 + 2
=4
Data Structure Metrics
• Where (LV) is the average live variable metric computed from the ith
module. This equation could compute the average span size (SP) for a
program of n spans.
Program weakness
• Program weakness depends on its Modules weakness. If Modules are
weak(less Cohesive), then it increases the effort and time metrics required
to complete the project.
• Where Wi is the weight factor for the ith variable and Xi={-
1,0,+1} the estimator gives Xi one of the values -1, 0 or
+1 depending on the variable decreases, has no effect or
increases the productivity.
COCOMO Model
• Boehm proposed COCOMO (Constructive Cost Estimation Model) in
1981.COCOMO is one of the most generally used software estimation
models in the world. COCOMO predicts the efforts and schedule of a
software product based on the size of the software.
The necessary steps in this model are:
1.Get an initial estimate of the development effort from evaluation of
thousands of delivered lines of source code (KDLOC).
2.Determine a set of 15 multiplying factors from various attributes of
the project.
3.Calculate the effort estimate by multiplying the initial estimate with
all the multiplying factors i.e., multiply the values in step1 and step2.
COCOMO Model
• The initial estimate (also called nominal estimate) is determined
by an equation of the form used in the static single variable
models, using KDLOC as the measure of the size. To determine
the initial effort Ei in person-months the equation used is of the
type is shown below
• Ei=a*(KDLOC)b
• The value of the constant a and b are depends on the project
type.
Projects Category
• Projects are categorized into three types:
1. Organic: A development project can be treated of the organic
type, if the project deals with developing a well-understood
application program, the size of the development team is
reasonably small, and the team members are experienced in
developing similar methods of projects. Examples of this type
of projects are simple business systems, simple
inventory management systems, and data processing
systems.
Projects Category
2. Semidetached: A development project can be treated with
semidetached type if the development consists of a mixture of
experienced and inexperienced staff. Team members may have
finite experience in related systems but may be unfamiliar with
some aspects of the order being developed. Example of
Semidetached system includes developing a new
operating system (OS), a Database Management System
(DBMS), and complex inventory management system.
Projects Category
• Embedded: A development project is treated to be of an
embedded type, if the software being developed is strongly
coupled to complex hardware, or if the stringent regulations on
the operational method exist. For Example: ATM, Air Traffic
control.
• For three product categories, Bohem provides a different set of
expression to predict effort (in a unit of person month)and
development time from the size of estimation in KLOC(Kilo
Line of code) efforts estimation takes into account the
productivity loss due to holidays, weekly off, coffee breaks, etc.
Software Cost Estimation Stages
• According to Boehm, software cost estimation should be done
through three stages:
1.Basic Model
2.Intermediate Model
3.Detailed Model
Basic Model
• The basic COCOMO model provide an accurate size of the project
parameters. The following expressions give the basic COCOMO estimation
model:
Effort=a1*(KLOC) a2 PM
Tdev=b1*(efforts)b2 Months
Where
KLOC is the estimated size of the software product indicate in Kilo Lines of
Code,
a1,a2,b1,b2 are constants for each group of software products,
Tdev is the estimated time to develop the software, expressed in months,
Effort is the total effort required to develop the software product, expressed
in person months (PMs).
Basic Model
• Estimation of development effort
For the three classes of software products, the formulas for estimating the
effort based on the code size are shown below:
Organic: Effort = 2.4(KLOC) 1.05 PM
Semi-detached: Effort = 3.0(KLOC) 1.12 PM
Embedded: Effort = 3.6(KLOC) 1.20 PM
Estimation of development time
For the three classes of software products, the formulas for estimating the
development time based on the effort are given below:
Organic: Tdev = 2.5(Effort) 0.38 Months
Semi-detached: Tdev = 2.5(Effort) 0.35 Months
Embedded: Tdev = 2.5(Effort) 0.32 Months
Intermediate Model
• The basic Cocomo model considers that the effort is only a function
of the number of lines of code and some constants calculated
according to the various software systems. The intermediate
COCOMO model recognizes these facts and refines the initial
estimates obtained through the basic COCOMO model by using a set
of 15 cost drivers based on various attributes of software engineering.
• Classification of Cost Drivers and their attributes:
Product attributes -
• Required software reliability extent
• Size of the application database
• The complexity of the product
Intermediate Model
Hardware attributes -
• Run-time performance constraints
• Memory constraints
• The volatility of the virtual machine environment
• Required turnabout time
Personnel attributes -
• Analyst capability
• Software engineering capability
• Applications experience
• Virtual machine experience
• Programming language experience
Intermediate Model
Project attributes -
• Use of software tools
• Application of software engineering methods
• Required development schedule
Detailed COCOMO Model
• Detailed COCOMO incorporates all qualities of the standard
version with an assessment of the cost driver?s effect on each
method of the software engineering process. The detailed model
uses various effort multipliers for each cost driver property. In
detailed cocomo, the whole software is differentiated into
multiple modules, and then we apply COCOMO in various
modules to estimate effort and then sum the effort.
The Six phases of detailed COCOMO are:
1.Planning and requirements
2.System structure
3.Complete structure
4.Module code and test
5.Integration and test
6.Cost Constructive model
The effort is determined as a function of program estimate, and a set of
cost drivers are given according to every phase of the software
lifecycle.
Putnam Resource Allocation Model