Module 3-Chapter-3 Quality Management

Download as pdf or txt
Download as pdf or txt
You are on page 1of 86

Software Project Management and Finance

(22CSE151)

Module 3

Chapter 3– Quality Management


Project Management

Module-3: Project management, Project Planning, Quality management


Project management: Risk management, Managing People, Teamwork.

Project Planning: Software pricing, Plan-driven development, Project scheduling: Estimation


techniques,

Quality management: Software quality, Reviews and inspections, Software measurement and
metrics, Software standards

Chapter 22 Project management 2


Topics covered

 Software quality
 Software standards
 Reviews and inspections
 Software measurement and metrics

Software quality management is concerned with ensuring that software has a low
number of defects and that it reaches the required standards of maintainability,
reliability, portability, and so on.

Chapter 3 Quality management 4


Chapter 3 Quality management 5
Software quality management

SQM is the process of ensuring that software products meet predefined quality
standards and requirements.

Chapter 3 Quality management 6


The four general steps that every QA process
should have are:

Chapter 3 Quality management 7


Quality and Grade

Chapter 3 Quality management 8


Quality Assurance (QA)

 Quality assurance is a method of making the software


application with fewer defects and mistakes when it is
finally released to the end users.
 Quality Assurance is defined as an activity that ensures
the approaches, techniques, methods, and processes
designed for the projects are implemented correctly.
 It recognizes defects in the process.
 Quality Assurance is completed before Quality Control.
 It focuses on preventing defects.

Chapter 3 Quality management 13


Quality Control (QC)

 Quality Control is a software engineering process that is


used to ensure that the approaches, techniques, methods,
and processes designed for the project are followed
correctly.

 Quality control activities operate and verify that the


application meets the defined quality standards.

 It focuses on an examination of the quality of the end


products and the final outcome rather than focusing on the
processes used to create a product.
Chapter 3 Quality management 14
Quality Assurance (QA) vs Quality Control (QC)

Chapter 3 Quality management 15


Seven Basic Quality Tools

Chapter 3 Quality management 16


Software quality management

 Concerned with ensuring that the required level of quality is


achieved in a software product.
 Three principal concerns:
 At the organizational level, quality management is concerned with
establishing a framework of organizational processes and standards
that will lead to high-quality software.
 At the project level, quality management involves the application of
specific quality processes and checking that these planned processes
have been followed.
 At the project level, quality management is also concerned with
establishing a quality plan for a project. The quality plan should set out
the quality goals for the project and define what processes and
standards are to be used.
Chapter 3 Quality management 17
Quality management activities

 Quality management provides an independent check on


the software development process.
 The quality management process checks the project
deliverables to ensure that they are consistent with
organizational standards and goals
 The quality team should be independent from the
development team so that they can take an objective
view of the software. This allows them to report on
software quality without being influenced by software
development issues.

Chapter 3 Quality management 18


Quality management and software development

Chapter 3 Quality management 19


Quality planning
is the process of developing a quality plan for a project.

 A quality plan sets out the desired product qualities and


how these are assessed and defines the most significant
quality attributes.
 The quality plan should define the quality assessment
process.
 It should set out which organisational standards should
be applied and, where necessary, define new standards
to be used.

Chapter 3 Quality management 20


Quality plans

 Quality plan structure


 Product introduction;
 Product plans;
 Process descriptions;
 Quality goals;
 Risks and risk management.
 Quality plans should be short, succinct (brief/short) documents
 If they are too long, no-one will read them.

Chapter 3 Quality management 21


Contd.

 1. Product introduction A description of the product, its intended


market, and the quality expectations for the product.
 2. Product plans The critical release dates and responsibilities for
the product, along with plans for distribution and product servicing.
 3. Process descriptions The development and service processes
and standards that should be used for product development and
management.
 4. Quality goals The quality goals and plans for the product,
including an identification and justification of critical product quality
attributes.
 5. Risks and risk management The key risks that might affect
product quality and the actions to be taken to address these risks.

Chapter 3 Quality management 22


Scope of quality management

 Quality management is particularly important for large,


