Lect19 20 PDF
Lect19 20 PDF
[email protected]
Office FST-B107, Tel. ext. 2740
Topics covered
What is
Quality?
software
+ measures
Approaches to quality:
Quality of the product versus quality of the process.
Check whether product or process conforms to certain norms.
Improve quality by improving the product or process.
Conformance Improvement
Product ISO 9126 ‘best practices’
CMM
ISO 9001
Process SPICE
SQA
Bootstap
Source: H. van Vliet, Software Engineering: Principles and Practice, 3rd ed., John Wiley & Sons, 2008.
06/11/2012 Lecture 10: Technical Software Metrics 4
Quality assurance and software metrics
Process quality:
Resources
Activities related to the
production of software,
tasks or milestones.
Product quality:
Explicit result of the
software development
activity, deliverables,
products.
Process metrics are collected across all projects and over long
periods of time.
They are used for making strategic decisions.
The intent is to provide a set of process indicators that lead to
long-term software process improvement.
The only way to know how/where to improve any process is to:
Measure specific attributes of the process.
Develop a set of meaningful metrics based on these attributes.
Use the metrics to provide indicators that will lead to a strategy
for improvement.
Source: Pressman, R.S., Software Engineering: a Practitioner’s Approach, 5th Rev. Ed., McGraw-Hill, 2000.
06/11/2012 Lecture 10: Technical Software Metrics 10
Process quality metrics (2/2)
Source: Pressman, R.S., Software Engineering: a Practitioner’s Approach, 5th Rev. Ed., McGraw-Hill, 2000.
06/11/2012 Lecture 10: Technical Software Metrics 11
Product quality metrics (1/2)
Source: Pressman, R.S., Software Engineering: a Practitioner’s Approach, 5th Rev. Ed., McGraw-Hill, 2000.
06/11/2012 Lecture 10: Technical Software Metrics 12
Product quality metrics (2/2)
Source: Pressman, R.S., Software Engineering: a Practitioner’s Approach, 5th Rev. Ed., McGraw-Hill, 2000.
06/11/2012 Lecture 10: Technical Software Metrics 13
Software measurement for system components
Source: Sommerville, I., Software Engineering, 9th ed., Addison Wesley, 2010.
06/11/2012 Lecture 10: Technical Software Metrics 15
Relationship between internal and external software
Source: Sommerville, I., Software Engineering, 9th ed., Addison Wesley, 2010.
06/11/2012 Lecture 10: Technical Software Metrics 16
Product metrics
Source: Sommerville, I., Software Engineering, 9th ed., Addison Wesley, 2010.
06/11/2012 Lecture 10: Technical Software Metrics 17
Dynamic and static metrics
Source: Sommerville, I., Software Engineering, 9th ed., Addison Wesley, 2010.
06/11/2012 Lecture 10: Technical Software Metrics 18
Static software product metrics (1/2)
Source: Sommerville, I., Software Engineering, 9th ed., Addison Wesley, 2010.
06/11/2012 Lecture 10: Technical Software Metrics 19
Static software product metrics (2/2)
Source: Fenton, N.E. & Pfleeger, S.L., Software Metrics: A rigorous and practical approach, 1997.
06/11/2012 Lecture 10: Technical Software Metrics 22
Superiority of FP over LOC
Source: ISO/IEC 20926:2009 Software and systems engineering - Software measurement - IFPUG functional size measurement method
06/11/2012 Lecture 10: Technical Software Metrics 24
Counting Function Points
Source: Parthasarathy, M. A. Practical Software Estimation: Function Point Methods for Insourced
and Outsourced Projects. 1st ed. Addison-Wesley Professional, 2007.
06/11/2012 Lecture 10: Technical Software Metrics 25
Step 1: Type of Count
Identify the type of count that occurs depending on the purpose and
the circumstances under which the count is being done.
Development
Enhancement
Application
Source: Parthasarathy, M. A. Practical Software Estimation: Function Point Methods for Insourced
and Outsourced Projects. 1st ed. Addison-Wesley Professional, 2007.
06/11/2012 Lecture 10: Technical Software Metrics 26
Step 2: Counting Scope and Application Boundary
Source: ISO/IEC 20926:2009 Software and systems engineering - Software measurement - IFPUG functional size measurement method
06/11/2012 Lecture 10: Technical Software Metrics 28
Step 4: Count Transaction Functions
Source: Laird, L.M. and Brennan, M.C.: Software Measurement and Estimation: A Practical
Approach Wiley-IEEE Computer Society Pr, 2006. *0=non important; 5=critical
06/11/2012 Lecture 10: Technical Software Metrics 32
Step 6: Determine Value Adjustment Factor (2/2)
Thus, the VAF can adjust the FP count by ±35% (if all
the GSCs are five or all zero).
EI = 2 x 3* x 3 = 18 Component Simple
*for the Create, Update, Delete operations ILF x7
EO = 2 x 4 = 8 EIF x5
EI x3
ILF = 2 x 7 = 14
EO x4
Assuming we have 2 inquiries:
EQ x3
Inquiry on Song details
Inquiry on CD details
EQ = (2 + 2**) x 3 = 12
**for the View CD and View Song operations
4 int other = 0;
int other = 0
5 x = x + 1; x = x + 1; 6
y = y + z;
6 y = y + z;
7 8
8 if (x < y) x+1<y+z
9 other = x / y; False True
9 11
10 else
other = (x + 1) * (y + z) other = (x + 1) / (y + z)
11 other = x * y;
12 }
13 } End
5-6+2
2 2
3
R3
3
6 4 6 4
R2
7 8 5 7 R1 8 5
9
11 9
11 10
06/11/2012
Lecture 10: Technical Software Metrics 10 43
Independent program paths
Object-oriented Description
metric
Weighted methods This is the number of methods in each class, weighted by the complexity
per class (WMC) of each method. Therefore, a simple method may have a complexity of 1, and a
large and complex method a much higher value. The larger the value for this
metric, the more complex the object class. Complex objects are more likely to
be difficult to understand. They may not be logically cohesive, so cannot be
reused effectively as superclasses in an inheritance tree.
Depth of This represents the number of discrete levels in the inheritance tree where
inheritance tree subclasses inherit attributes and operations (methods) from superclasses.
(DIT) It is the maximum length from the node to the root of the tree. The deeper
the inheritance tree, the more complex the design. Many object classes may
have to be understood to understand the object classes at the leaves of the
tree. As DIT grows, it becomes difficult to predict the behavior of a class, but at
the same time many methods may be reused.
Number of This is a measure of the number of immediate subclasses in a class. It
children (NOC) measures the breadth of a class hierarchy, whereas DIT measures its depth. A
high value for NOC may indicate greater reuse. It may mean that more effort
should be made in validating base classes because of the number of
subclasses that depend on them. Also, as NOC grows, abstraction is diluted.
Source: Pressman, R.S., Software Engineering: a Practitioner’s Approach, 5th Rev. Ed., McGraw-Hill, 2000.
06/11/2012 Lecture 10: Technical Software Metrics 47
Other metrics for Object-Oriented design (2/3)
Cohesion
The degree to which the OO properties are part of the problem
or design domain.
Sufficiency
The degree to which a design component fully reflects all
properties of the application object it is modeling.
Completeness
Like sufficiency, but the abstraction is considered from multiple
points of view, rather than simply the current application.
Cluster Size
The overall size of a class can be determined using the
following:
• The total number of operations (both inherited and private instance
operations) that are encapsulated within the class.
• The number of attributes (both inherited and private instance
attributes) that are encapsulated by the class.
Source: Pressman, R.S., Software Engineering: a Practitioner’s Approach, 5th Rev. Ed., McGraw-Hill, 2000.
06/11/2012 Lecture 10: Technical Software Metrics 48
Other metrics for Object-Oriented design (3/3)
Primitiveness
Applied to both operations and classes, the degree to which an
operation is atomic (similar to simplicity), that is, the operation cannot
be constructed out of a sequence of other operations contained
within a class.
Similarity
The degree to which multiple classes are similar in terms of structure,
function, behavior, or purpose.
Volatility
A measure of the likelihood that a change in design will occur when
requirements are modified or when modifications occur in other parts
if an application, resulting in mandatory adaptation of the design
component in question.
Source: Pressman, R.S., Software Engineering: a Practitioner’s Approach, 5th Rev. Ed., McGraw-Hill, 2000.
06/11/2012 Lecture 10: Technical Software Metrics 49
Product metrics challenges
Credits