complex systems. The quality documentation is a record
of progress and supports continuity of development as
the development team changes.
 For smaller systems, quality management needs less
documentation and should focus on establishing a
quality culture.

Chapter 3 Quality management 23


Software quality

 Quality, simplistically, means that a product should meet


its specification.
 This is problematical for software systems
 There is a tension between customer quality requirements
(efficiency, reliability, etc.) and developer quality requirements
(maintainability, reusability, etc.);
 Some quality requirements are difficult to specify in an
unambiguous (clear) way (e.g., maintainability);
 Software specifications are usually incomplete and often
inconsistent.
 The focus may be ‘fitness for purpose’ rather than
specification conformance.
Chapter 3 Quality management 24
Software fitness for purpose

The quality management team has to consider whether or not the software is fit for its intended purpose.
This involves answering questions about the system’s characteristics. For example:

 Have programming and documentation standards been


followed in the development process?
 Has the software been properly tested?
 Is the software sufficiently dependable to be put into
use?
 Is the performance of the software acceptable for normal
use?
 Is the software usable?
 Is the software well-structured and understandable?
Chapter 3 Quality management 25
Software quality attributes

Boehm, et al. (1978) suggested that there were 15 important


software quality attributes, as shown in Figure

Safety Understandability Portability


Security Testability Usability
Reliability Adaptability Reusability
Resilience Modularity Efficiency
Robustness Complexity Learnability

Chapter 3 Quality management 26


Quality conflicts

 It is not possible for any system to be optimized for all of


these attributes – for example, improving robustness
may lead to loss of performance.
 The quality plan should therefore define the most
important quality attributes for the software that is being
developed.
 The plan should also include a definition of the quality
assessment process, an agreed way of assessing
whether some quality, such as maintainability or
robustness, is present in the product.

Chapter 3 Quality management 27


Process and product quality

 The quality of a developed product is influenced by the


quality of the production process.
 This is important in software development as some
product quality attributes are hard to assess.
 However, there is a very complex and poorly understood
relationship between software processes and product
quality.
 The application of individual skills and experience is particularly
important in software development;
 External factors such as the novelty of an application or the need
for an accelerated development schedule may impair product
quality.
Chapter 3 Quality management 28
Chapter 3 Quality management 29
Process-based quality

This is a process-based approach to achieving product quality.

Chapter 3 Quality management 31


Software standards
play a very important role in software quality management.

 Standards define the required attributes of a product or


process. They play an important role in quality
management.
 Standards may be international, national, organizational
or project standards.
 Product standards define characteristics that all software
components should exhibit e.g. a common programming
style.
 Process standards define how the software process
should be enacted.

Chapter 3 Quality management 32


Documentation standards

 Project documents are a tangible way of describing the


different representations of a software system (requirements,
UML, code, etc.) and its production process.
 Documentation standards define the organization of different
types of documents as well as the document format.
 They are important because they make it easier to check that
important material has not been omitted from documents and
ensure that project documents have a common ‘look and feel’.
 Standards may be developed for the process of writing
documents, for the documents themselves, and for document
exchange.

Chapter 3 Quality management 33


Importance of standards

 Encapsulation of best practice- avoids repetition of past


mistakes.
 They are a framework for defining what quality means in
a particular setting i.e. that organization’s view of quality.
 They provide continuity - new staff can understand the
organisation by understanding the standards that are
used.

Chapter 3 Quality management 34


Product and process standards

Quality management teams should define the standards that are needed by their organization.
Examples of standards - handbook are shown.
Product standards Process standards

Design review form Design review conduct

Requirements document Submission of new code for


structure system building
Method header format Version release process

Java programming style Project plan approval process

Project plan format Change control process

Change request form Test recording process

Chapter 3 Quality management 35


Problems with standards

 They may not be seen as relevant and up-to-date by


software engineers.
 They often involve too much bureaucratic form filling.
 If they are unsupported by software tools, tedious form
filling work is often involved to maintain the
documentation associated with the standards.

Bureaucratic means involving complicated rules and procedures which can cause long delays.

Chapter 3 Quality management 36


Standards development

 Involve practitioners/software engineers in development.


Engineers should understand the rationale underlying a
standard. Include commentary explaining why standardization
decisions have been made.
 Review standards and their usage regularly to reflect changing
technologies. Standards can quickly become outdated and this
reduces their credibility amongst practitioners.
 Detailed standards should have specialized tool
support. Excessive clerical work is the most
significant complaint against standards.
 Web-based forms are not good enough. For example, document
standards can be implemented using word processor styles.
Chapter 3 Quality management 37
ISO 9001 standards framework
Determines the guidelines for maintaining the quality of system.

 An international set of standards that can be used as a


basis for developing quality management systems.
 ISO 9001, the most general of these standards, applies
to organizations that design, develop and maintain
products, including software.
 The ISO 9001 standard is a framework for developing
software standards.
 It sets out general quality principles, describes quality processes
in general and lays out the organizational standards and
procedures that should be defined. These should be
documented in an organizational quality manual.

Chapter 3 Quality management 38


ISO 9001 core processes

The major revision of the


ISO 9001 standard in 2000
reoriented the standard
around nine core processes.

Chapter 3 Quality management 39


ISO 9001 core processes

10/12/2014 Chapter 3 Quality management 40


ISO 9001 and quality management

The relationships between ISO 9001, organizational quality manuals, and individual
project quality plans are shown in Figure.
Some software customers demand that
their suppliers should be ISO 9001
certified.

10/12/2014 Chapter 3 Quality management 41


ISO 9001

1. This standard applies to the organizations engaged in design,


development, production, and servicing of goods.

2. This is the standard that applies to most software


development organizations.

Chapter 3 Quality management 43


ISO 9002

1. This standard applies to those organizations which do not


design products but are only involved in the production.
2. Examples of these category industries contain steel and car
manufacturing industries that buy the product and plants
designs from external sources and are engaged in only
manufacturing those products.
3. Therefore, ISO 9002 does not apply to software development
organizations.

Chapter 3 Quality management 44


ISO 9003

1. This standard applies to organizations that are involved only in


the installation and testing of the products.
2. For example, Gas companies.

Chapter 3 Quality management 45


Key points

 Software quality management is concerned with ensuring that


software has a low number of defects and that it reaches the
required standards of maintainability, reliability, portability and
so on.
 SQM includes defining standards for processes and products
and establishing processes to check that these standards
have been followed.
 Software standards are important for quality assurance as
they represent an identification of ‘best practice’.
 Quality management procedures may be documented in an
organizational quality manual, based on the generic model for
a quality manual suggested in the ISO 9001 standard.
Chapter 3 Quality management 47
Reviews and inspections

 Reviews and inspections are QA activities that check the


quality of project deliverables.
 This involves examining the software, its documentation
and records of the process to discover errors and
omissions and to see if quality standards have been
followed.
 Quality reviews are based on documents that have been
produced during the software development process.
 The review should check the consistency and
completeness of the documents or code under review
and make sure that quality standards have been
followed.
Chapter 3 Quality management 49
Reviews and inspections

 A group examines part or all of a process or system and


its documentation to find potential problems.
 Software or documents may be 'signed off' at a
review which signifies that progress to the next
development stage has been approved by
management.
 There are different types of reviews with different
objectives
 Inspections for defect removal (product);
 Reviews for progress assessment (product and process);
 Quality reviews (product and standards).
Chapter 3 Quality management 50
Quality reviews

 A group of people carefully examine part or all


of a software system and its associated
documentation.

 Code, designs, specifications, test plans,


standards, etc. can all be reviewed.

Chapter 3 Quality management 51


The software review process

 They are performed to identify errors and defects in


software that can be removed.

 Also checks parts where,


 Improvement is needed.
 Which are already improved.

Chapter 3 Quality management 52


The software review process

 Review planning involves setting up a review team, arranging a time and place for the
review, and distributing the documents to be reviewed.
 During review preparation, the team may meet to get an overview of the software to be
reviewed.
 Individual review team members read and understand the software or documents and
relevant standards.
 During the review meeting, an author of the document or program being reviewed should
‘walk through’ the document with the review team.
Chapter 3 Quality management 53
Pre-review activities

 These are preparatory activities that are essential for the review to be
effective.
 Typically, pre-review activities are concerned with review planning and
review preparation.
 Review planning involves setting up a review team, arranging a time and
place for the review, and distributing the documents to be reviewed.
 During review preparation, the team may meet to get an overview of the
software to be reviewed.
 Individual review team members read and understand the software or
documents and relevant standards.
 They work independently to find errors, omissions, and departures from
standards.
 Reviewers may supply written comments on the software if they cannot
attend the review meeting. Chapter 3 Quality management 54
Review meeting

 During the review meeting, an author of the document or program


being reviewed should ‘walk through’ the document with the review
team.
 The review itself should be relatively short—two hours at most.
 One team member should chair the review and another should
formally record all review decisions and actions to be taken.
 During the review, the chair is responsible for ensuring that all
written comments are considered.
 The review chair should sign a record of comments and actions
agreed during the review.

Chapter 3 Quality management 55


Post-review activities

 After a review meeting has finished, the issues and problems raised
during the review must be addressed. This may involve fixing
software bugs, refactoring software so that it conforms to quality
standards, or rewriting documents.
 Sometimes, the problems discovered in a quality review are such
that a management review is also necessary to decide if more
resources should be made available to correct them.
 After changes have been made, the review chair may check that the
review comments have all been taken into account.
 Sometimes, a further review will be required to check that the
changes made cover all of the previous review comments.

Chapter 3 Quality management 56


Agile (Move Quickly)

Chapter 3 Quality management 57


Advantage

 Frequent delivery
 Face to Face Communication with Client
 Changes

Disadvantage

 Less documentation
 Maintenance problem

Chapter 3 Quality management 58


Reviews and agile methods

 The review process in agile software development is


usually informal.
 In Scrum, for example, there is a review meeting after each
iteration of the software has been completed (a sprint review),
where quality issues and problems may be discussed.
 In extreme programming, pair programming ensures that
code is constantly being examined and reviewed by
another team member.
 XP relies on individuals taking the initiative to improve
and refactor code. Agile approaches are not usually
standards-driven, so issues of standards compliance are
not usually considered.
Chapter 3 Quality management 59
Program inspections
Program inspections are ‘peer reviews’ where team members collaborate to find
bugs in the program that is being developed.

 These are peer reviews where engineers examine the


source of a system with the aim of discovering
anomalies and defects.
 Inspections do not require execution of a system so may
be used before implementation.
 They may be applied to any representation of the system
(requirements, design, configuration data, test data,
etc.).
 They have been shown to be an effective technique for
discovering program errors.

Chapter 3 Quality management 60


Contd.

 Program inspections involve team members from


different backgrounds who make a careful, line-by-line
review of the program source code.
 They look for defects and problems and describe these
at an inspection meeting.
 Defects may be logical errors, anomalies in the code that
might indicate an erroneous condition or features that
have been omitted from the code.
 The review team examines the design models or the
program code in detail and highlights anomalies

Chapter 3 Quality management 61


Inspection checklists

 Checklist of common errors should be used to


drive the inspection.
 Error checklists are programming language
dependent and reflect the characteristic errors that are
likely to arise in the language.
 In general, the 'weaker' the type checking, the larger the
checklist.
 Examples: Initialisation, Constant naming, loop
termination, array bounds, etc.
 Checklists should be regularly updated, as new types of
defects are found.
Chapter 3 Quality management 62
An inspection checklist (a)

Possible checks that might be made during the inspection process are shown
Fault class Inspection check
Data faults  Are all program variables initialized before their values are used?
 Have all constants been named?
 Should the upper bound of arrays be equal to the size of the
array or Size -1?
 If character strings are used, is a delimiter explicitly assigned?
 Is there any possibility of buffer overflow?
Control faults  For each conditional statement, is the condition correct?
 Is each loop certain to terminate?
 Are compound statements correctly bracketed?
 In case statements, are all possible cases accounted for?
 If a break is required after each case in case statements, has it
been included?
Input/output faults  Are all input variables used?
 Are all output variables assigned a value before they are output?
 Can unexpected inputs cause corruption?

Chapter 3 Quality management 63


An inspection checklist (b)

Fault class Inspection check


Interface faults  Do all function and method calls have the correct number
of parameters?
 Do formal and actual parameter types match?
 Are the parameters in the right order?
 If components access shared memory, do they have the
same model of the shared memory structure?
Storage management  If a linked structure is modified, have all links been
faults correctly reassigned?
 If dynamic storage is used, has space been allocated
correctly?
 Is space explicitly deallocated after it is no longer
required?
Exception management  Have all possible error conditions been taken into
faults account?

Chapter 3 Quality management 64


Agile methods and inspections

 Agile processes rarely use formal inspection or peer


review processes.
 Rather, they rely on team members cooperating to check
each other’s code, and informal guidelines, such as
‘check before check-in’, which suggest that programmers
should check their own code.
 Extreme programming practitioners argue that pair
programming is an effective substitute for inspection as
this is, in effect, a continual inspection process.
 Two people look at every line of code and check it before
it is accepted.
Chapter 3 Quality management 65
Software Measurements

Software measurement can be used to gather data about


software and software processes.

Chapter 3 Quality management 66


Software Metrics

Chapter 3 Quality management 67


Size Metrics: LOC

Chapter 3 Quality management 69


Size Metrics: LOC

Chapter 3 Quality management 70


Size Metrics: FP

Chapter 3 Quality management 71


Size Metrics: FP

Software project estimation consists of: cost estimation, time estimation,


resources estimation, effort estimation.
Chapter 3 Quality management 72
Measurements and Metrics

 Measure is a number.
 A measurement is an indication of the size, quantity,
amount or dimension of a particular attribute of a product
or process.
For example the number of errors in a system is a
measurement.
 A Metric is a measurement of the degree that any
attribute belongs to a system, product or process.
For example the number of errors per person
hours would be a metric.

Chapter 3 Quality management 73


Software measurement and metrics

 Software measurement is concerned with deriving a


numeric value/profile for an attribute of a software
product or process. (size, quantity, amount, or dimension of a
particular attribute of a product or process)

 This allows for objective comparisons between


techniques and processes.
 Although some companies have introduced
measurement programmes, most organisations still don’t
make systematic use of software measurement.
 There are few established standards in this area.

Chapter 3 Quality management 74


Software metric

It is a characteristic of a software system, system documentation, or


development process that can be objectively measured.

 Any type of measurement which relates to a software


system, process or related documentation
 Examples of metrics include the size of a Lines of code (LOC) in
a program,
 Fog index, which is a measure of the readability of a passage of
written text;
 the number of reported faults in a delivered software product;
 number of person-days required to develop a component.

Chapter 3 Quality management 75


Software metric

Software metrics can be classified into two types as follows:

 Product Metrics: These are the measures of various characteristics of the


software product.
The two important software characteristics are:
1. Size and complexity of software.
2. Quality and reliability of software.
These metrics can be computed for different stages of SDLC.

 Process Metrics: These are the measures of various characteristics of the


software development process.
For example, the efficiency of fault detection.
They are used to measure the characteristics of methods, techniques, and
tools that are used for developing software.
Chapter 3 Quality management 77
Software metric

 Software metrics may be either control metrics or predictor metrics.


 Control/process metrics support process management.
 Predictor/product metrics help you predict characteristics of the
software.
 Control metrics are usually associated with software processes.
Examples of control or process metrics are the average effort and
the time required to repair reported defects.
 Predictor metrics are associated with the software itself and are
sometimes known as ‘product metrics’. Examples of predictor
metrics are the cyclomatic complexity of a module the average
length of identifiers in a program, and the number of attributes and
operations associated with object classes in a design.
Chapter 3 Quality management 78
Chapter 3 Quality management 79
Predictor and control measurements

Both control and predictor metrics may influence management decision-making, as


shown in Figure.

A Software process
is a set of activities
& associated results
which lead to the
production of a
software product.

In management, decision
making is about acting in a
way that meets organizational
goals and objectives.
Chapter 3 Quality management 80
Advantages of Software Metrics

 Reduction in cost or budget.


 It helps to identify the particular area for improvising.
 It helps to increase the product quality.
 Managing the workloads and teams.
 Reduction in overall time to produce the product,.
 It helps to determine the complexity of the code and to
test the code with resources.
 It helps in providing effective planning, controlling and
managing of the entire product

Chapter 3 Quality management 81


Disadvantages of Software Metrics

 It is expensive and difficult to implement the metrics in


some cases.
 Performance of the entire team or an individual from the
team can’t be determined. Only the performance of the
product is determined.
 Sometimes the quality of the product is not met with the
expectation.
 It leads to measure the unwanted data which is wastage
of time.
 Measuring the incorrect data leads to make wrong
decision making.
Chapter 3 Quality management 82
Use of measurements

There are two ways in which measurements of a software system may be used:
 To assign a value to system quality attributes
Create the quality of the current product or process.

 By measuring the characteristics of system components, such as their


cyclomatic complexity, and then aggregating these measurements, you
can assess system quality attributes, such as maintainability.
 To identify the system components whose quality is sub-
standard
Enhance the quality of a product or process.

 Measurements can identify individual components with characteristics


that deviate from the norm. For example, you can measure components
to discover those with the highest complexity. These are most likely to
contain bugs because the complexity makes them harder to understand.
Chapter 3 Quality management 83
Metrics assumptions

 A software property can be measured.


 We can only measure internal attributes but are often
more interested in external software attributes.
 This relationship has been formalised and
validated.
 It may be difficult to relate what can be measured to
desirable external quality attributes.

Chapter 3 Quality management 84


Relationships between internal and external
software
The diagram suggests that there may be relationships between external and
internal attributes, but it does not say how these attributes are related.

Chapter 3 Quality management 85


Product metrics
These are the measures of various characteristics of the software product.

 A quality metric should be a predictor of product quality.


 Classes of product metric
 Dynamic metrics which are collected by measurements made of
a program in execution;
An example might be the number of bug reports or the time taken
to complete a computation.
 Static metrics which are collected by measurements made of the
system representations;
Examples of static metrics are the code size and the average
length of identifiers used.
 Dynamic metrics help assess efficiency and reliability
 Static metrics help assess complexity, understandability and
maintainability.
Chapter 3 Quality management 87
Dynamic and static metrics

 Dynamic metrics are closely related to software quality


attributes
 It is relatively easy to measure the response time of a system
(performance attribute) or the number of failures (reliability
attribute).
 Static metrics have an indirect relationship with quality
attributes
 You need to try and derive a relationship between these metrics
and properties such as complexity, understandability and
maintainability.

Chapter 3 Quality management 88


Static software product metrics
Static metrics have an indirect relationship with quality attributes.

Software metric Description


Fan-in/Fan-out Fan-in is a measure of the number of functions or
methods that call another function or method (say X).
Fan-out is the number of functions that are called by
function X. A high value for fan-in means that X is tightly
coupled to the rest of the design and changes to X will
have extensive knock-on effects. A high value for fan-out
suggests that the overall complexity of X may be high
because of the complexity of the control logic needed to
coordinate the called components.
Length of code This is a measure of the size of a program. Generally, the
larger the size of the code of a component, the more
complex and error-prone that component is likely to be.
Length of code has been shown to be one of the most
reliable metrics for predicting error-proneness in
components.

Chapter 3 Quality management 89


Static software product metrics

Software metric Description


Cyclomatic complexity This is a measure of the control complexity of a program.
This control complexity may be related to program
understandability. I discuss cyclomatic complexity in
Chapter 8.
Length of identifiers This is a measure of the average length of identifiers
(names for variables, classes, methods, etc.) in a
program. The longer the identifiers, the more likely they
are to be meaningful and hence the more
understandable the program.
Depth of conditional This is a measure of the depth of nesting of if-statements
nesting in a program. Deeply nested if-statements are hard to
understand and potentially error-prone.
Fog index This is a measure of the average length of words and
sentences in documents. The higher the value of a
document’s Fog index, the more difficult the document is
to understand.
Chapter 3 Quality management 90
The CK object-oriented metrics suite
Chidamber and Kemerer (CK)

 The CK metrics can be used to measure some


characteristics of OO systems such as classes, message
passing, inheritance, and encapsulation.
 The object-oriented metric criteria are to be used to
evaluate the following attributes of software quality: (i)
Efficiency (ii) Complexity (iii) Understandability (iv)
Reusability (v) Testability
 The Chidamber & Kemerer metrics suite originally
consists of 6 metrics calculated for each class: WMC,
DIT, NOC, CBO, RFC and LCOM1.
https://www.aivosto.com/project/help/pm-oo-ck.html
Chapter 3 Quality management 91
The CK object-oriented metrics suite

The table summarizes Chidamber and Kemerer’s suite (sometimes called the CK suite)
of six object oriented metrics.
Object-oriented Description
metric
Weighted methods This is the number of methods in each class, weighted by the complexity of each
per class (WMC) 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. The
(DIT) 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.
Number of children This is a measure of the number of immediate subclasses in a class. It measures
(NOC) 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.

Chapter 3 Quality management 92


The CK object-oriented metrics suite

Object-oriented Description
metric
Coupling between Classes are coupled when methods in one class use methods or instance
object classes variables defined in a different class. CBO is a measure of how much coupling
(CBO) exists. A high value for CBO means that classes are highly dependent, and
therefore it is more likely that changing one class will affect other classes in the
program.
Response for a RFC is a measure of the number of methods that could potentially be executed
class (RFC) in response to a message received by an object of that class. Again, RFC is
related to complexity. The higher the value for RFC, the more complex a class
and hence the more likely it is that it will include errors.
Lack of cohesion in LCOM is calculated by considering pairs of methods in a class. LCOM is the
methods (LCOM) difference between the number of method pairs without shared attributes and the
number of method pairs with shared attributes. The value of this metric has been
widely debated and it exists in several variations. It is not clear if it really adds
any additional, useful information over and above that provided by other metrics.

Chapter 3 Quality management 93


Software component analysis

 System component can be analyzed separately using a


range of metrics.
 The values of these metrics may then compared for
different components and, perhaps, with historical
measurement data collected on previous projects.
 Anomalous measurements, which deviate significantly
from the norm, may imply that there are problems with
the quality of these components.

Chapter 3 Quality management 94


The process of product measurement

The key stages in this component measurement process are:

Chapter 3 Quality management 95


Contd.

 Choose measurements to be made The questions that the measurement is


intended to answer should be formulated and the measurements required to
answer these questions defined.
 Select components to be assessed Sometime select a representative selection of
components for measurement, allowing you to make an overall assessment of
system quality.
 Measure component characteristics The selected components are measured
and the associated metric values computed. This normally involves processing
the component representation (design, code, etc.)
 Identify anomalous measurements After the component measurements have
been made, you then compare them with each other and to previous
measurements that have been recorded in a measurement database.
 Analyze anomalous components When you have identified components that have
anomalous values for your chosen metrics, you should examine them to decide
whether or not these anomalous metric values mean that the quality of the
component is compromised. Chapter 3 Quality management 96
Measurement surprises

 Reducing the number of faults in a program leads to an


increased number of help desk calls
 The program is now thought of as more reliable and so has a
wider more diverse market. The percentage of users who call the
help desk may have decreased but the total may increase;
 A more reliable system is used in a different way from a system
where users work around the faults. This leads to more help
desk calls.

Chapter 3 Quality management 97


Key points

 Reviews of the software process deliverables involve a


team of people who check that quality standards are
being followed.
 In a program inspection or peer review, a small team
systematically checks the code. They read the code in
detail and look for possible errors and omissions
 Software measurement can be used to gather data
about software and software processes.
 Product quality metrics are particularly useful for
highlighting anomalous components that may have
quality problems.
Chapter 3 Quality management 98

You might also like