0% found this document useful (0 votes)
162 views

Software Engineering With UML

Software Engineering with UML

Uploaded by

Whatsapp stuts
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views

Software Engineering With UML

Software Engineering with UML

Uploaded by

Whatsapp stuts
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 184

SOFTWARE ENGINEERING

WITH UML

(FOR PRIVATE CIRCULATION ONLY)


2018
PROGRAMME COORDINATOR
Prof. Sonali Karale

COURSE DESIGN AND REVIEW COMMITTEE


Mr. Atul Kahate Prof. Sonali Karale
Ms. Jaai Kondhalkare Ms. Pradnya Purandare
Mr. Dimakh Sahasrabuddhe Ms. Vidya Kumbhar
Prof. Nidhi Khare Ms. Prerna Patil

COURSE WRITERS
Mr. Sachin Naik Prof. Nidhi Khare
Prof. Sonali Karale

EDITOR
Ms. Neha Mule

Published by Symbiosis Centre for Distance Learning (SCDL), Pune


July, 2014

Copyright © 2018 Symbiosis Open Education Society


All rights reserved. No part of this book may be reproduced, transmitted or utilised in any form or by any
means, electronic or mechanical, including photocopying, recording or by any information storage or retrieval
system without written permission from the publisher.

Acknowledgement
Every attempt has been made to trace the copyright holders of materials reproduced in this book. Should any
infringement have occurred, SCDL apologises for the same and will be pleased to make necessary corrections
in future editions of this book.
PREFACE

Software Engineering is becoming an established discipline separate from computer science and
computer engineering. In software engineering, the Unified Modeling Language (UML) is a non-
proprietary specification language for object modeling. UML is a general-purpose modeling language
that includes a standardized graphical notation used to create an abstract model of a system, referred
to as a UML model. It is extendable as it offers a profile mechanism for customization.

The  Unified Modeling Language  (UML) is a general-purpose  modeling language  in the field
of software engineering, which is designed to provide a standard way to visualize the design of a
system. Software Engineering with UML will help the learners to understand what constitutes a
good requirement; they can apply fundamental design principles, can use UML properly and can
translate requirements and design into good quality programs and can effectively test those programs.

This SLM will help you to understand Software Engineering concepts with UML. It will also help
the learners to understand and implement the concepts studied in the various units.

Mr. Sachin Naik

Prof. Nidhi Khare

Prof. Sonali Karale

iii
ABOUT THE AUTHORS

Mr. Sachin Naik has completed his M.Sc. in Computer Science and is pursuing his Ph.D. He has more
than 11 years of experience in teaching at various management institutes at Post Graduate level. He
had received various awards and had published various research papers in National and International
Journals and conferences.

Prof. Nidhi Khare has a rich experience of 15 years in Academics, Industry as well as Corporate
Training. She has also headed the Computer Department of a college during her Academics career.
Along with Masters in Computer Applications, she has Certifications in Advanced Computing and Office
Automation to her credit. She has published various papers in National and International conferences.

Prof. Sonali Karale has completed her Masters in Computer Applications and is pursuing her Ph.D.
She has rich experience in teaching at Post Graduate level. She has published various research papers
in National Conferences. Currently, she is the Faculty of Information Technology at SCDL.

iv
CONTENTS

Unit No. TITLE Page No.


1 Introduction to Software Process Models 1 - 26
1.1 Introduction
1.2 The Evolving Role of Software
1.3 Software Myths
1.4 Software Engineering – Layered Technology
1.4.1 Generic View of Software Engineering
1.5 Software Process Models
1.5.1 Waterfall Model
1.5.2 Incremental Process Model
1.5.3 Evolutionary Software Process Model
1.5.4 Rapid Application Development (RAD) Model
1.6 Agile Computing
1.6.1 Extreme Programming
1.7 Component-Based Development
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading
2 Software Project Planning and Estimation 27 - 52
2.1 Introduction
2.2 Software Scope
2.2.1 Types of Scope
2.3 Software Project Estimation
2.3.1 Metrics for Software Quality
2.3.2 Halstead’s Software Science
2.3.3 McCabe’s Complexity Metric
2.4 Metrics in Project Estimation
2.4.1 Size Projection
2.4.2 Productivity Projection
2.5 Cost Estimation
2.5.1 Decomposition
2.5.2 Effort Estimation
2.5.3 Expert Judgement
2.5.4 Estimation by Analogy
2.5.5 Cost Estimation Tools
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

v
Unit No. TITLE Page No.
3 System Engineering and Business Process Engineering 53 - 68
3.1 Introduction
3.2 Computer-Based Systems
3.3 The System Engineering Hierarchy
3.3.1 Business Process Engineering
3.4 Product Engineering
3.5 Requirements Engineering
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading
4 System Modelling and UML - I 69 - 94
4.1 Introduction
4.2 System Modelling and Analysis
4.3 UML and UML Use Case-Driven Object-Oriented Analysis
4.3.1 Unified Modelling Language (UML)
4.3.2 UML Use Case-Driven Object-Oriented Analysis
4.3.3 Use-Case Diagram Components
4.3.4 Use Cases for Testing and Validation
4.4 Static Modelling using Class Diagram
4.4.1 Class Diagram
4.4.2 Relationships
4.5 Activity Diagram
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading
5 System Modelling and UML - II 95 - 120
5.1 Introduction
5.2 Sequence Diagram
5.3 Collaboration Diagram or Communication Diagram
5.4 State Chart Diagram
5.5 Component Diagram
5.6 Deployment Diagram
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

vi
Unit No. TITLE Page No.
6 Design Concepts and Principles 121 - 134
6.1 Introduction
6.2 Design Process
6.3 Design Principles
6.4 Design Concepts
6.5 Design Heuristics for Effective Modularity
6.6 Design Model
6.7 Design Documentation
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading
7 Architectural Design 135 – 150
7.1 Introduction
7.2 Software Architecture
7.3 Data Design
7.4 Architectural Styles
7.5 Mapping Requirements in Software Architecture
7.5.1 Transform Mapping
7.5.2 Transaction Mapping
7.6 Refining Architectural Design
7.7 User Interface Design (UID)
7.7.1 The Golden Rules of User Interface Design
7.7.2 Task Analysis and Modelling
7.7.3 Interface Design Activities
7.7.4 Design Evaluation
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

vii
Unit No. TITLE Page No.
8 Software Testing Techniques 151 – 164
8.1 Introduction
8.2 Software Testing Fundamentals
8.3 Test Case Design
8.4 White-Box Testing
8.4.1 Basis Path Testing
8.4.2 Control Structure Testing
8.5 Black-Box Testing
8.6 Software Testing Strategies
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading
9 Software Configuration Management 165 – 176
9.1 Introduction
9.2 Software Configuration Management: Concept
9.3 Elements of Configuration Management System
9.4 The SCM Repository
9.5 SCM Process and Tasks
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

viii
Introduction to Software Process Models
UNIT

1
Structure:

1.1 Introduction
1.2 The Evolving Role of Software
1.3 Software Myths
1.4 Software Engineering – Layered Technology
1.4.1 Generic View of Software Engineering
1.5 Software Process Models
1.5.1 Waterfall Model
1.5.2 Incremental Process Model
1.5.3 Evolutionary Software Process Model
1.5.4 Rapid Application Development (RAD) Model
1.6 Agile Computing
1.6.1 Extreme Programming
1.7 Component-Based Development
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

Introduction to Software Process Models 1


Notes
Objectives
----------------------
After going through this unit, you will be able to:
----------------------
• Analyse the various software myths
----------------------
• Explain the layered technology of software
---------------------- • Discuss the various software process models
----------------------
1.1 INTRODUCTION
----------------------
The software process models are an abstract representation of a software
---------------------- process. It presents a description of a process from some particular perspective
such as the specification, design, validation and evolution, wherein, the
---------------------- development constraints, production of software systems, checking of software
---------------------- as per customers’ demands and changing the software in response to changing
demand are considered. In this unit, we will be focusing on the evolutionary
---------------------- role of software and the different software process models.

---------------------- 1.2 THE EVOLVING ROLE OF SOFTWARE


----------------------
Nowadays, software takes on a dual role. It is a product and, at the
---------------------- same time, the vehicle for delivering a product. As a product, it delivers the
computing potential embodied by computer hardware or, more broadly, a
---------------------- network of computers that are accessible by local hardware. Whether it resides
within a cellular phone or operates inside a mainframe computer, software
---------------------- is information transformer – producing, managing, acquiring, modifying,
---------------------- displaying, or transmitting information that can be as simple as a single bit or as
complex as a multimedia presentation.
---------------------- As any vehicle is used to deliver the product, software acts as the basis
---------------------- for the control of the computer (operating systems), the communication of
information (networks), and the creation and control of other programs (software
---------------------- tools and environments). Software delivers the most important product of our
time – information. 
----------------------
Software transforms personal data (e.g., an individual’s financial
---------------------- transactions) so that the data can be more useful in a local context; it manages
business information to enhance competitiveness; it provides a gateway to
---------------------- worldwide information networks (e.g., Internet) and provides the means for
acquiring information in all of its forms. 
----------------------
The role of computer software has undergone significant change over a
---------------------- time span of little more than 50 years. Dramatic improvements in hardware
performance, profound changes in computing architectures, vast increases in
---------------------- memory and storage capacity, and a wide variety of exotic input and output options
---------------------- have all precipitated more sophisticated and complex computer-based systems. 
The programmers of an earlier era has been replaced by a team of software
---------------------- specialists, each focusing on one part of the technology required to deliver a
complex application.
2 Software Engineering with UML
1.3    SOFTWARE MYTHS Notes
Myth is defined as “widely held but false notation” by the Oxford ----------------------
Dictionary. So as in other fields, the software arena also has some myths to
demystify. Roger Pressman insists “Software myths - beliefs about software ----------------------
and the process used to build it - can be traced to earliest days of computing.
----------------------
Myths have a number of attributes that have made them insidious.”
So, software myths prevail. But though they do, they are not clearly ----------------------
visible and have the potential to harm all the parties involved in the software ----------------------
development process, mainly the developer team. Tom DeMarco says, “in the
absence of meaningful standards, a new industry like software comes to depend ----------------------
instead on folklore.” The given statement points out that the software industry
caught pace just some decades back, so it has not matured to a formidable ----------------------
level and there are no strict standards in software development. There does not ----------------------
exist one best method of software development that ultimately equates to the
ubiquitous software myths. ----------------------
Primarily, there are three types of software myths, all the three are stated ----------------------
below: 1.Management myth 2.Customer myth 3.Practitioner/Developer myth.
Before defining the above three myths one by one, let’s scrutinise why these ----------------------
myths occur on the first place.
----------------------
So the problem understanding, i.e., requirement analysis must be done properly
to avoid any problems in later stages as it will have devastating effects. ----------------------
Management Myths ----------------------
Managers with software responsibility, like managers in most disciplines,
----------------------
are often under pressure to maintain budgets, keep schedules from slipping,
and improve quality. Like a drowning person who grasps at a straw, a software ----------------------
manager often grasps at the belief in a software myth, if those beliefs will lessen
the pressure (even temporarily). Some common managerial myths stated by ----------------------
Roger Pressman include:
----------------------
i. We have standards and procedures for building software, so developers
have everything they need to know. ----------------------

ii. We have state-of-the-art software development tools; after all, we buy the ----------------------
latest computers.
----------------------
iii. If we’re behind schedule, we can add more programmers to catch up.
----------------------
iv. A good manger can manage any project.
The managers completely ignore the fact that they are working on ----------------------
something intangible but very important to the clients, which invites more
----------------------
trouble than solution. So a software project manager must have worked well
with the software development process analysing the minute deals associated ----------------------
with the field, learning the nitty-gritty and the tips and tricks of the trade. The
realities are self-understood as it is already stated how complex the software ----------------------
development process is.
----------------------

Introduction to Software Process Models 3


Notes Customer Myths
A customer who requests computer software may be a person at the next
----------------------
desk, a technical group down the hall, the marketing/sales department, or an
---------------------- outside company that has requested software under contract. In many cases, the
customer believes in the myths about software because software managers and
---------------------- practitioners do little to correct misinformation. Myths lead to false expectations
(by the customer) and, ultimately, dissatisfaction with the developer.
----------------------
Commonly held myths by the clients are:
----------------------
i. A general statement of objectives is sufficient to begin writing programs
---------------------- - we can fill in the details later.

---------------------- ii. 
Requirement changes are easy to accommodate because software is
flexible.
---------------------- iii. I know what my problem is; therefore, I know how to solve it. This
---------------------- primarily is seen evidently because the clients do not have a first-hand
experience in software development and they think that it’s an easy
---------------------- process.

---------------------- Practitioner/ Developer Myths


Myths that are still believed by software practitioners have been fostered
----------------------
by over 50 years of programming culture. During the early days of software,
---------------------- programming was viewed as an art form. Old ways and attitudes die hard. A
malpractice seen in developers is that they think they know everything and
---------------------- neglect the peculiarity of each problem.
---------------------- i. If I miss something now, I can fix it later.
ii. Once the program is written and running, my job is done.
----------------------
iii. Until a program is running, there’s no way of assessing its quality.
----------------------
iv. The only deliverable for a software project is a working program. Every
---------------------- developer should try to get all relevant requirement detail to effectively
design and code the system.
----------------------
Some misplaced assumptions that intensify the myths are listed below:
----------------------
i. All requirements can be pre-specified.
---------------------- ii. Users are experts at specifying their needs.
---------------------- iii. Users and developers are both good at visualisation

---------------------- iv. The project team is capable of unambiguous communication.


On the whole, realities are always different from the myths. So the myths
---------------------- must be demystified and work should be based on systematic, scientific and
---------------------- logical bases rather than on the irrational myths. The systemic view must be
considered to determine the success of any software project. It’s not only a
---------------------- matter of hard skills, but soft skills of the developer team also matter to come
up with an efficient system.
----------------------

4 Software Engineering with UML


Notes
Check your Progress 1
----------------------
Fill in the blanks.
----------------------
1. There are three types of software myths; these are ___________,
___________ and __________. ----------------------
2. Myths lead to _________expectations. ----------------------

----------------------
1.4 SOFTWARE ENGINEERING – LAYERED TECHNOLOGY
----------------------
Software engineering is a layered technology. Most engineering approaches
----------------------
(including software engineering) must rest on an organisational commitment to
quality. The different layers are discussed below. ----------------------
i. Quality: A product should meet its specification. This is problematical
----------------------
for software systems. There is a tension between customer quality
requirements (efficiency, reliability, etc.), developer quality requirements ----------------------
(maintainability, reusability, etc.), users (usability, efficiency, etc.), etc.
But note that: ----------------------
− Some quality requirements are difficult to specify in an unambiguous ----------------------
way.
----------------------
− Software specifications are usually incomplete and often
inconsistent. ----------------------
ii. Process: The foundation for software engineering is the process’ layer. ----------------------
Software engineering process is the glue that holds the technology
together and enables rational and timely development of computer ----------------------
software. The work products are produced, milestones are established,
quality is ensured, and changes are properly managed. ----------------------

iii. Methods: Software engineering methods provide the technical view for ----------------------
building software. Methods encompass a broad array of tasks that include
----------------------
the requirements analysis, design, program construction, testing and
support. ----------------------
iv. Tools: Software engineering tools provide automated or semi-automated
----------------------
support for the process and the methods. The tools are integrated so that
the information created by one tool can be used by another. There is a ----------------------
system for the support of software development, called Computer-Aided
Software Engineering (CASE). CASE combines software, hardware and ----------------------
software engineering database.
----------------------
1.4.1 Generic View of Software Engineering
----------------------
Engineering is the analysis, design, construction, verification and management
of technical entities. Regardless of entities to be engineered, the following ----------------------
questions must be asked and answered:
----------------------

Introduction to Software Process Models 5


Notes • What is the problem to be solved?
• What characteristics of entity are used to solve the problem?
----------------------
• How will the entity (and the solution) be realised?
----------------------
• How will the entity be constructed?
---------------------- • What approach will be used to uncover the errors that were made in the
---------------------- design and construction of the entity?
• How will the entity be supported over the long term, when the corrections,
---------------------- adaptations and enhancements are requested by the user of the entity?
---------------------- Software is engineered by applying three distinct phases that focus on definition,
development, and support.
----------------------
i. The definition phase focuses on what.
----------------------
ii. The development phase focuses on how.
---------------------- iii. The support phase focuses on change. The changes are due to enhancements
---------------------- by changing customer requirements. The support phase reapplies the
steps of definition and development phases. Four types of change are
---------------------- encountered during the support phase:

---------------------- • Correction
• Adaptation
----------------------
• Enhancement
----------------------
• Prevention
----------------------
Check your Progress 2
----------------------
State True or False.
----------------------
1. Software engineering is not a layered technology
----------------------
2. The foundation of software engineering is the quality layer.
---------------------- 3. Software engineering tools provide automated or semi-automated
---------------------- support for the process and the methods.
4. Engineering is the analysis, design, construction, verification and
----------------------
management of technical entities.
---------------------- 5. The support phase focusses on change.
----------------------

---------------------- 1.5 SOFTWARE PROCESS MODELS

---------------------- To develop a system, we need to go through a series of steps that is a road


map which helps to build a system. The series of steps we follow forms a process.
---------------------- So, a software process contains a set of activities and associated results which
lead to software development. Some of the activities common to all software
----------------------
are software process specification, which contains initiation and requirements,

6 Software Engineering with UML


software design and specification, software testing and quality assurance and Notes
software maintenance. A software process model is a representation of software.
----------------------
A generic process framework of software engineering involves generic
major activities. These are: communication, planning, modelling, construction ----------------------
and deployment. In addition to these, project management, risk management,
quality assurance, change management are applied throughout the process. ----------------------
A linear process flow executes these activities in sequence. It begins with ----------------------
communication and ends with deployment. An iterative process flow repeats
one or more activities before going to the next activity. A parallel process flow ----------------------
executes one or more activities in parallel.
----------------------
Some of the process models are as follows:
----------------------
i. The waterfall model
ii. Incremental process model ----------------------

iii. Evolutionary process model ----------------------


iv. The spiral model ----------------------
All these process models involve generic activities mentioned above,
----------------------
with different weight to these activities and each defines a process flow that
executes each framework activity in a different manner. These activities are ----------------------
linear, incremental or evolutionary.
----------------------
1.5.1 Waterfall Model
This is also called the “Classic Life Cycle”. It suggests a systematic ----------------------
sequential approach to software development that begins at the system level ----------------------
and progresses through analysis, design, coding and maintenance.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 1.1: The Waterfall Model
----------------------

Introduction to Software Process Models 7


Notes Modelled after the conventional engineering cycle, the linear sequential model
encompasses the following activities:
----------------------
i. System/Information engineering and analysis: System engineering and
---------------------- analysis includes gathering requirement at the system level with small
amount of top-level analysis and design, as any software is always a part
---------------------- of a large system or business.
---------------------- ii. Software requirements analysis: The requirement gathering process
is intensified and focused specially on software. The requirements are
---------------------- documented and reviewed with the customer.
---------------------- iii. Design: Software design focuses on four distinct attributes of a
program – data structure, software architecture, interface representation
---------------------- and procedural or algorithmic details. The design process translates
requirements into representation of the software that can be assessed for
----------------------
quality before coding.
---------------------- iv. Code generation: The design must be translated into a machine-readable
---------------------- form by the code generation process.
v. Testing: Once the codes are generated, program testing begins and focuses
---------------------- on the logical internals of the software, assuring that all statements have
---------------------- been tested and on the functional externals.
vi. Maintenance: Software will undergo many changes after it is delivered
---------------------- to the customer because of the errors that have been encountered.
---------------------- Some of the limitations of this model are as follows:
---------------------- • As it follows the sequential flow, the real projects rarely follow. It does not
directly support iteration. If any changes occur, it can cause confusion.
----------------------
• It is difficult for customers to provide explicitly all the requirements at the
---------------------- beginning.

---------------------- • All the activities are executed sequentially, so the final version will be
obtained only at the end of deployment activity. The customer must have
---------------------- patience.

---------------------- 1.5.2 Incremental Process Model


The incremental model delivers a series of releases called increments that
----------------------
provide progressively more functionality for the customer as each increment
---------------------- is delivered. Sometimes there is a situation in which the initial software
requirements are well defined, but the overall scope of the development effort
---------------------- a linear process. In this, multiple deliverables are identified. This model is
iterative in nature, and delivers an operational product at each increment. It
----------------------
delivers the needed functionality earlier than complete operational product.
---------------------- For example, a word-processing software developed using the incremental
paradigm might deliver basic file management, editing and document
----------------------
production functions in the first increment and more sophisticated editing
---------------------- and document production capabilities in the second increment, spelling and

8 Software Engineering with UML


grammar checking in the third increment and advanced page layout capability Notes
in the fourth increment.
----------------------
In this, the first increment delivers a core product. This is the outcome
of basic requirements gathered from customers, but many supplementary ----------------------
features may be undelivered. The core product used by the customer goes under
evaluation and as a result a plan is developed for the next increment. The next ----------------------
increment can better address the customer needs with delivery of better features
----------------------
and functionality. This is repeated until the complete product is produced.
----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

Fig. 1.2: The Incremental Model ----------------------

The product is decomposed into a number of components, each of which ----------------------


are designed and built separately (called builds). Each component is delivered
to the client when it is complete. This allows partial utilisation of product and ----------------------
avoids a long development time. It also creates a large initial capital outlay with ----------------------
the subsequent long wait avoided. This model of development also helps ease
the effect of introducing completely new system all at once. ----------------------
Advantages ----------------------
i. After each iteration, regression testing should be conducted. During this
----------------------
testing, faulty elements of the software can be quickly identified because
few changes are made within any single iteration. ----------------------
ii. It is generally easier to test and debug than other methods of software
----------------------
development because relatively smaller changes are made during each
iteration. This allows for more targeted and rigorous testing of each ----------------------
element within the overall product.
----------------------
iii. Customer can respond to features and review the product for any needful
changes. ----------------------
iv. Initial product delivery is faster and costs lower. ----------------------
Disadvantages
----------------------
i. Resulting cost may exceed the cost of the organisation.
----------------------

Introduction to Software Process Models 9


Notes ii. As additional functionality is added to the product, problems may arise
related to system architecture which were not evident in earlier prototypes.
----------------------
1.5.3 Evolutionary Software Process Model
---------------------- Evolutionary models are iterative. Prototyping model and spiral model are the
examples of evolutionary model.
----------------------
i. Prototyping Model
----------------------
This is an evolutionary model. For complex systems, software evolves over
---------------------- a period of time. Business or product requirement changes over a period
of time as the development progress. Prototyping follows an evolutionary
---------------------- and iterative approach. This is specifically used when requirements are
---------------------- not well understood. It serves as a technique for identifying software
requirements. It focuses on those aspects of the software that are visible
---------------------- to the user. Feedback is used to refine prototype.

---------------------- A prototype is a working model that is functionally equivalent to a


component of the product. In many instances, the client only has a
---------------------- general view of what is expected from the software product. In such a
scenario, where there is an absence of detailed information regarding the
---------------------- input to the system, the processing needs and the output requirements, the
---------------------- prototyping model may be employed.
This model reflects an attempt to increase the flexibility of the development
---------------------- process by allowing the client to interact and experiment with a working
---------------------- representation of the product. The developmental process only continues
once the client is satisfied with the functioning of the prototype. At that
---------------------- stage, the developer determines the specifications of the client’s real
needs.
----------------------
A prototype typically implements only a small subset of the features of the
---------------------- eventual program, and the implementation may be completely different
from that of the eventual product. The purpose of a prototype is to allow
----------------------
users of the software to evaluate proposals for the design of the eventual
---------------------- product by actually trying them out, rather than having to interpret and
evaluate the design based on descriptions.
----------------------
There are several benefits of using prototyping. The software designer
---------------------- and implementer can obtain feedback from the users early in the project.
The client and the contractor can compare if the software made matches
---------------------- the software specification, according to which the software program is
built. It also allows the software engineer some insight into the accuracy
----------------------
of the initial project estimates and whether the deadlines and milestones
---------------------- proposed can be successfully met.

----------------------

----------------------

----------------------

10 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 1.3: The Prototyping Paradigm
The process of prototyping involves the following steps: ----------------------

Table 1.1: Prototyping Steps ----------------------


1. Identify basic requirements Determine basic requirements including ----------------------
the input and output information desired.
2. Develop initial prototype The initial prototype is developed that ----------------------
includes only user interfaces.
3. Review The customers, including end-users, ex- ----------------------
amine the prototype and provide feed-
back on additions or changes. ----------------------
4. Revise and enhance the Using the feedback, both the specifica-
prototype tions and the prototype can be improved. ----------------------
Negotiation about what is within the
scope of the contract/product may be ----------------------
necessary. If changes are introduced, then
a repeat of step 3 and 4 may be needed. ----------------------
Advantages of prototyping ----------------------
Reduced time and costs: Prototyping can improve the quality of
1.  ----------------------
requirements and specifications provided to developers, as what the user
really wants can result in faster and less expensive software. ----------------------
2. Improved and increased user involvement: Prototyping requires user ----------------------
involvement and allows them to see and interact with a prototype allowing
them to provide better and more complete feedback and specifications. ----------------------
It reduces misunderstandings and miscommunications that occur when
each side believes that the other understands what they said. ----------------------

Disadvantages of prototyping ----------------------


1. Insufficient analysis: The focus on a limited prototype can distract ----------------------
developers from properly analysing the complete project.
----------------------
2. User confusion of prototype and finished system: Users can begin to
think that a prototype, intended to be thrown away, is actually a final ----------------------
system that merely needs to be finished or polished. This can lead them
to expect the prototype to accurately model the performance of the final ----------------------
system. Users can also become attached to features that were included in
----------------------

Introduction to Software Process Models 11


Notes a prototype for consideration and then removed from the specification for
a final system.
----------------------
Developer attachment to prototype: Developers can also become
3. 
---------------------- attached to prototypes on which they have given a great deal of effort. This
can lead to problems like attempting to convert a limited prototype into a
---------------------- final system when it does not have an appropriate underlying architecture.
---------------------- 4. Excessive development time of the prototype: A key property to
prototyping is the fact that it is supposed to be done quickly. If the
---------------------- developers lose sight of this fact, they very well may try to develop a
prototype that is too complex.
----------------------
5. Expense of implementing prototyping: The startup cost for building a
---------------------- development team focused on prototyping may be high.
---------------------- ii. Spiral Model

---------------------- The spiral model was defined by Barry Boehm in his 1988 article “A
Spiral Model of Software Development and Enhancement”. The iterations
---------------------- were typically 6 months to 2 years’ long. Each phase starts with a design
goal and ends with the client reviewing the progress thus far. Analysis and
---------------------- engineering efforts are applied at each phase of the project, with an eye
---------------------- towards the end goal of the project.
• It couples the iterative nature of prototyping with the controlled and
---------------------- systematic approach of the waterfall model.
---------------------- • It facilitates the more complete versions of the software with rapid
development.
----------------------
• It is a risk-driven process model generator. It has two main
---------------------- features: one is the cyclic approach and another is a set of anchor
point milestones. Cyclic approach is for incrementally growing a
----------------------
system’s degree of definition and implementation while decreasing
---------------------- its degree of risk. In a set of anchor point milestone, a combination
of work products and conditions are attained along the path of the
---------------------- spiral.
---------------------- The steps in the spiral model can be generalised as follows:

---------------------- a. The new system requirements are defined in as much detail as possible.
This usually involves interviewing a number of users representing all the
---------------------- external or internal users and other aspects of the existing system.

---------------------- b. A preliminary design is created for the new system.


c. A first prototype of the new system is constructed from the preliminary
----------------------
design. This is usually a scaled-down system, and represents an
---------------------- approximation of the characteristics of the final product.
d. A second prototype is evolved by a four-fold procedure:
----------------------
• Evaluating the first prototype in terms of its strengths, weaknesses
---------------------- and risks;

12 Software Engineering with UML


• Defining the requirements of the second prototype; Notes
• Planning and designing the second prototype;
----------------------
• Constructing and testing the second prototype.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------
Fig. 1.4: The Spiral Model
----------------------
The spiral model is used most often in large projects. The US military has
adopted the spiral model for its Future Combat System program. ----------------------
The spiral model is divided into a number of framework activities also called
----------------------
the “task regions”. Typically, there are between three and six task regions.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

Fig. 1.5: The Spiral Model with Six Task Regions ----------------------

i. 
Customer communication – task required to establish effective ----------------------
communication between developer and customer.
----------------------

Introduction to Software Process Models 13


Notes ii. Planning – task required to define resources, timelines and other project-
related information.
----------------------
iii. Risk analysis – task required to assess both technical and management
---------------------- risk.
iv. Engineering – task required to build one or more representations of the
----------------------
applications
---------------------- v. Construction and release – task required to construct, test, install and
provide user support (e.g., documentation and training).
----------------------
vi. Customer/system evaluation – task required to obtain customer feedback
---------------------- based on the evaluation of the software representation created during the
---------------------- engineering stage and implemented during the installation stage.
1.5.4 Rapid Application Development (RAD) Model
----------------------
RAD is used when there is a need to create software in a very short time
---------------------- span, usually within two to three months. It requires higher availability of the
designers for modelling and has high budget.
----------------------
Rapid Application Development (RAD) refers to a software development
---------------------- life cycle designed to give much faster development and higher quality results
than the traditional life cycle. Rapid application development is a software
----------------------
development methodology, which involves iterative development and the
---------------------- construction of prototypes.
The RAD model concentrates on short development cycle of system
----------------------
development. It is a high speed adaption of the waterfall model and it has a
---------------------- component-based construction approach. It may deliver software within a very
short period, if the requirements are well understood and the project scope
---------------------- is constrained. In this model, many functions or components of software are
constructed in parallel so that the customer can see and use it and provide
----------------------
feedback .The developments are time-boxed, delivered and then assembled into
---------------------- working prototype.

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 1.6: The RAD Model
14 Software Engineering with UML
Using structured techniques, the developer first builds preliminary data Notes
models and business process models of the business requirements. Prototyping
then helps the analyst and users to verify those requirements and to formally ----------------------
refine the data and process models. All flavors of RAD have the potential for
providing a good framework for faster product development with improved ----------------------
code quality, but successful implementation and benefits often hinge on project ----------------------
type, schedule, software release cycle and corporate culture. Large software
vendors like Microsoft and IBM may use RAD for flagship products. ----------------------
Following are the phases of RAD model: ----------------------
i. Business modelling: It identifies the information flow between various
----------------------
business processes.
ii. Data modelling: It defines the data objects from data modelling. ----------------------
iii. Process modelling: It converts defined data objects to achieve information ----------------------
flow as per specific defined business objective.
----------------------
iv. Application generation: Automated tools are used to convert process
model into code and actual system. ----------------------
v. Testing and turnover: It tests new components or functions with its ----------------------
interfaces.
----------------------
Advantages of RAD model
i. Develops application in very short time. ----------------------
ii. Reusability of components. ----------------------
iii. Encourages customer feedback. ----------------------
Disadvantages of RAD model
----------------------
iv. Performance depends on teams in the software development.
----------------------
v. High skilled development team required.
vi. 
Cost of modelling and automated code generation is very high, so ----------------------
inapplicable to cheaper projects.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

Introduction to Software Process Models 15


Notes
Check your Progress 3
----------------------
Fill in the blanks.
----------------------
1. System engineering and analysis includes gathering requirement at
---------------------- the_______________ level
---------------------- 2. Software _________ focuses on four distinct attributes of a program.
3. The incremental model delivers a series of releases, called __________
----------------------
4. Evolutionary models are _______________
---------------------- 5. Prototyping model and spiral model are examples of ________model.
---------------------- 6. A ___________ is a working model that is functionally equivalent to
a component of the product.
----------------------
7. The spiral model is used most often in _____________projects.
---------------------- 8. Rapid application development is a software _________methodology.
---------------------- 9. The __________model concentrates on short development cycle of
system development.
----------------------

---------------------- 1.6 AGILE COMPUTING


---------------------- It is an SDLC model, which is a combination of iterative and incremental
---------------------- process model. An agile method focusses on code rather than design. It is best
suitable for small to medium-sized business system or software.
---------------------- It emphasises on process adaptability and customer satisfaction by quick
---------------------- delivery of software product. The agile method splits the product into small
incremental deliverables. The deliverables are provided in iterations of two
---------------------- to three weeks’ time. For every iteration, it involves a cross-functional team
working simultaneously on different phases of software SDLC model.
----------------------
This model is popular because of its flexibility and adaptability. Some of
---------------------- popular agile methods include rational unified process, extreme programming,
feature driven development and Dynamic System Development Model (DSDM).
----------------------
This method is considered a very realistic approach in software
---------------------- development and it promotes teamwork and cross-training. In this method,
every functionality of the software can be developed very rapidly and shown
----------------------
to the customer. It requires minimum resources. This methodology is perfectly
---------------------- suitable for changing requirements. It requires very little planning and is easy
to manage and gives flexibility to the developers. It enables simultaneous
---------------------- development of the software product.
---------------------- Some of the disadvantages are that it is not suitable for handling complex
dependencies. It involves more risk of sustainability, maintainability and
---------------------- extensibility. It depends heavily on customer interactions; so if customer is not
clear, it leads to software development in wrong direction. It has high level of
----------------------

16 Software Engineering with UML


dependency on individuals since there is less documentation. The transfer of Notes
technology to new team members is challenging due to lack of documentation.
----------------------
Some agile principles are:
i. Customer Involvement: Customers are completely involved in the ----------------------
development process.
----------------------
ii. Incremental Delivery: The software is developed in increments; at each
new increment the customer requirements are added. ----------------------
iii. Embrace Change: It always expects the customer requirements to ----------------------
change and the design should accommodate these changes.
----------------------
iv. Maintain Simplicity: It helps in removing the complexity of the system.
Agile developers recognise that documentation is an intrinsic part of any ----------------------
system, the creation and maintenance of which is a “necessary evil” to
some and an enjoyable task for others, an aspect of software development ----------------------
that can be made agile when you choose to do so. ----------------------
There are several valid reasons for documentation:
----------------------
i. Your project stakeholders require it: If your project stakeholders
request a document from you, perhaps at your suggestion, and understand ----------------------
the trade-offs involved (more on this later), then you must create the
----------------------
document. It is important to note that Extreme Programming (XP) is very
explicit about documentation being a business decision. ----------------------
ii. To define a contract model: Contract models define how your system
----------------------
and an external one interacts with one another. Some interactions are bi-
directional, whereas others are unidirectional, making the interaction(s) ----------------------
explicit to everyone involved. Contract models are often required when
an external group controls an information resource that your system ----------------------
requires, such as a database, legacy application or information service.
----------------------
iii. To support communication with an external group: It is not always
possible to co-locate a development team and it is not always possible ----------------------
to have project stakeholders (or at least the ones you need at the time) ----------------------
available at all times. When you need to work with an external group of
people, you need to find ways to communicate with them, and shared ----------------------
documentation is often part of the solution in combination with occasional
face-to-face discussions, teleconferencing, e-mail and collaborative ----------------------
tools. It is a mistake to use documentation as your primary means of ----------------------
communication because it is far too easy to misunderstand something
that has been written, but it is a good supporting mechanism. ----------------------
iv. To support organisational memory: One of the principles of agile ----------------------
modelling is “enabling the next effort is your secondary goal,” which is
meant as a counter-balance to the principle “Working software is your ----------------------
primary goal”. An important implication is that we not only need to develop
software, but we also need to develop the supporting documentation ----------------------
required to use, operate, support and maintain the software over time. ----------------------

Introduction to Software Process Models 17


Notes v. For audit purposes: The common theme was that we had to follow
a defined process and capture proof that we did so, resulting in more
---------------------- documentation than we would have normally written. In these situations,
you still want to create just enough documentation to get the job done.
----------------------
vi. To think something through: Many people will write documentation
---------------------- to either verify for themselves some group work they had just been
involved with or simply to increase their own understanding. The act of
----------------------
writing, of putting your ideas down on paper, can help you to solidify
---------------------- them and discover problems with your thinking. What appears clear and
straightforward in your mind can often prove to be very complicated once
---------------------- you attempt to describe it in detail, and you can often benefit from writing.
---------------------- 1.6.1 Extreme Programming
In this, the new versions of the software module may be build several
----------------------
times per day, and the increments are delivered to the customers every two
---------------------- weeks. For every build of the software module, all tests must be run and the
build accepted if the tests are successful.
----------------------
Extreme Programming (XP) is a pragmatic approach to program
---------------------- development that emphasises business results first and takes an incremental,
get-something-started approach to building the product, using continual testing
---------------------- and revision.
---------------------- Kent Beck, author of Extreme Programming Explained: Embrace
Change, developed the concept of XP. According to Beck, code comes first
---------------------- in XP. However, Beck emphasises that in order to write the code, you have to
---------------------- write a test for it first so that you will know when your code succeeds. Beck
also introduces the relatively novel idea that code which is so-called “extreme”
---------------------- level leads to a development process that is more responsive to customer needs
(“agile”) than traditional methods, while creating software of better quality.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 1.7(A) Extreme Programming

----------------------

----------------------

18 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 1.7(B) Extreme Programming
----------------------
Extreme Programming is described as being:
i. An attempt to reconcile humanity and productivity. ----------------------
ii. A mechanism for social change. ----------------------
iii. A path to improvement.
----------------------
iv. A style of development.
v. A software development discipline. ----------------------

The main aim of XP is to reduce the cost of change. In traditional system ----------------------
development methods, the requirements for the system are determined at the
beginning of the development project and often fixed from that point on. This ----------------------
means that the cost of changing the requirements at a later stage will be high. ----------------------
XP sets out to reduce the cost of change by introducing basic values, principles
and practices. By applying XP, a system development project should be more ----------------------
flexible with respect to changes.
----------------------
XP Activities
----------------------
XP describes four basic activities that are performed within the software
development process. ----------------------
i. Coding: The advocates of XP argue that the only truly important product of
----------------------
the system development process is code. Without code you have nothing.
Coding can be drawing diagrams that will generate code, scripting a web- ----------------------
based system or coding a program that needs to be compiled. Coding can
also be used to figure out the most suitable solution. ----------------------
ii. Testing: One cannot be certain of anything unless one has tested it. Testing ----------------------
is not a perceived, primary need for the customer. A lot of software is
shipped without proper testing and still works. In software development, ----------------------
XP says this means that one cannot be certain that a function works unless ----------------------

Introduction to Software Process Models 19


Notes one tests it. This raises the question of defining what one can be uncertain
about.
----------------------
Listening: Programmers do not necessarily know anything about the
iii. 
---------------------- business side of the system under development. The function of the system
is determined by the business side. For the programmers to find what the
---------------------- functionality of the system should be, they have to listen to business.
Programmers have to listen “in the large”; they have to listen to what the
----------------------
customer needs. Also, they have to try to understand the business problem,
---------------------- and give the customer feedback about his or her problem, improve the
customer’s own understanding of his or her problem.
----------------------
iv. Designing: From the point of view of simplicity, one could say that system
---------------------- development does not need more than coding, testing and listening. If
those activities are performed well, the result should always be a system
---------------------- that works. In practice, this will not work. One can come a long way
without designing but at a given time one will get stuck. The system
----------------------
becomes too complex and the dependencies within the system cease to be
---------------------- clear. One can avoid this by creating a design structure that organises the
logic in the system. Good design will avoid lots of dependencies within
---------------------- a system; this means that changing one part of the system will not affect
other parts of the system.
----------------------
Some of the extreme programming practices are as follows:
----------------------
• Incremental planning
---------------------- • Small releases
• Simple design
----------------------
• Test first development
---------------------- • Refactoring
---------------------- • Pair programming
• Collective ownership
----------------------
• Continuous integration
---------------------- • Sustainable space
• Onsite customer
----------------------

---------------------- Check your Progress 4


---------------------- State True or False.
---------------------- 1. An agile method focusses on design rather than code.

---------------------- 2. Contract models define how your system and an external one interacts
with one another.
----------------------
3. Extreme Programming (XP) is a pragmatic approach to object
---------------------- development.
4. The main aim of XP is to reduce the cost of change.
----------------------

20 Software Engineering with UML


1.7 COMPONENT-BASED DEVELOPMENT Notes
A Component-based Software Development (CBSE) approach is based ----------------------
on software reuse. It emerged from the failure of object-oriented development
to support effective reuse. So, a component-based software engineering is a ----------------------
process that focuses on the design and construction of software using reusable
----------------------
software components. Some of the main objectives of component-based
software engineering are as follows: ----------------------
i. To reduce cost and time ----------------------
ii. To improve quality of software
----------------------
iii. To detect defects within the system
----------------------
A component-based development follows software development
principles, such as independency between components, implementation of ----------------------
components are hidden, well-defined interfaces between components and
components’ platforms are shared and reduced development cost. ----------------------
Some of the CBSE essentials are as follows: ----------------------
i. Independency between components with well-defined interfaces. ----------------------
ii. Component standards which are used to integrate the components.
----------------------
iii. A middleware which is used for interoperability between components.
----------------------
iv. A development process for reuse.
Some of the problems of CBSE are: ----------------------
i. Component trustworthiness, if the source code is not available. ----------------------
ii. Who certifies the quality of the component? ----------------------
iii. How are the growing properties of the component compositions predicted?
----------------------
iv. How do we do trade-off analysis between the features of one component
and another? ----------------------
A component is an independent executable entity that can be constructed from ----------------------
one or more executable objects. A component acts as a service provider. These
services are made available through an interface and all the interactions to and ----------------------
from the components are done through interfaces.
----------------------
Some of the characteristics of component are as follows:
----------------------
i. Standardised: This model must define interfaces, metadata,
documentation and deployment. ----------------------
ii. Independent: It should be independent. ----------------------
iii. Composable: All the interactions must be through public interfaces. It
must also provide the external access. ----------------------

iv. Deployable: A component must be able to operate stand-alone. ----------------------


v. Documented: It should be documented for further needs. ----------------------

Introduction to Software Process Models 21


Notes Some of the examples of component models are EJB (Enterprise Java Beans)
model, COM+ model (.NET model) and CORBA component model.
----------------------
A component model specifies how the interfaces should be defined and the
---------------------- elements that should be included in an interface definition. A component
developed for specific application can be reused for another application if
---------------------- it is likely to be associated with another domain. For example in a library
management domain, the fundamental purposes are book issue, restock, book
----------------------
return, etc.
----------------------
Check your Progress 5
----------------------
Fill in the blanks.
----------------------
1. A component-based software development (CBSE) approach is based
---------------------- on software __________.
---------------------- 2. A component-based development follows software __________
principles.
----------------------
3. The ___________model specifies how the interfaces should be
---------------------- defined.
---------------------- 4. Component developed for specific application can be reused for
another ___________.
----------------------

---------------------- Activity 1
----------------------
Suppose you have to implement a Student Information System, which
---------------------- model would you prefer to use in order to implement this system? Justify
your answer.
----------------------

---------------------- Summary
---------------------- • Software myths prevail. Though they do are not clearly visible they have
the potential to harm all the parties involved in the software development
----------------------
process, mainly the developer team.
---------------------- • Software engineering is a layered technology. Most engineering
approaches (including software engineering) must rest on an organisational
----------------------
commitment to quality.
---------------------- • A software process contains a set of activities and associated results which
leads to development of software.
----------------------
• A linear process flow executes these activities in sequence. It begins with
---------------------- communication and ends with deployment. An iterative process flow
---------------------- repeats one or more activities before going to the next activity. A parallel
process flow executes one or more activities in parallel.
----------------------

22 Software Engineering with UML


• The incremental model delivers a series of releases, called increments Notes
that provide progressively more functionality for the customer as each
increment is delivered. ----------------------
• A prototype is a working model that is functionally equivalent to a ----------------------
component of the product. In many instances, the client only has a general
view of what is expected from the software product. ----------------------
• The spiral model is divided into a number of framework activities also ----------------------
called task regions. Typically, there are between three and six task regions.
----------------------
• Rapid Application Development (RAD) refers to a software development
life cycle designed to give much faster development and higher quality ----------------------
results than the traditional life cycle. Rapid application development is a
software development methodology, which involves iterative development ----------------------
and the construction of prototypes.
----------------------
• A component-based software development (CBSE) approach is based on
software reuse. It emerged from the failure of object-oriented development ----------------------
to support effective reuse. ----------------------
• Extreme Programming (XP) is a pragmatic approach to program
development that emphasizes business results first and takes an ----------------------
incremental, get-something-started approach to building the product, ----------------------
using continual testing and revision.
----------------------
Keywords ----------------------
• Process: Collection of related, structured activities or tasks that produce ----------------------
a specific service or product (serve a particular goal) for a particular
customer or customers. ----------------------
• Business modelling: It identifies the information flow between various ----------------------
business processes.
----------------------
• Extreme programming: Software development methodology which is
intended to improve software quality and responsiveness to changing ----------------------
customer requirements.
----------------------

Self-Assessment Questions ----------------------

1. What are evolutionary models? Explain different types of evolutionary ----------------------


models.
----------------------
2. What is Extreme Programming? Explain.
----------------------
3. Software engineering is a layered technology. Discuss.
4. Discuss the various software myths. ----------------------

----------------------

----------------------

Introduction to Software Process Models 23


Notes Answers to Check your Progress
---------------------- Check your Progress 1

---------------------- Fill in the blanks.


1. There are three types of software myths; these are management myth,
---------------------- customer myth and practitioner/developer myth.
---------------------- 2. Myths lead to false expectations.
---------------------- Check your Progress 2
State True or False.
----------------------
1. False
----------------------
2. False
---------------------- 3. True
---------------------- 4. True
---------------------- 5. True
Check your Progress 3
----------------------
Fill in the blanks.
----------------------
1. System engineering and analysis includes gathering requirement at the
---------------------- system level.
---------------------- 2. Software design focuses on four distinct attributes of a program.
3. The incremental model delivers a series of releases, called increments.
----------------------
4. Evolutionary models are iterative.
----------------------
5. Prototyping model and spiral model are examples of evolutionary model.
---------------------- 6. A prototype is a working model that is functionally equivalent to a
---------------------- component of the product.
7. The spiral model is used most often in large projects.
----------------------
8. Rapid application development is a software development methodology.
----------------------
9. The RAD model concentrates on short development cycle of system
---------------------- development.
Check your Progress 4
----------------------
State True or False.
----------------------
1. False
----------------------
2. True
---------------------- 3. False
---------------------- 4. True

----------------------

24 Software Engineering with UML


Check your Progress 5 Notes
Fill in the blanks.
----------------------
1. A component-based software development (CBSE) approach is based on
software reuse. ----------------------
2. A component-based development follows software development ----------------------
principles.
----------------------
3. The component model specifies how the interfaces should be defined.
4. Component developed for specific application can be reused for another ----------------------
application. ----------------------

----------------------
Suggested Reading
----------------------
1. Aggarwal, K. K. and Yogesh Singh. Software Engineering: Programs,
Documentation, Operating Procedures. New Delhi: New Age International ----------------------
Publisher.
----------------------
2. Agarwal, Bharat Bhushan and Sumit Prakash Tayal. Software Engineering.
New Delhi: Laxmi Publications. ----------------------
3. Jalote, Pankaj. An Integrated Approach to Software Engineering. Springer ----------------------
Publications.
4. Mishra, Jibitesh and Ashok Mohanty. Software Engineering. New Delhi: ----------------------
Pearson Publications. ----------------------
5. Pressman, Roger S. Software Engineering: A practitioners Approach.
----------------------
McGraw-Hill.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

Introduction to Software Process Models 25


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

26 Software Engineering with UML


Software Project Planning and Estimation
UNIT

2
Structure:

2.1 Introduction
2.2 Software Scope
2.2.1 Types of Scope
2.3 Software Project Estimation
2.3.1 Metrics for Software Quality
2.3.2 Halstead’s Software Science
2.3.3 McCabe’s Complexity Metric
2.4 Metrics in Project Estimation
2.4.1 Size Projection
2.4.2 Productivity Projection
2.5 Cost Estimation
2.5.1 Decomposition
2.5.2 Effort Estimation
2.5.3 Expert Judgement
2.5.4 Estimation by Analogy
2.5.5 Cost Estimation Tools
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

Software Project Planning and Estimation 27


Notes
Objectives
----------------------
After going through this unit, you will be able to:
----------------------
• Explain the software scope and its types
----------------------
• Discuss the concept of software project estimation
---------------------- • Describe the metrics in project estimation
---------------------- • Elaborate on the concept of the cost estimation

----------------------
2.1 INTRODUCTION
----------------------
The software project management process begins with a set of activities
---------------------- that are collectively called project planning. The first of these activities is
estimation. Estimation need to be conducted in a well-planned manner. Useful
---------------------- techniques for time and effort estimation do exist. Estimation lays a foundation
---------------------- for all other project planning activities, and project planning provides the road
map for successful software engineering. Estimation of resources, cost and
---------------------- schedule for a software development effort requires experience, access to good
historical information, and the courage to commit to quantitative measures
---------------------- when qualitative data are all that exists.
----------------------
2.2 SOFTWARE SCOPE
----------------------
Project scope is the part of project planning that involves determining
---------------------- and documenting a list of specific project goals, deliverables, tasks and
deadlines.  Scope management process for a project includes the following
----------------------
activities:
---------------------- Collect requirements: It is the process of defining and documenting the
1. 
---------------------- needs of the customers to meet the objectives of the project.
2. Defining the scope: This process involves developing a detailed
---------------------- description of the project and product.
---------------------- 3. Creating Work Breakdown Structure (WBS): This process involves
subdividing project deliverables and project work into smaller, more
---------------------- manageable components.
---------------------- 4. Verifying the scope: It is the process of formalising acceptance of the
completed project deliverables.
----------------------
5. Controlling the scope: This process involves monitoring the status of the
---------------------- project and product scope and managing changes to the scope baseline.
---------------------- 2.2.1 Types of Scope

---------------------- Scope can be defined for project as well as product. In the context of a
project, the scope can be of the following types:
----------------------

28 Software Engineering with UML


1. Project scope: Project scope defines the work to be performed to deliver Notes
the software. In order to develop software, we perform various activities
such as planning, monitoring and control, budgeting, scheduling, ----------------------
communicating, reporting and documentation. Each such activity is
clearly defined in the project scope. As each project is unique, project ----------------------
requirement varies in detailing, for example, communication and reporting ----------------------
requirements may vary with customer.
----------------------
2. Product scope: Product scope defines the expectations of the customer
from the product. Product scope broadly consists of functional and non- ----------------------
functional requirements of the software. Functional requirements include
various application specific functionalities, such as payroll processing, ----------------------
ledger posting, stock update, etc. Non-functional requirements describe the
----------------------
quality and security requirements, such as user authorisation, backup and
restore, processing speed and response time, etc. Product scope document ----------------------
acts as a base document for managing software development activities,
such as requirement gathering, analysis and design, coding and testing, ----------------------
etc. Product scope is generally further elaborated into comprehensive
----------------------
Software Requirement Specification (SRS) document. SRS document is
usually prepared after preliminary scope definition. ----------------------
Generally, project scope document includes the following:
----------------------
1. Project objective: Objective of project is the definite purpose behind the
initiation of the project. The objective gives direction to the project. A ----------------------
project can have multiple objectives. Very few organisations specifically
----------------------
define the objective of the project; most of the time, objectives are ignored.
A project manager must define the objective of the project. Defining ----------------------
project objectives needs skill and clarity about the purpose. Ability to
visualise the work undertaken with possible gains and losses improves the ----------------------
quality of the work. Quite often, the objectives are stated as a formality.
----------------------
Such objectives never help the project team. A well-stated objective can
decide whether the project is a success or a failure. ----------------------
2. Technique for setting goal/objective: Setting goal or objective means ----------------------
writing desired outcome of the project. Our tendency to think in general
terms adds vagueness to the objective. Vague objectives neither support ----------------------
any direction nor help in planning the activities to achieve the desired
purpose. To set clear and precise objective, SMART technique can be ----------------------
used. Let us understand the meaning of the word SMART in defining the ----------------------
objective.
• ‘S’ stands for specific. Specificity helps you to visualise your ----------------------
objective. ----------------------
• ‘M’ stands for measurable. Your objective should be measurable.
----------------------
• ‘A’ stands for achievable. Your capacity determines how much
you can achieve in a given time frame. You should always take ----------------------
into consideration your (in case of Project - Project Team’s) core
----------------------
strength.

Software Project Planning and Estimation 29


Notes • ‘R’ stands for realistic. Can you achieve an unreal goal?
• ‘T’ stands for time bound. While setting your goal, you should
----------------------
define the target date at which you want to achieve the desired
---------------------- result. Here you can state the start and end date in your objective.

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------
Fig. 2.1: Software Project Scope
----------------------
3. Product scope description: Let us quickly discuss the contents of product
---------------------- scope description.
i. Project requirement: This section describes the project-
----------------------
level requirement and not product requirements. Project-level
---------------------- requirements could be related to project planning, budgeting,
schedule and estimation and communication. For example,
---------------------- use of automated tools, such as MS Project or any other project
management software could be project-level requirement.
----------------------
ii. Project deliverables: Once we understand project and product
---------------------- requirement, we have to convert these requirements into
---------------------- deliverables. Deliverable is the actual output or end result delivered
to the customer. We must understand the difference between
---------------------- deliverables and requirements. For example, you are assigned,
as a Project Manager, to deliver the word-editing software;
---------------------- then main deliverable of the project is word-editing software.
---------------------- However, providing facilities such as spell-checking, printing,
mail connectivity in your editing software are the requirements of
---------------------- the product. Deliverables are nothing but collective requirements.
Deliverables comprise requirements.
----------------------
iii. Project boundary: Project boundary explicitly states what is
---------------------- included and excluded from the project. For example, in ERP
implementation project, you can explicitly state that historic legacy
---------------------- data migration is excluded from the scope of the project work,

30 Software Engineering with UML


since many a times the migration becomes a separate project and it Notes
heavily consumes your time and cost. If you do not explicitly define
what is excluded from the project, your stakeholders may assume ----------------------
that you are supposed to deliver.
----------------------
iv. Product acceptance criteria: Product acceptance criteria define
how the delivered product is accepted by the customer. It defines ----------------------
various processes and procedures and guidelines for accepting
----------------------
criteria. Once your product is ready, it needs to be formally accepted
by the customer for releasing the payment. Before accepting a ----------------------
product, the customer may want to check quality, fitness for use and
features of the product as per scope. ----------------------
v. Project constraints: In order to deliver a product, we are utilising ----------------------
various resources. These resources directly or indirectly affect the
performance of the project. The main constraints are scope, budget, ----------------------
schedule, human resources and technology. Each of these resources
----------------------
has a limitation with respect to the project. We cannot exploit these
constraints beyond their limitation. ----------------------
vi. Time constraint: When projects are limited by specific time
----------------------
frames, you cannot delay or exceed that time limit. For example,
some projects need to be finished in a specific time; after that time, ----------------------
there is no importance for that project, e.g., implementation of
electoral voting system to be finished before the declared date of ----------------------
election.
----------------------
vii. Budget constraint: Budget constraint defines total budget
sanctioned for the project. If project exceeds beyond the budget, ----------------------
the customer may not be liable for paying the extra amount; hence, ----------------------
enough care should be taken while defining the scope of the project
so that only required things are delivered to the customer within the ----------------------
given budget.
----------------------
viii. Schedule constraint: A constraint that affects or delays your project
activities is called scheduled constraint. For example, organisations ----------------------
have only one software architect assigned early on some project and
he is not available for the project next two months. The availability ----------------------
of a software architect can delay your project schedule by two ----------------------
months. Here the architect is the source of schedule constraint.
ix. Technology constraint: In IT industry, new technologies are always ----------------------
emerging and project team may not have hands-on experience in ----------------------
the newest technology. You cannot afford to have team expertise in
every technology and you need to manage the project with available ----------------------
technology. Many a times, the technology itself has limitation, for
example, the capacity of a database to store huge data, support for ----------------------
new features such as object-oriented technology. These constraints ----------------------
are called technology constraints and are written explicitly.
----------------------

Software Project Planning and Estimation 31


Notes x. Project assumptions: Assumptions are the things that you believe to
be true. With your prior experience, you assume that something will go
---------------------- in a particular way but in reality, it may not be true. In a project, you
assume that the key resource is available till the project completion but
---------------------- in reality, he may leave the project prior to completion. Another most
---------------------- common assumption could be that the team will grasp new technology in
short time. These assumptions are possible sources of risk and need to be
---------------------- mitigated to avoid project failure.
----------------------
Check your Progress 1
----------------------
Fill in the blanks.
----------------------
1. __________is the part of project planning that involves determining
---------------------- and documenting a list of specific project goals, deliverables, tasks
and deadlines. 
----------------------
2. To set clear and precise objective, _________ technique can be used.
---------------------- Multiple Choice Multiple Response.
---------------------- 1. Types of scope are:
---------------------- i. Project scope
ii. Product scope
----------------------
iii. Estimation scope
----------------------
iv. Program scope
----------------------

---------------------- 2.3 SOFTWARE PROJECT ESTIMATION


---------------------- Effective software project estimation is one of the most challenging and
important activities in software development. Proper project planning and
---------------------- control is not possible without a sound and reliable estimate. As a whole, the
---------------------- software industry does not estimate projects well and does not use estimates
appropriately. We suffer far more than we should as a result and we need to
---------------------- focus on improving the situation.

---------------------- Underestimating a project leads to understaffing it (resulting in staff


burnout), under-scoping the quality assurance effort (running the risk of low
---------------------- quality deliverables), and setting too short a schedule (resulting in loss of
credibility as deadlines are missed). For those wanting to avoid this situation
---------------------- by generously padding the estimate, overestimating a project can be just about
---------------------- as bad for the organisation! If you give a project more resources than it really
needs without sufficient scope controls, it will use them. The project is then
---------------------- likely to cost more than it should (a negative impact on the bottom line), take
longer to deliver than necessary (resulting in lost opportunities), and delay the
---------------------- use of your resources on the next project.
----------------------

32 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 2.2: Software Project Estimation
----------------------
The four basic steps in software project estimation are:
i. Estimate the size of the development product. This generally ends up in ----------------------
either Lines of Code (LOC) or Function Points (FP), but there are other
----------------------
possible units of measure.
ii. Estimate the effort in person-months or person-hours. ----------------------

iii. Estimate the schedule in calendar months. ----------------------


iv. Estimate the project cost in dollars (or local currency). ----------------------
2.3.1 Metrics for Software Quality
----------------------
Software quality metrics are a subset of software metrics that focus on the
quality aspects of the product, process and project. In general, software quality ----------------------
metrics are more closely associated with process and product metrics than with
----------------------
project metrics.
Nonetheless, the project parameters, such as the number of developers and ----------------------
their skill levels, the schedule, the size and the organisation structure certainly ----------------------
affect the quality of the product. Software quality metrics can be divided further
into end-product quality metrics and in-process quality metrics. The essence ----------------------
of software quality engineering is to investigate the relationships among in-
process metrics, project characteristics, and end-product quality, and, based on ----------------------
the findings, to engineer improvements in both process and product quality. ----------------------
The types of metrics are:
----------------------
• Process metrics
----------------------
• Product metrics
• Project metrics ----------------------

----------------------

----------------------

Software Project Planning and Estimation 33


Notes Process metrics are the measure of the software development process, such as:
- Overall development time
----------------------
- Type of methodology used
----------------------
Process metrics are collected across all projects and over long periods
---------------------- of time. Their intent is to provide indicators that lead to long-term software
process improvement.
----------------------
Project metrics are the measures of software project and are used to
---------------------- monitor and control the project. They enable a software project manager to:

---------------------- - Minimise the development time by making the adjustments necessary to


avoid delays and potential problems and risks.
---------------------- - Assess product quality on an ongoing basis and modify the technical
---------------------- approach to improve quality.
Project metrics are used in estimation techniques and other technical
----------------------
work. Metrics collected from past projects are used as a basis from which effort
---------------------- and time estimates are made for current software project. As a project proceeds,
actual values of human effort and calendar time expended are compared to the
---------------------- original estimates. This data is used by the project manager to monitor and
control the project.
----------------------
Product metrics are measures of the software product at any stage of
---------------------- its development, from requirement to installed system. Product metrics may
measure:
----------------------
- The complexity of the software design
----------------------
- The size of the final program
---------------------- - The number of pages of documentation produced
---------------------- 2.3.2 Halstead’s Software Science
---------------------- Halstead complexity metrics were developed by the late Maurice Halstead
as a means of determining a quantitative measure of complexity directly from
---------------------- the operators and operands in the module to measure a program module’s
complexity directly from source code. Among the earliest software metrics,
----------------------
they are strong indicators of code complexity. Halstead Science is an estimation
---------------------- technique to find out size, time and effort of a software.
Number of operators and operands
----------------------
Halstead´s metrics is based on interpreting the source code as a sequence of
---------------------- tokens and classifying each token to be an operator or an operand.
---------------------- First we need to compute the following numbers, given the program:
---------------------- • n1 = the number of distinct operators
• n2 = the number of distinct operands
----------------------
• N1 = the total number of operators
----------------------
• N2 = the total number of operands
34 Software Engineering with UML
The number of unique operators and operands (n1 and n2) as well as the total Notes
number of operators and operands (N1 and N2) are calculated by collecting the
frequencies of each operator and operand token of the source program. ----------------------
From these numbers, following measures can be calculated: ----------------------
Program length (N)
----------------------
The program length (N) is the sum of the total number of operators and operands
in the program: ----------------------
N = N 1 + N2 ----------------------
Vocabulary size (n) ----------------------
The vocabulary size (n) is the sum of the number of unique operators and
operands: ----------------------

n = n1 + n2 ----------------------
Program volume (V) ----------------------
The program volume (V) is the information contents of the program, measured ----------------------
in mathematical bits. It is calculated as the program length times the 2-base
logarithm of the vocabulary size (n): ----------------------
V = N * log2 (n) ----------------------
Halstead’s volume (V) describes the size of the implementation
of an algorithm. The computation of V is based on the number of ----------------------
operations performed and operands handled in the algorithm. Therefore, ----------------------
V is less sensitive to code layout than the lines-of-code measures.
The volume of a function should be at least 20 and at most 1,000. The volume ----------------------
of a parameter-less one-line function that is not empty is about 20. A volume
greater than 1,000 tells that the function probably does too many things. ----------------------

The volume of a file should be at least 100 and at most 8,000. These limits ----------------------
are based on volumes measured for files whose LOCpro and V(G) are near their
----------------------
recommended limits. The limits of volume can be used for double-checking.
Difficulty level (D) ----------------------
The difficulty level or error proneness (D) of the program ----------------------
is proportional to the number of unique operators in the program.
D is also proportional to the ratio between the total number of operands and the ----------------------
number of unique operands (i.e., if the same operands are used many times in
----------------------
the program, it is more prone to errors).
D = (n1 / 2) * (N2 / n2) ----------------------

Program level (L) ----------------------


The program level (L) is the inverse of the error proneness of the program, ----------------------
i.e., a low-level program is more prone to errors than a high-level program.
----------------------
L=1/D
----------------------

Software Project Planning and Estimation 35


Notes Effort to implement (E)
The effort to implement (E) or understand a program is proportional to
----------------------
the volume and to the difficulty level of the program.
---------------------- E=V*D
---------------------- Estimated program length

---------------------- According to Halstead, The first hypothesis of software science is that the
length of a well-structured program is a function only of the number of unique
---------------------- operators and operands.

---------------------- The estimated length is denoted by N^


N^= n1log2n1+n2log2n2
----------------------
Potential volume
----------------------
Among all the programs, the one that has minimal size is said to have the
---------------------- potential volume, V*. Halstead argued that the minimal implementation of any
algorithm was through a reference to a procedure that had been previously written.
---------------------- The implementation of this algorithm would then require nothing more than invoking
the procedure and supplying the operands for its inputs and output parameters.
----------------------
V*= (2+n2*) log2 (2+n2*)
---------------------- Estimated program level/difficulty
---------------------- Halstead offered an alternate formula that estimates the program level.

---------------------- L^ =2n2/n1N2
Hence, D =1 /L^
----------------------
Effort
----------------------
Halstead hypothesised that the effort required to implement a program
---------------------- increases as the size of the program increases. It takes more effort to implement
a program at a lower level than the higher level.
----------------------
E= V/L^
---------------------- Time to implement (T)
---------------------- John Stroud suggested that human mind is capable of making a limited
number of elementary discriminations per second. Stroud claims that β
---------------------- (stroud number) ranges between five and 20. Since Effort uses elementary
---------------------- discriminations as its unit of measure, the programming time would be:
T=E/β
----------------------
β is normally set to 18 since this seemed to give best results in Halstead earliest
---------------------- experiments.

----------------------

----------------------

----------------------

36 Software Engineering with UML


Example Notes
Let us consider the following C program:
----------------------
main()
----------------------
{
int a, b, c, avg; ----------------------

scanf(“%d %d %d”, &a, &b, &c); ----------------------


avg = (a + b + c) / 3; ----------------------
printf(“avg = %d”, avg);
----------------------
}
----------------------
The unique operators are: main, (), {}, int, scanf, &, =, +, /, printf
The unique operands are: a, b, c, avg, “%d %d %d”, 3, “avg = %d» ----------------------

• , , ----------------------

• , , ----------------------

• Calculated Program Length: ----------------------

----------------------

• Volume: ----------------------

----------------------
• Difficulty: ----------------------

• Effort: ----------------------

----------------------
• Time required to program: seconds ----------------------

----------------------
• Number of delivered bugs:
----------------------
2.3.3 McCabe’s Complexity Metric
----------------------
The cyclomatic (McCabe’s) complexity of a section of source code is the
count of the number of linearly independent paths through the source code. For ----------------------
instance, if the source code contained no decision points such as IF statements or
----------------------
FOR loops, the complexity would be 1, since there is only a single path through
the code. If the code had a single IF statement containing a single condition, ----------------------
there would be two paths through the code: one path where the IF statement is
evaluated as TRUE and one path where the IF statement is evaluated as FALSE. ----------------------
Mathematically, the cyclomatic complexity of a structured program is ----------------------
defined with reference to the control flow graph of the program, a directed
graph containing the basic blocks of the program, with an edge between two ----------------------

Software Project Planning and Estimation 37


Notes basic blocks if control may pass from the first to the second. The complexity M
is then defined as,
----------------------
M = E − N + 2P
---------------------- where
---------------------- E = the number of edges of the graph

---------------------- N = the number of nodes of the graph


P = the number of connected components
----------------------
An alternative formulation is to use a graph in which each exit point is
---------------------- connected back to the entry point. In this case, the graph is strongly connected,
and the cyclomatic complexity of the program is equal to the cyclomatic number
---------------------- of its graph (also known as the first Betti number), which is defined as
---------------------- M = E − N + P.
---------------------- This may be seen as calculating the number of linearly independent cycles
that exist in the graph, i.e., those cycles that do not contain other cycles within
---------------------- themselves. Note that because each exit point loops back to the entry point,
there is at least one such cycle for each exit point.
----------------------
For a single program (or subroutine or method), P is always equal to 1. So
---------------------- a simpler formula for a single subroutine is:
---------------------- M = E − N + 2.

---------------------- Cyclomatic complexity may, however, be applied to several such programs


or subprograms at the same time (e.g., to all of the methods in a class), and in
---------------------- these cases P will be equal to the number of programs in question, as each
subprogram will appear as a disconnected subset of the graph.
----------------------
McCabe showed that the cyclomatic complexity of any structured
---------------------- program with only one entrance point and one exit point is equal to the number
of decision points (i.e., “if” statements or conditional loops) contained in that
----------------------
program plus one. However, this is true only for decision points counted at the
---------------------- lowest, machine-level instructions. Decisions involving compound predicates
like those found in high-level languages like IF cond1 AND cond2 THEN ...
---------------------- should be counted in terms of predicate variables involved, i.e., in this example
one should count two decision points, because at machine level it is equivalent
----------------------
to IF cond1 THEN IF cond2 THEN ....
---------------------- Cyclomatic complexity may be extended to a program with multiple exit
points; in this case it is equal to:
----------------------
π − s + 2,
----------------------
where π is the number of decision points in the program, and s is the
---------------------- number of exit points.

----------------------

----------------------

38 Software Engineering with UML


Notes
Check your Progress 2
----------------------
Multiple Choice Multiple Response.
----------------------
1. The basic steps in software project estimation are:
----------------------
i. Estimate the number of stakeholders.
ii. Estimate the effort in person-months or person-hours. ----------------------
iii. Estimate the schedule in calendar months. ----------------------
iv. Estimate the project cost in dollars (or local currency). ----------------------
Fill in the blanks.
----------------------
1. __________ are the measures of software project and are used to
monitor and control the project. ----------------------
2. ___________ are measures of the software product at any stage of its ----------------------
development, from requirement to installed system.
----------------------

Activity 1 ----------------------

----------------------
Consider the following program and find the program length, volume,
difficulty, effort, time required to below program. ----------------------
int f=1, n=7; ----------------------
for (int i=1; i<=n; i+=1)
----------------------
f*=i;
----------------------

2.4 METRICS IN PROJECT ESTIMATION ----------------------

----------------------
To obtain estimation, we can decompose the problem to be solved, or decompose
the process. Decomposition should be done in such a way that: ----------------------
• Size can be properly estimated.
----------------------
• Cost or effort required for each component can be accurately estimated.
----------------------
• The team’s ability to handle the components is well known.
• The estimated values will be relatively unaffected by changes to the ----------------------
requirements. ----------------------
Software metrics are a way of putting a value/measure on certain aspects
of development allowing it to be compared to other projects. These values have ----------------------
to be assessed correctly otherwise they will not give accurate measurements ----------------------
and can lead to false estimations, etc.
----------------------
Metrics are used to maintain control over the software development
process. It allows managers to manage resources more efficiently so the overall ----------------------

Software Project Planning and Estimation 39


Notes team would be more productive. Some examples of metrics include size
projections like source byte size, source lines of code, function pointers, GUI
---------------------- features and productivity projections such as productivity metrics.
---------------------- The metrics can be used to measure size, cost, effort, product quality of
a project, as well as putting a value on the quality of the process taken and
---------------------- personal productivity. There are certain factors that have to be taken into
account when comparing different projects with each other using metrics. If
----------------------
one project is written in a different language, then the number of lines of code
---------------------- could be significantly different or perhaps the larger project has many more
errors and bugs in it. Measurements such as Function Pointers give a better
---------------------- indication because they are the actual methods that are in the project rather than
the number of lines.
----------------------
Using metrics, companies can make much better estimations on the cost,
---------------------- length, effort, etc. of a project which leads to them giving a more accurate
view of the overall project. This better view will allow the company to bid
----------------------
for projects more successfully, make projects more likely to succeed and will
---------------------- greatly reduce the risk of late delivery, failure, being penalised for late delivery,
bankruptcy, etc.
----------------------
The processes that manage the project and its code can have issues, such
---------------------- as build failures, patches needed, etc. that can affect the software metric’s
measures. Using ISO 9000 can help alleviate these issues. For smaller
---------------------- companies where customer retention is important, using metrics to better the
software development process and improve on overall project quality, delivery
----------------------
time, etc. will make the customers happy which may lead to continued business.
---------------------- 2.4.1 Size Projection
---------------------- The different methods of size projection as one of the metrics in project
estimation are discussed below.
----------------------
• Source byte size
----------------------
Source byte size is a measure of the actual size of the source code data
---------------------- (e.g., in kilobytes). It measures the file size vs. packages, classes, methods,
etc. The overall byte size of the project can be estimated which would
---------------------- give a better indication of the type/size of hardware needed to use the
software. This becomes an issue on systems/devices where they are of a
----------------------
limited nature (e.g., watch, washing machine, intelligent fridge, etc.)
---------------------- The byte size of the source code would vary greatly depending on which
programming language was used to develop it. For example, a program
----------------------
developed in Java could be much smaller than the same program coded in
---------------------- COBOL. If we were to compare executable byte size of programs written
in different languages, we would see that there would be a difference too.
---------------------- The compiler compiles source code into byte code so different compilers
would give out different executable file sizes.
----------------------
As more development is done and the project increases, the overall byte
---------------------- size of the project increases. This will give estimations on how much

40 Software Engineering with UML


space is needed to store, backup, etc. the source files and also the size of Notes
transfers over the network. Although this is not much of a problem these
days with the cost of storage, transfer bandwidth, etc. being so cheap, it is ----------------------
a metric that can be used for this type of estimation (storage).
----------------------
As the byte size builds up, searching and indexing will take slightly longer
every time it increases. ----------------------
• Source Lines of Code (SLOC) ----------------------
SLOC gives the size of the project by counting all the lines of source
----------------------
code in a project. It is used to measure effort both before as an estimate
and after as an actual value. It comes from the days of FORTRAN and ----------------------
assembly coding.
----------------------
SLOC gives a much clearer image to developers on the size of the project.
When code is written, integration and unit testing can be performed so ----------------------
measures of programming productivity and quality can be assessed.
----------------------
Source lines of code themselves are not as meaningful as the other
metrics. Just because one project has more lines of code than another does ----------------------
not make it more complex or give it a better quality rating. When using
number of lines of code as a metric, other metrics would need to be used ----------------------
such as product quality. When product quality is looked at with number ----------------------
of lines of code, it gives a much better reflection of the overall project’s
quality, radio of good code to buggy code, efficiency of the code, etc. ----------------------
Source lines of code can be measured from another point of view. This is ----------------------
measuring the actual number of lines of code written in a specific amount
of time. When looking at a project level, the number of lines of code that ----------------------
is measured would typically come from the overall lines of code written
throughout the project within a specific amount of time. ----------------------

If the SLOC metric was being applied to an individual developer or a ----------------------
team then the number of lines of code would obviously be measured on
----------------------
the lines written by the developer or team respectively.
When developers use auto-generated code (from GUI designers, ----------------------
frameworks, etc.) it can lead to incorrect productivity measures. These
----------------------
lines of code should be removed from the calculation to give a better
indication of the actual number of lines written by the developer/team. ----------------------
When using SLOC to assess different projects written in different ----------------------
programming languages, it cannot be taken directly. This is because
different programming languages can take more/less lines to do the same ----------------------
functions. The measure of number of lines of code need to be condensed/
expanded so more meaningful values can be assessed. The use of function ----------------------
points would give a better indication because the number of function ----------------------
points would remain the same (i.e., a function point may take 10 lines
in C# and 30 lines in FORTRAN but there still is only one function). ----------------------
Since the number of lines of code would be different, even for the same
functionality, the effort required would be completely different. ----------------------

Software Project Planning and Estimation 41


Notes When comparing projects by using SLOC, it is far more useful if there are
orders of magnitudes between them.
----------------------
There are two ways to measure lines of code:
---------------------- 1. Physical SLOC = Lines of source code + Comments + Blank lines1
---------------------- 2. Logical SLOC = Number of lines of functional code (“statements”)

----------------------
1
if blank lines are less the 25% of the section.
Names of SLOC measures:
----------------------
• K-LOC – 1,000 Lines of Code
---------------------- • K-DLOC - 1,000 Delivered Lines of Code
---------------------- • K-SLOC - 1,000 Source Lines of Code
• M-LOC - 1,000,000 Lines of Code
---------------------- • G-LOC - 1,000,000,000 Lines of Code
---------------------- • T-LOC - 1,000,000,000,000 Lines of Code
[K – Kilo, M – Mega, G – Giga, T – Tera]
----------------------
• Function points
----------------------
The function point metric was described by Alan J. Albrecht in 1979 at IBM
---------------------- and its official release was in 1984 for the community. This is a relatively
old technique for measurement of certain software module or property.
---------------------- Function Point Analysis (FPA) is a technique accepted by International
Organisation for Standardisation (ISO) for measuring functional size
----------------------
of Information Systems (IS). Function point is a measurement unit or
---------------------- software metric for FPA that is the end-user analysis of the functions
needed for the software. FPA does not take into an account technology
---------------------- used for the software project, programming language or tools. Function
points are grouped into five types of functionality:
----------------------
 Internal logical files – logical data that is nurtured inside the
---------------------- application.
----------------------  
External interface files – logical data that resides outside the
application but is restrained with the application that is measured.
----------------------
 
External input – preservation, management and processing of
---------------------- logical data through external input, through peripherals and other
sources.
----------------------
 External output – logical output of data by application.
----------------------
 External inquiries – requests and responses for external data
---------------------- procedures.
Each of these types of functionality is given a metric called weighting
----------------------
factor. Those weighted functions are known as Unadjusted Function
---------------------- Points (UFPs). Reviewing 14 General System Characteristics (GSCs) and
summing those assessed GSCs, we get Degree of Influence (DI). Technical
---------------------- Complexity Factor (TCF) is 0.65 + 0.01 * DI, further Function Points are

42 Software Engineering with UML


calculated UFPs * TCF. Implementation of function point metrics is a Notes
very effective way to measure the size of the software at the beginning
of the development phase after establishing needs and requirements of ----------------------
the software. Since late 70s up till now, software engineering has been
developing and many of the function points have been outdated or less ----------------------
relevant to modern software development moving from procedural ----------------------
programming practice to object oriented.
----------------------
• Objects
In software development, there is a need for application extensibility ----------------------
and software reuse. Object- oriented languages like Java and C++ makes
----------------------
it possible to develop applications that are easy to change, add a new
functionality by reusing existing resources. By the reuse of existing ----------------------
resources we have to manage dependencies that are between modules
of the application and cause of the changes that may arise through the ----------------------
dependencies. These factors are described as software package metrics
----------------------
that are derived from:
 
Class cohesion: A measurement for the unity of purpose in the ----------------------
object or class; elements within the class or object should make as
----------------------
much purpose as possible.
 
Coupling: Dependency that is between two or more classes is ----------------------
heavily related together. Changing one class may force drastic ----------------------
changes in other classes that are highly coupled together. Low
coupling is when changing one class does not require changes in ----------------------
another classes or modules because modules communicate together
through well-established interfaces. ----------------------

 Cardinality: Number of objects in the relationship between classes. ----------------------


 
Open-Closed Principle (OCP): One of the most important ----------------------
principles of object-oriented design. OCP means opened for module
extension and closed from modification (changing the source code ----------------------
of the module).
----------------------
 
Single responsibility: Changes may occur in the class domain
logic or format. We need to minimise those reasons by separating ----------------------
the class into two or more classes, if we need to introduce a change.
----------------------
This change would not affect the whole class or module if placed
into two separate responsibilities. ----------------------
 
Dependency Inversion Principle (DIP) or inversion of control:
----------------------
Dependency upon abstraction but not upon concretion. Every
dependency should target interface or abstract class. ----------------------
 
Interface segregation principle: Creation of many client specific ----------------------
interfaces is better than general purpose interface. This is because
many clients depend on the functions of the same class that require ----------------------
change and recompilation of the project.
----------------------

Software Project Planning and Estimation 43


Notes  
Listkov substitution principle: Subclasses or derived classes
should be substitutable for their base classes; the user of the base
---------------------- class should function if the derived class of the base class is passed
to the base class.
----------------------
There are many other principles that make up software package metrics
---------------------- that define measure.
---------------------- • GUI features
Since the 70s and 80s when command line interfaces were dominant,
----------------------
things started to change with Windows, Icons, Menus and Pointing
---------------------- devices. WIMP and Graphical User Interface (GUI) substituted consol
input in the late 80s. It is very difficult to measure the functionality of the
---------------------- application vs. GUI. All depends on how efficiently algorithms that solve
the problem are implemented to add a new functionality. Significance
----------------------
of the lines contained in the software or lines written is not too much.
---------------------- Developers working on the project write on average 10 to 15 lines a day.
The real importance is what those lines offer to the user, what functionality
---------------------- do they provide behind the graphical interface.
---------------------- • I t is very difficult to measure GUI metrics because user interfaces have
special characteristics. Visibility in design plays a very important role.
---------------------- Functions should be visible for users, easy to find and predict the steps
---------------------- that follow on basis of common sense.
• F
 eedback on the notion of visibility, how long should we wait for the
---------------------- response, e.g., pressing the button.
---------------------- • C
 onstraint is a graphical design principle of restraining users from
performing particular operations, fading out options on the menu or
---------------------- restricting access to other graphical representations. This minimises
---------------------- making a wrong choice.
• C
 onsistency is an operation that uses similar elements for achieving
----------------------
similar tasks.
---------------------- • A
 ffordance is an important feature of the design of GUI that is obvious for
the user to know how to use the application, e.g., button is highlighted while
----------------------
moving over the mouse pointer. For the user, it is fairly understandable
---------------------- that it is the operation of pressing on it.

---------------------- 2.4.2 Productivity Projection


The different productivity projection methods are discussed below.
----------------------
Software engineering productivity
----------------------
Projecting productivity is all about measurements. In general, these
---------------------- measurements involve the rate at which a software engineer produces software
and the accompanied documentation. While quality is also an important aspect
---------------------- of the produced software, the measurement is not quality oriented. In essence,
the goal is to measure the useful functionality produced in a unit of time.
----------------------

44 Software Engineering with UML


Productivity metrics Notes
Metrics on productivity are divided into two main categories:
----------------------
1. Size of product based on some output from the software process, i.e.,
lines of delivered source code, object code instructions, etc. ----------------------
2. Function-related measurements based on the functionality of the ----------------------
deliverables. This is expressed in function points.
----------------------
Function points
Function points are determined on the basis of a combination of programmer ----------------------
characteristics, such as external inputs and outputs, user interactions, external ----------------------
interfaces and files used by the system followed by associating a weight with
each of these characteristics. Finally, a “function point count” is computed by ----------------------
multiplying each raw count by the weight and summing all values.
----------------------
Challenges in software metrics
----------------------
The biggest challenge that lie in measures is mainly the estimation process of
the size, the total elapsed time assigned to programming. In addition, it can be ----------------------
difficult to define elements such as “a line of code”, “programs to determine
part of the system”. ----------------------
Quality and productivity ----------------------
Although metrics can provide estimates for productivity, they usually do not
----------------------
take quality into account. One can write thousands lines of working code, but
the challenge remains to determine how to measure the quality of this code in ----------------------
regard to productivity.
----------------------
Check your Progress 3 ----------------------
State True or False. ----------------------
1. Metrics are used to maintain control over the software development ----------------------
process.
----------------------
2. SLOC gives the size of the project by counting all the words of source
code in a project. ----------------------
3. Coupling represents independency between two or more classes that
----------------------
are heavily related together.
----------------------
2.5 COST ESTIMATION ----------------------
A cost estimate is the approximation of the cost of a program, project ----------------------
or operation. The cost estimate is the product of the cost estimating process.
The cost estimate has a single total value and may have identifiable component ----------------------
values. A problem with a cost overrun can be avoided with a credible, reliable ----------------------
and accurate cost estimate. An estimator is the professional who prepares cost
estimates. ----------------------

Software Project Planning and Estimation 45


Notes 2.5.1 Decomposition
Cost estimations in general are based on a form of reference data also
----------------------
known as analogy data. This reference data can be data from previous successful
---------------------- projects, consultancy data, available models such as mathematical relationships
or parametric cost models, and rules-of-thumb in software cost estimations. The
---------------------- apply factor of these forms of data depends on the current stage in the software
life cycle. A combination of these methods can be especially useful in the early
----------------------
conceptual stages of development when available models are combined with
---------------------- high-level reference data which provide a general concept overview. When the
requirements and design become clearer in a later stage of the project, more
---------------------- specified functional decompositions are likely to become the main method of
cost estimation.
----------------------
2.5.2 Effort Estimation
----------------------
In order make a correct estimate of the costs involved in a project, it is
---------------------- important to make a breakdown of the required work elements. A good tool to
do this could be the application of a Work Breakdown Structure (WBS).
----------------------
The planner estimates the effort (e.g., person-months) that will be required
---------------------- to accomplish each software engineering tasks for each software function.
These data comprise the central matrix of the effort table. Labour rates (i.e.,
---------------------- cost/unit effort) are applied to each of the software engineering tasks. It is very
---------------------- likely the labour rate will vary for each task. Senior staff is heavily involved
in requirements analysis and early design tasks; junior staff (inherently less
---------------------- costly) is involved in later design tasks, code and early testing.

---------------------- 2.5.3 Expert Judgement


Suitable domain experts provide estimates for fine-grained tasks, and
---------------------- using suitable software and statistical tools a reliable measurement is achieved.
---------------------- The emphasis is on the knowledge and experience of the expert.
Categorise expert judgement as either intuitive or structured. Intuitive
----------------------
expert judgement relies solely on the experience and opinion of the expert.
---------------------- Structured judgement for cost estimation also relies on expert knowledge but
validates estimates using historical data and statistical tools.
----------------------
At the task level, work breakdown structures are often used to achieve a
---------------------- high degree of granularity of tasks. The chosen expert then provides a range of
estimated values for the task (actual, best case, worst case). Various statistical
---------------------- formulas are applied to these measures to ensure a reasonable result.
---------------------- Jorgensen proposes the following steps for estimation experts:

---------------------- 1. Evaluate estimation accuracy, but avoid high evaluation pressure.


2. Avoid conflicting estimation goals.
----------------------
3. Ask the estimators to justify and criticise their estimates.
----------------------
4. Avoid irrelevant and unreliable estimation information.
---------------------- 5. Use documented data from previous development tasks.

46 Software Engineering with UML


6. Find estimation experts with relevant domain background and good Notes
estimation records.
----------------------
7. Estimate top-down and bottom-up independently of each other.
8. Use estimation checklists. ----------------------
9. Combine estimates from different experts and estimation strategies. ----------------------
10. Assess the uncertainty of the estimate. ----------------------
11. Provide feedback on estimation accuracy and development task relations.
----------------------
12. Provide estimation of training opportunities.
----------------------
2.5.4 Estimation by Analogy
Use Estimation by Analogy (EBA) to identify completed projects and ----------------------
features that are similar to a new project and use that historical data to create
----------------------
estimates for the cost and effort of a newer project.
EBA hinges on identifying the “analogies” between previous projects ----------------------
and planned projects. Some software applications exist which can help identify ----------------------
such projects (e.g., The ANGEL Project). By identifying a feature or component
that is of similar complexity to a previous feature, and making a reasonable ----------------------
judgement on the relative sizes of the feature, an estimation can be arrived at.
----------------------
Steve McConnell outlines a five-step approach to EBA for a new project as
follows: ----------------------
1. Get detailed size, effort and cost results for a similar previous project. ----------------------
2. Compare the size of the new project to a similar past project.
----------------------
3. Build up the estimate for the new project’s size as a percentage of the old
project’s size. ----------------------
4. Create an effort estimate based on the size of the new project compared to ----------------------
the previous project.
----------------------
5. Check for consistent assumptions across the old and new projects.
A few key factors govern the accuracy of estimates: ----------------------

• B
 reak down the project into relatively detailed features. Measuring too ----------------------
few features will not provide enough accuracy, too much detail meanwhile
risks introducing extraneous elements into the model. ----------------------

• J udgment is required when calculating comparisons. Measurements of ----------------------


completed projects may need to be adjusted to account for complexity,
----------------------
ability or other facts that had a bearing on the outcome of that project.
• M
 cConnell stresses that you should resist the temptation to inflate ----------------------
estimates to accommodate inherent inaccuracy in estimates. For example,
----------------------
if your estimates suggest a figure between 40 and 50 weeks, resist the
temptation to communicate an effort of 55 weeks. ----------------------

----------------------

Software Project Planning and Estimation 47


Notes 2.5.5 Cost Estimation Tools
It is estimated that there has been 75 major software cost estimation tools
----------------------
produced over the last decade.
---------------------- Some software measurement tools are listed below:
---------------------- • T
 he COCOMO site provides various tools that support COCOMO based
measurement.
----------------------
• T
 he ANGEL project from Bournemouth University. Based on research on
---------------------- Analogy method of estimation. The version of the software currently on
the site required JDK 1.4 to install but will run with Java 1.4 and above.
---------------------- To get around this problem do the following:
---------------------- • Save the angel.jar installation file to a directory.

---------------------- • Extract the contents using the command.


jar xf angel.jar.
----------------------
• Locate the file copy.jar that was extracted using the previous
---------------------- command.

---------------------- • Extract the contents of copy.jar using the command.


jar xf copy.jar.
----------------------
• Locate the bin directory and in there you will find batch files and
---------------------- shell scripts for running ANGEL.

---------------------- • NASA’s NASA Cost Estimation Website provides various cost estimation
models. While heavily focused on aerospace and aeronautics, it is still
---------------------- worth looking over.
---------------------- • QSM provides a suite of products for software products called SLIM
tools. QSM is one of the leading providers of commercial software
---------------------- measurement tools.
----------------------
Check your Progress 4
----------------------
Fill in the blanks.
----------------------
1. Cost estimations in general are based on a form of reference data also
---------------------- known as ________.

---------------------- 2. Structured judgement for cost estimation also relies on _________


but validates estimates using historical data and statistical tools.
---------------------- 3. The __________ has a single total value and may have identifiable
---------------------- component values.

----------------------
Activity 2
----------------------

---------------------- Find and list the cost estimation tools used in your organisation.

48 Software Engineering with UML


Summary Notes

• Project scope is the part of project planning that involves determining ----------------------
and documenting a list of specific project goals, deliverables, tasks and
----------------------
deadlines. 
• Scope management process for a project includes collecting the ----------------------
requirements, defining the scope, creating Work Breakdown Structure ----------------------
(WBS), verifying the scope, controlling the scope.
• To set clear and precise objective, the SMART technique can be used. ----------------------

• Effective software project estimation is one of the most challenging and ----------------------
important activities in software development. Proper project planning and
control is not possible without a sound and reliable estimate. ----------------------

• The four basic steps in software project estimation are: ----------------------


 E
 stimate the size of the development product. This generally ends ----------------------
up in either Lines of Code (LOC) or Function Points (FP), but there
are other possible units of measure. ----------------------
 Estimate the effort in person-months or person-hours. ----------------------
 Estimate the schedule in calendar months. ----------------------
 Estimate the project cost in dollars (or local currency).
----------------------
• Software quality metrics are a subset of software metrics that focus on the
quality aspects of the product, process and project. In general, software ----------------------
quality metrics are more closely associated with process and product
metrics than with project metrics. ----------------------

• Types of Metrics are process metrics, product metrics and project metrics. ----------------------
• Halstead complexity metrics were developed by the late Maurice Halstead ----------------------
as a means of determining a quantitative measure of complexity directly
from the operators and operands in the module to measure a program ----------------------
module’s complexity directly from source code.
----------------------
• The cyclomatic (McCabe’s) complexity of a section of source code is
the count of the number of linearly independent paths through the source ----------------------
code.
----------------------
• Metrics are used to maintain control over the software development
process. It allows managers to manage resources more efficiently so the ----------------------
overall team would be more productive. ----------------------
• SLOC gives the size of the project by counting all the lines of source code
in a project. ----------------------

• Function point is a measurement unit or software metric for FPA that is ----------------------
the end-user analysis of the functions needed for the software.
----------------------
• A cost estimate is the approximation of the cost of a program, project or
operation. The cost estimate is the product of the cost estimating process. ----------------------

Software Project Planning and Estimation 49


Notes The cost estimate has a single total value and may have identifiable
component values.
----------------------
• Use Estimation by Analogy (EBA) to identify completed projects and
---------------------- features that are similar to a new project and use that historical data to
create estimates for the cost and effort of a newer project.
----------------------

---------------------- Keywords
---------------------- • Software scope: It describes the data and control to be processed,
function, performance, constraints, interfaces and reliability.
----------------------
• SMART: Specific, Measurable, Achievable, Realistic and Time bound.
---------------------- • Estimation by Analogy: It is used to identify completed projects and
---------------------- features that are similar to a new project and that historical data is used to
create estimates for the cost and effort of a newer project.
----------------------
---------------------- Self-Assessment Questions
---------------------- 1. Explain the different metrics in project estimation.

---------------------- 2. Discuss McCabe’s complexity metric software project estimation.


3. What are the different cost estimation tools? Explain.
----------------------
4. What do you understand by software scope? Explain the types of scope.
----------------------

----------------------
Answers to Check your Progress

---------------------- Check your Progress 1


Fill in the blanks.
----------------------
1. 
Project scope is the part of project planning that involves determining
---------------------- and documenting a list of specific project goals, deliverables, tasks and
deadlines. 
----------------------
2. To set clear and precise objective, SMART technique can be used.
----------------------
Multiple Choice Multiple Response
---------------------- 1. Types of scope are:
---------------------- i. Project scope
---------------------- ii. Product scope
Check your Progress 2
----------------------
Multiple Choice Multiple Response.
----------------------
1. The basic steps in software project estimation are:
---------------------- ii. Estimate the effort in person-months or person-hours.
---------------------- iii. Estimate the schedule in calendar months.

50 Software Engineering with UML


iv. Estimate the project cost in dollars (or local currency). Notes
Fill in the blanks.
----------------------
1. 
Project metrics are the measures of software project and are used to
monitor and control the project. ----------------------
2. 
Product metrics are measures of the software product at any stage of its ----------------------
development, from requirement to installed system.
----------------------
Check your Progress 3
State True or False. ----------------------

1. True ----------------------
2. False ----------------------
3. False
----------------------
Check your Progress 4
----------------------
Fill in the blanks.
1. Cost estimations in general are based on a form of reference data also ----------------------
known as analogy data. ----------------------
2. Structured judgement for cost estimation also relies on expert knowledge
----------------------
but validates estimates using historical data and statistical tools.
3. The cost estimate has a single total value and may have identifiable ----------------------
component values.
----------------------

Suggested Reading ----------------------

1. 
Stellman, Andrew and Jennifer Greene. Applied Software Project ----------------------
Management. O’Reilly Media. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

Software Project Planning and Estimation 51


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

52 Software Engineering with UML


System Engineering and Business Process Engineering
UNIT

3
Structure:

3.1 Introduction
3.2 Computer-Based Systems
3.3 The System Engineering Hierarchy
3.3.1 Business Process Engineering
3.4 Product Engineering
3.5 Requirements Engineering
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

System Engineering and Business Process Engineering 53


Notes
Objectives
----------------------
After going through this unit, you will be able to:
----------------------
• Explain the concept of computer-based systems
----------------------
• Discuss the concept of business process and product engineering
---------------------- • Understand requirements engineering model
----------------------

---------------------- 3.1 INTRODUCTION


---------------------- A system is a set of interacting or interdependent components forming an
integrated whole. Every system is delineated by its spatial and temporal boundaries,
----------------------
surrounded and influenced by its environment, described by its structure and
---------------------- purpose and expressed in its functioning. Fields that study the general properties
of systems include systems science, systems theory, systems modeling, systems
---------------------- engineering, cybernetics, dynamical systems, thermodynamics, complex
systems, systems analysis and design and systems architecture. They investigate
----------------------
the abstract properties of systems’ matter and organisation, looking for concepts
---------------------- and principles that are independent of domain, substance, type or temporal
scale. Some systems share common characteristics including:
----------------------
• A
 system has structure; it contains parts (or components) that are directly
---------------------- or indirectly related to each other.

---------------------- • A
 system has behaviour; it exhibits processes that fulfill its function or
purpose.
---------------------- • A
 system has interconnectivity; the parts and processes are connected by
---------------------- structural and/or behavioral relationships.
• A
 system’s structure and behaviour may be decomposed via subsystems
---------------------- and sub-processes to elementary parts and process steps.
---------------------- • A
 system has behaviour that, in relativity to its surroundings, may be
categorised as both fast and strong.
----------------------
The term system may also refer to a set of rules that governs structure
---------------------- and/or behaviour. Alternatively, and usually in the context of complex social
systems, the term institution is used to describe the set of rules that govern
----------------------
structure and/or behaviour. In this unit, we will discuss the concepts of computer-
---------------------- based systems and the points related to systems engineering and requirements
engineering.
----------------------

----------------------

----------------------

----------------------

54 Software Engineering with UML


3.2 COMPUTER-BASED SYSTEMS Notes
A computer-based system is essentially an information system using computer ----------------------
technology to carry out some or all of its planned tasks. The basic components
of computer-based information systems are: ----------------------
• Hardware: These are the devices like the monitor, processor, printer and ----------------------
keyboard, all of which work together to accept, process, show data and
information. ----------------------

• Software: These are the programs that allow the hardware to process the ----------------------
data.
----------------------
• Databases: These are the gathering of associated files or tables containing
related data. ----------------------
• Network: It is a connecting system that allows diverse computers to ----------------------
distribute resources.
----------------------
• Procedures: These are the commands for combining the components
above to process information and produce the preferred output. ----------------------
The first four components (hardware, software, database and network) ----------------------
make up what is known as the information technology platform. Information
technology workers could then use these components to create information ----------------------
systems that watch over safety measures, risk and the management of data.
These actions are known as information technology services. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

Fig. 3.1: A Computer-Based System ----------------------

System Engineering and Business Process Engineering 55


Notes Certain information systems support parts of organisations; others support
entire organisations, and still others, support groups of organisations. Recall
---------------------- that each department or functional area within an organisation has its own
collection of application programs or information systems. These Functional
---------------------- Area Information Systems (FAIS) are supporting pillars for more general IS
---------------------- namely, business intelligence systems and dashboards.
As the name suggests, each FAIS supports a particular function within
----------------------
the organisation, e.g., accounting IS, finance IS, Production/Operation
---------------------- Management (POM) IS, marketing IS and human resources IS. In finance and
accounting, managers use IT systems to forecast revenues and business activity,
---------------------- to determine the best sources and uses of funds, and to perform audits to ensure
that the organisation is fundamentally sound and that all financial reports and
----------------------
documents are accurate.
---------------------- Other types of organisational information systems are transaction
processing systems, enterprise resource planning, office automation system,
----------------------
management information system, decision support system, expert system,
---------------------- executive dashboard, supply chain management system and electronic
commerce system. Dashboards are a special form of IS that support all managers
---------------------- of the organisation. They provide rapid access to timely information and direct
access to structured information in the form of reports. Expert systems attempt
----------------------
to duplicate the work of human experts by applying reasoning capabilities,
---------------------- knowledge and expertise within a specific domain.
Mainly, the usages of these elements are described as:
----------------------
• Procedures: These are the steps which define the specific use of each
---------------------- system element or the procedural context in which the system resides.
---------------------- • Documentation: It is the descriptive information that portrays the use
and operation of the system.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

56 Software Engineering with UML


Notes
Check your Progress 1
----------------------
Fill in the blanks. ----------------------
1. ___________ are the steps which define the specific use of each
----------------------
system element or the procedural context in which the system resides.
2. ___________ is the descriptive information that portrays the use and ----------------------
operation of the system.
----------------------
3. ___________ may also refer to a set of rules that governs structure
and/or behaviour. ----------------------
4. 
A _____________ is essentially an information system using ----------------------
computer technology.
----------------------
Match the following.
----------------------
i. Hardware a. Commands for combining the components to
process information and produce the output. ----------------------
ii. Software b. Connecting system that allows diverse computers
to distribute resources. ----------------------
iii. Databases c. Gathering of associated files or tables containing
----------------------
related data.
iv. Networks d. Programs that allow the hardware to process the ----------------------
data.
v. Procedures e. Devices which work together to accept, process, ----------------------
show data and information.
----------------------

3.3 THE SYSTEM ENGINEERING HIERARCHY ----------------------

----------------------
System engineering is an interdisciplinary field of engineering that focuses
on how to design and manage complex engineering systems over their life ----------------------
cycles. Issues such as reliability,  logistics and coordination among different
teams (requirements management), evaluation measurements, and other ----------------------
disciplines become more difficult when dealing with large or complex projects.
----------------------
System engineering deals with work processes, optimisation methods and risk
management  tools in such projects. It overlaps technical and human-centred ----------------------
disciplines, such as control engineering, industrial engineering, organisational
studies and project management. System engineering ensures that all likely ----------------------
aspects of a project or system are considered and integrated into a whole.
----------------------
Regardless of its domain of focus, system engineering encompasses a
collection of top-down and bottom-up methods to navigate the hierarchy. The ----------------------
system engineering process usually begins with a “world view,” that is, the
----------------------
entire business of product domain is examined to ensure that the proper business
or technology context is established. The world view is refined to focus more ----------------------
fully on specific domain of interest.
----------------------

System Engineering and Business Process Engineering 57


Notes Within a specific domain, the need for targeted system elements (e.g.,
data, software, hardware, and people) is analysed. Finally, the analysis design
---------------------- and construction of a targeted system element is initiated. At the top of the
hierarchy, a very broad context is established and at the bottom, detailed
---------------------- technical activities performed by the relevant engineering discipline (e.g.,
---------------------- hardware or software engineering) are conducted.
The system engineering process begins with a world view, the business
----------------------
or product domain is examined in order to ensure that the proper business
---------------------- or technology context can be established. The world view is mainly refined
to focus on a specific domain of interest, within a specific domain; the need
---------------------- for targeted system elements is analysed. Finally, the analysis, design and
construction of targeted system elements are initiated. At the world view level,
----------------------
a very broad context is established. Moreover, at the bottom level, detailed
---------------------- technical activities are conducted by the relevant engineering discipline such as
software engineering.
----------------------
The key to system engineering is a clear understanding of context. For
---------------------- software development this means creating a “world view” and progressively
narrowing its focus until all technical detail is known.
----------------------
In software engineering there is rarely one right way of doing something.
---------------------- Instead, designers must consider the tradeoffs present in the feasible solutions
and select one that seems advantageous for the current problem. This section lists
---------------------- several factors that need to be examined by software engineers when evaluating
alternative solutions (assumptions, simplifications, limitations, constraints and
----------------------
preferences).
---------------------- Regardless of its domain of focus, system engineering encompasses a
---------------------- collection of top-down and bottom-up methods to navigate the hierarchy
illustrated below:
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 3.2: System Engineering Hierarchy
58 Software Engineering with UML
3.3.1 Business Process Engineering Notes
Business process engineering is a way in which organisations study their
----------------------
current business processes and develop new methods to improve productivity,
efficiency and operational costs. The following are its important aspects: ----------------------
• Uses an integrated set of procedures, methods and tools to identify how
----------------------
information systems can best meet the strategic goals of an enterprise.
• Focusses first on the enterprise and then on the business area. ----------------------
• Creates enterprise models, data models and process models. ----------------------
• Creates a framework for better information management distribution and ----------------------
control.
----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 3.3: Business Process Engineering Hierarchy
----------------------
3.4 PRODUCT ENGINEERING ----------------------

Product engineering makes the customer’s desire for the set of defined ----------------------
capabilities into a resulting working product. This goal is achieved by
establishing product architecture and a support infrastructure. The product ----------------------
architecture components mainly consist of people, hardware, software and ----------------------
data. Also, the support infrastructure includes the technology required to tie the
components together and the information to support the components. ----------------------
Requirements engineering elicits the requirements from the customer ----------------------
and allocates function and behaviour to each of the four components. System
component engineering happens next as a set of concurrent activities that ----------------------
address each of the components separately.
----------------------
– Each component takes a domain-specific view but maintains
communication with other domains. ----------------------
– The actual activities of the engineering discipline takes on an element ----------------------
view.
System Engineering and Business Process Engineering 59
Notes • Analysis modeling allocates requirements into function, data and
behaviour.
----------------------
• Design modeling maps the analysis model into data/class, architectural,
---------------------- interface and component design.

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

---------------------- Fig. 3.4: Product Engineering Hierarchy


----------------------
Check your Progress 2
----------------------
Fill in the blanks.
----------------------
1. __________ is an interdisciplinary field of engineering.
----------------------
2. The key to system engineering is a clear understanding of __________.
---------------------- 3. _____________ is a way in which organisations study their current
---------------------- business processes.
4. ______________modeling maps the analysis model into data/class. 
----------------------

----------------------

---------------------- 3.5 REQUIREMENTS ENGINEERING


---------------------- The process of requirements engineering is regarded as one of the most
---------------------- important aspects of building a software system. Within a software development
project, across all phases, it specifically deals with all the activities related to
---------------------- requirements. It is an integral part of the Software Development Life Cycle
(SDLC) under the software development and software project management
---------------------- processes and is based on the use of various methodologies, tools and techniques
---------------------- of software engineering.
Essentially, the requirements engineering phase occurs at the beginning of
---------------------- the software development life cycle; however, depending on the SDLC process
---------------------- model adopted, its scope extends beyond the initial phases throughout the
lifetime of the system. It requires competencies related to product development
60 Software Engineering with UML
techniques, project management skills and people management skills besides Notes
understanding of software process management.
----------------------
The process of requirements engineering, which makes use of various
tools, techniques and methodologies, must be adapted to the needs of the specific ----------------------
process model used, project, product, or people doing the work. Generally, the
process of requirements engineering involves chronological process steps and ----------------------
related activities which may involve several iterations depending on the type of
----------------------
the system being developed and the SDLC process model being followed.
Renowned experts in the domain of software such as Gerald Weinberg, ----------------------
Roger Pressman and Barry Boehm have suggested several approaches and
----------------------
models to describe the process of requirements engineering for gathering and
understanding software requirements and preparing specifications. For example, ----------------------
Gerald Weinberg has suggested the requirement engineering steps for analysing
requirements as shown in Figure 3.5 below. ----------------------

----------------------
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 3.5: Weinberg’s Steps in Analysing Requirements
----------------------
Similarly, Roger Pressman has suggested the requirements engineering
steps as shown in Figure 3.6 below. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

System Engineering and Business Process Engineering 61


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 3.6: Pressman’s Requirements Engineering Steps
----------------------
Pressman’s steps include requirement elicitation (understanding what the
---------------------- customer wants), requirement analysis and negotiation (analysing needs and
negotiating a reasonable solution), requirement specification (specifying the
----------------------
solution unambiguously), system modeling, requirement validation (validating
---------------------- the specification) and requirement management.

---------------------- Finally, the requirements engineering steps suggested by Barry Boehm are as
shown in Figure 3.7 below.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

62 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

Fig. 3.7: Boehm’s Requirements Engineering Steps ----------------------


In Boehm’s model, win conditions, negotiation, mutual gain, tradeoffs ----------------------
and win-win agreements are taken into account for prioritising requirements
and preparing the requirements specification activities. ----------------------

For the purpose of our discussion and understanding, listed below are the ----------------------
process steps and the related activities of requirements engineering based on
the above models. ----------------------

i. Requirements elicitation: This process step broadly involves the ----------------------


requirements inception, requirements identification and requirements
elicitation activities. ----------------------

• Requirements inception relates to the use of context-free questions ----------------------


to establish a basic understanding of the problem, the people who
----------------------
want the solution, the overall nature of the solution expected, and for
gauging the effectiveness of the collaboration between customers ----------------------
and developers.
----------------------

System Engineering and Business Process Engineering 63


Notes • Requirements identification involves enlisting and articulating the
basic well-known and fairly defined needs.
----------------------
• Requirements elicitation refers to finding out or extracting from the
---------------------- clients/users requirements which are unclear, vague or concealed
and need explicit articulation for the understanding of the developer
---------------------- team. This phase also covers aspects, such as what the overall
product/solution objectives are, which needs are to be supported on
----------------------
priority, how the product/solution fits into business needs, and what
---------------------- kind of use will be made of the product/solution on a day-to-day
basis.
----------------------
ii. Requirements analysis: This process step broadly involves the
---------------------- requirements elaboration, requirements analysis and requirements
negotiation activities.
----------------------
• Requirements elaboration focuses on the development of a refined
---------------------- technical model of software functions, user interactions, features
and constraints based on the requirement elicitation information.
----------------------
• Requirements analysis involves prioritising the requirements,
---------------------- preparing a checklist for each requirement, highlighting and
reviewing problems, breaking down requirements into suitable
---------------------- level of detail comprehendible to developers, arriving at a high
---------------------- level of abstract of the product/solution.
• Requirements negotiation involves checking requirements and
---------------------- resolving stakeholder/user conflicts involving requirements
---------------------- categorisation and organisation into subsets, establishing
relationship among requirements, reviewing requirements for
---------------------- correctness, confirmation of requirement priority based on customer
needs.
----------------------
iii. Requirements specification: This process step broadly involves
---------------------- requirements specification and system modeling activities.
---------------------- • Requirement specification refers to the documentation of the
requirements in a software requirements specification document
---------------------- which is a written work product, based on several well-defined
standards and formats, describing the function, performance and
----------------------
development constraints of the product/solution.
---------------------- • System modeling involves creation of models depicting the various
requirements at various levels of details using entity relationship
----------------------
diagrams, data flow diagrams, state transition diagrams, activity
---------------------- diagrams, and use-case diagrams, often using a notation such as the
unified modeling language. System models aid in communication
---------------------- and seeking confirmation of clients/users on the completeness and
prioritisation of requirements, the functions and behaviour of the
----------------------
proposed product/solution, the logical structure of data, data flows
---------------------- and the relationship between entities of the system.

64 Software Engineering with UML


iv. Requirements validation and verification: This process step broadly Notes
involves requirements validation and requirements verification activities.
----------------------
• Requirements validation involves the conduction of formal
technical reviews to examine and conform that each of the work ----------------------
products after development adhere to the quality norms as per the
respectively specified requirement and that all the work products ----------------------
conform to the overall standards defined at the process, project and
----------------------
the product level.
• Requirements verification involves checking that the documented ----------------------
software requirements specification and system models which were
----------------------
arrived at, at the end of the requirement specification phase are
consistent and meet stakeholder/client end-user needs. ----------------------
v. Requirements management: This process step broadly involves
----------------------
requirements change control, requirements tracing, requirements version
control and requirements status tracking activities. These generally relate ----------------------
to sets of activities that help project team to identify, control and track
requirements and changes as project proceeds. ----------------------
• Requirements change control involves receiving requirements ----------------------
change proposals after the system is developed and put into use,
analysing their impacts and updating the requirement documents ----------------------
after approval. ----------------------
• Requirements tracing involves identifying requirements in the
requirement documents, tagging them with a unique identifier, ----------------------
classifying them by their type (e.g., functional, data, behavioural, ----------------------
interface or output), defining links between the requirement
documents and the system elements, creating the traceability tables ----------------------
(e.g., features, source, dependency, subsystem, interface) and
finally updating the traceability tables whenever requirements are ----------------------
modified. ----------------------
• Requirements version control involves defining the version
identification scheme for the set of requirements in the requirements ----------------------
document, identifying version for each requirement and updating ----------------------
them whenever requirements are modified or new ones added.
----------------------
• Requirements status tracking involves defining the status of
requirements based on their implementation in the final product/ ----------------------
solution, recording the status updates when requirements are met in
the latest versions of the final product/solution and preparing status ----------------------
reports for intimation of all concerned with the project.
----------------------

----------------------

----------------------

----------------------

System Engineering and Business Process Engineering 65


Notes
Check your Progress 3
----------------------

---------------------- State True or False.


1. Requirements version control involves defining the version
----------------------
identification scheme.
---------------------- 2. The process of requirements engineering is regarded as one of the
most important aspects of building a software system.
----------------------
3. Requirements inception relates to the use of context-full questions.
----------------------
4. Requirements analysis involves non-prioritising the requirements.
---------------------- 5. System modeling involves creation of models depicting the various
---------------------- requirements.

----------------------
Activity 1
----------------------

---------------------- Consider the library management system and gather the requirements of
the same and illustrate the various steps/methods used in its requirements
---------------------- engineering.
----------------------
Summary
----------------------

---------------------- • The term system may refer to a set of rules that governs structure and/
or behaviour. Alternatively, and usually in the context of complex social
---------------------- systems, the term institution is used to describe the set of rules that govern
structure and/or behaviour.
----------------------
• A  computer-based system  is essentially an information system using
---------------------- computer technology to carry out some or all of its planned tasks.
• System engineering deals with work processes, optimisation methods
----------------------
and  risk management  tools in projects. It overlaps technical and
---------------------- human-centred disciplines, such as  control engineering,  industrial
engineering, organisational studies and project management.
----------------------
• The system engineering process begins with a world view, the business or
---------------------- product domain is examined in order to ensure that the proper business or
technology context can be established.
----------------------
• Business process engineering is a way in which organisations study
---------------------- their current business processes and develop new methods to improve
productivity, efficiency and operational costs.
---------------------- • Product engineering makes the customer’s desire for the set of defined
---------------------- capabilities into a resulting working product. This goal is achieved by
establishing product architecture and a support infrastructure. The product
---------------------- architecture components mainly consist of people, hardware, software
and data.
66 Software Engineering with UML
• The process of requirement engineering, which makes use of various Notes
tools, techniques and methodologies, must be adapted to the needs of the
specific process model used, project, product or people doing the work. ----------------------

----------------------
Keywords
----------------------
• System engineering: It uses a host of tools that include modeling and
simulation, requirements analysis and scheduling to manage complexity. ----------------------
• Product engineering: The process of designing and developing a device, ----------------------
assembly or system such that it can be produced.
----------------------
• Requirement engineering: It emphasises the use of systematic and
repeatable techniques that ensure the completeness, consistency and ----------------------
relevance of the system requirements.
----------------------

Self-Assessment Questions ----------------------

1. Explain the various steps of requirements engineering. ----------------------


2. 
Discuss the importance and relevance of various levels of system ----------------------
engineering hierarchy.
----------------------
3. State the various levels of product engineering.
4. Discuss the hierarchy of business process engineering. ----------------------

----------------------
Answers to Check your Progress
----------------------
Check your Progress 1
----------------------
Fill in the blanks.
----------------------
1. 
Procedures are the steps which define the specific use of each system
element or the procedural context in which the system resides. ----------------------
2. 
Documentation is the descriptive information that portrays the use and
----------------------
operation of the system.
3. 
System  may also refer to a set of rules that governs structure and/or ----------------------
behaviour.
----------------------
4. A  computer-based system  is essentially an information system using
computer technology. ----------------------

Match the following. ----------------------


i. – e. ----------------------
ii. – d.
----------------------
iii. – c.
----------------------
iv. – b.
v. – a. ----------------------

System Engineering and Business Process Engineering 67


Notes Check your Progress 2
Fill in the blanks.
----------------------
1. System engineering is an interdisciplinary field of engineering.
----------------------
2. The key to system engineering is a clear understanding of context.
---------------------- 3. 
Business process engineering is a way in which organisations study their
---------------------- current business processes.
4. Design modeling maps the analysis model into data/class. 
----------------------
Check your Progress 3
----------------------
State True or False.
---------------------- 1. True
---------------------- 2. True

---------------------- 3. False
4. False
----------------------
5. True
----------------------

---------------------- Suggested Reading


---------------------- 1. Sommerville, Ian. Software Engineering. Addison-Wesley.

---------------------- 2. 
Watson, Gregory H. Business Systems Engineering: Managing
Breakthrough Changes for Productivity and Profit. Wiley.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

68 Software Engineering with UML


System Modelling and UML - I
UNIT

4
Structure:

4.1 Introduction
4.2 System Modelling and Analysis
4.3 UML and UML Use Case-Driven Object-Oriented Analysis
4.3.1 Unified Modelling Language (UML)
4.3.2 UML Use Case-Driven Object-Oriented Analysis
4.3.3 Use-Case Diagram Components
4.3.4 Use Cases for Testing and Validation
4.4 Static Modelling using Class Diagram
4.4.1 Class Diagram
4.4.2 Relationships
4.5 Activity Diagram
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

System Modelling and UML - I 69


Notes
Objectives
----------------------
After going through this unit, you will be able to:
----------------------
• Understand the basic concepts of system modelling
----------------------
• Explain the use of UML to do system analysis
---------------------- • Demonstrate use case diagram, class diagram and activity diagram
----------------------

----------------------
4.1 INTRODUCTION

---------------------- Developing a model is a creative work. System modelling helps analysts


to understand the functionality of the system whereas models are used to
---------------------- communicate with customers. An analyst is a person working on creating
different models which help him to communicate with customers. The analyst
---------------------- has different perspectives. There are basic three types of perspectives. The first
---------------------- is external perspective showing the systems context or environment. The second
is the behavioural perspective showing the behaviour of the system, and the
---------------------- third one is the structural perspective showing the system or data architecture.
----------------------
4.2 SYSTEM MODELLING AND ANALYSIS
----------------------
There are different types of models like data processing model that shows the
---------------------- data is processed at different stages in a system; composition model shows
how entities are composed of other entities; architectural model shows the
---------------------- principal subsystem; classification model shows how entities have common
---------------------- characteristics; and response or stimulus model shows the system’s interaction
with events.
---------------------- Context models: These are used to describe operational context of a system and
---------------------- they clearly define the system boundaries by classifying external and internal
entities. There are several social and organisational aspects which may cause
---------------------- or affect the decision on where to position the system boundaries. Architectural
models show the system and its relationship with other systems.
----------------------
Process models: Process models are useful for identifying different types
---------------------- of processes within the system. These models are also useful for identifying
and showing the different process that are supported by the system. Data flow
----------------------
models may be used to show the process and the flow of the information from
---------------------- one process to another process.
Behavioural models: These models are useful to depict and describe the
----------------------
overall behaviour of a system. There are two types of behavioural model;
---------------------- one is data processing model and the other is state machine model. The data
processing model shows how data is processed as it flows through the system.
---------------------- Data processing models may be Data Flow Diagrams (DFDs) used to show the
system’s data processing. DFD shows how the data flows through the system.
----------------------

70 Software Engineering with UML


It contains simple notations that the customer can understand easily. It shows Notes
start to end data flow within a system. The state machine shows the system’s
responses to events. ----------------------
There are two types of events within the system - external events and internal ----------------------
events. It shows how the system will behave in response to these events. These
state machines contain states as nodes and events as arcs between two nodes. ----------------------
When an event occurs, the system moves from one state to another state. These
----------------------
two types describe different aspects of the system, so both are required to depict
behaviour of a system. ----------------------
Semantic data models: Semantic data models are used to describe the logical
----------------------
structure of data. It is like the entity-relation-attribute model. It is widely used
in database design called ER diagrams. In Unified Modelling Language (UML), ----------------------
there is no specific notation for this model. But object and its association model
can be used to describe semantic data models. ----------------------
Object models: Object models are used to describe the system in terms of ----------------------
object classes and their association. An object class is a logical construction
over a set of objects with common attributes and operations. There are different ----------------------
types of relationships used in object models, such as generalisation, aggregation,
----------------------
dependency and realisation. Different object models may be produced, such as
inheritance models, aggregation models and interaction models. As we live in ----------------------
the world of objects, these are the entities. An object model is a natural way of
depicting the real-world entities within the system. ----------------------
So, a system model is an abstract view of the system. Different types of models ----------------------
provide different system information. Context models show the position of
a system in its environment with the other systems and processes. Data flow ----------------------
models may be used to model the data processing in a system. State machine ----------------------
models the systems behaviour in response to internal or external events. Semantic
data models describe the logical structure of the data which is imported to or ----------------------
exported by the system. Object models describe logical system entities, their
classification and aggregation. Interaction models show the interaction between ----------------------
the system and other side actors (users). ----------------------
Analysis is concerned with the primary abstractions like classes and objects. It
requires a mechanism that represents the problem domain. In object-oriented ----------------------
analysis and design, the class models help in analysing the system by identifying ----------------------
different classes and representing the relationships among them. It is represented
by class diagram in UML. UML dynamic models like collaboration diagrams ----------------------
are also useful to describe the different collaborations between classes. In the
analysis, only the classes that are in the problem domain are modelled. There ----------------------
is also scope of modelling the supporting classes like interface, databases, ----------------------
communication, etc. when constructing a system modelling and analysis plays
an important role. ----------------------

----------------------

----------------------

System Modelling and UML - I 71


Notes
Check your Progress 1
----------------------

---------------------- Fill in the blanks.


---------------------- 1. An __________ is a person who works on creating different models
which help him to communicate with customers.
----------------------
Match the following.
---------------------- i. Context models a. Describe the logical structure of data
---------------------- ii. Process models b. Define system boundaries

---------------------- iii. Behavioural model c. Identify various types of processes


iv. Semantic data models d. State machine model
----------------------
v. Object model e. Describes classes and relationships
----------------------
----------------------
4.3 UML AND UML USE CASE-DRIVEN OBJECT-
---------------------- ORIENTED ANALYSIS
----------------------
In this section, we will be discussing about the UML and UML use case-
---------------------- driven object- oriented analysis.
4.3.1 Unified Modelling Language (UML)
----------------------
UML is a general-purpose notation that is used to visualise, specify,
---------------------- construct, document the artifacts of software systems. UML is the result of an
---------------------- effort taken by Booch, Rumbaugh and Jacobson to simplify and consolidate the
large number of OO development methods and notations.
---------------------- UML consists of two types of diagrams: structural diagrams and
---------------------- behavioural diagrams. Structural diagrams focus on static approach of software
system. Different structural diagrams used in UML are class diagram, object
---------------------- diagram, component diagram and deployment diagrams. Behavioural diagrams
focus on dynamic aspects of software system. Use-case diagrams, interaction
---------------------- diagrams, sequence and collaboration diagrams, state diagrams and activity
---------------------- diagrams are behavioural diagrams.
Both behavioural and structural diagrams are used to analyse and
---------------------- design the software system with the help of modeling. UML is the popular
---------------------- language adapted by programmers and developers for analysing, designing and
documenting the software system.
----------------------
4.3.2 UML Use Case-Driven Object-Oriented Analysis
---------------------- Use cases are used during analysis of project to identify and partition
system functionality. They separate the system into actors and use cases. It is
----------------------
a requirement analysis concept. It depicts the use of the system or product and
----------------------

72 Software Engineering with UML


helps to describe the system’s actions from the point of view of a user. It gives Notes
a brief on the sequence of events involved during the user interaction with the
system and specifies the behavioural aspects of a system without specifying ----------------------
the structure of the system. So a use-case diagram is a pictorial representation
of who is using what from the system. The use-case diagrams are built in the ----------------------
initial stages of the system development. Its purpose is to specify context of the ----------------------
system. It helps in capturing the system requirements, validating the system
architecture, showing the implementation aspects of the system and generating ----------------------
test cases.
----------------------
In short, the use-case diagram is described as follows during the different
phases of software development. ----------------------
During the software development, different models are developed at ----------------------
different phases of the software development life cycle. So, a use-case diagram
has different roles in these models as follows: ----------------------
• A use-case diagram is expressed in requirement model. ----------------------
• It is implemented in analysis model. ----------------------
• It is realised in design model.
----------------------
• It is structured in implementation model.
----------------------
• It is verified in test model.
Usually, the use cases are developed by system analysts and domain experts. ----------------------
4.3.3 Use-Case Diagram Components ----------------------
The various use-case diagram components which are used to draw the use ----------------------
cases are discussed below.
1. Actors: An actor is a role that a user plays with respect to the system. ----------------------
For example, a person, an organisation or another system, user, etc. It is ----------------------
represented in UML as follows:
----------------------
E.g., a customer actor, a human actor.
----------------------

----------------------

----------------------

----------------------
Customer
----------------------
Fig. 4.1: Representation of an Actor
----------------------

----------------------

----------------------

----------------------

System Modelling and UML - I 73


Notes There are also non-human actors. Another system or organisation is represented
as follows:
---------------------- E.g., an ATM service
----------------------

----------------------

----------------------
Fig. 4.2: Non-Human Actor
----------------------
So, an actor includes all user roles that interact with the system. It also includes
---------------------- system components that are responsible for initiating a use case.
---------------------- There are different types of actors which interact with the system.
---------------------- • Primary actor: A primary actor is a user whose goals are fulfilled by
the system. For example, an actor who interacts with the system with a
---------------------- specific goal.
---------------------- • Supporting actor: A supporting actor provides a service (e.g.,
information) to the system, clarifies the external interfaces and protocols.
---------------------- It can be a human actor or a non-human actor.
---------------------- • Offstage actor: An offstage actor has an interest in the behaviour but is
not primary or supporting, e.g., government - ensures all interests (even
---------------------- subtle) are identified and satisfied.
---------------------- Thus, an actor is an external entity that can produce or consume data. An actor
must serve as a source or destination to the system. It must be external to the
---------------------- system. An actor interacts with the system using use cases. Use cases are the
---------------------- functionalities or some behaviour from the system.
There are several examples of actors like humans, machines, external systems,
---------------------- organisational units, sensors, etc.
---------------------- To find the actors for a system, we can have several questions which will help
to find actors:
----------------------
• Who are the primary users of the system?
---------------------- • Who requires system support for daily tasks?
---------------------- • Who are the system’s secondary users?
---------------------- • What hardware does the system handle?
• Which other (if any) systems interact with the system in question?
----------------------
• Do any entities interacting with the system perform multiple roles as
---------------------- actors?
• Which other entities (human or otherwise) might have an interest in the
----------------------
system’s output?
---------------------- So, an actor is someone who interacts with the use case (system function).
Usually a noun is used, e.g., customer, employee, accountant, sales manager,
----------------------
professor, instructor, researcher, etc.
74 Software Engineering with UML
2. Use case: Represented by ellipse Notes

Perform Task
----------------------

----------------------
A use case is a system function or process. An actor performs his task ----------------------
with the use case. It is named by verb.
For example, consider an online shopping system where the customer can ----------------------
buy the product online. So the following actors and corresponding use cases can ----------------------
be constructed.
----------------------
Actor/User User Goal /Use Cases
Customer Search for products ----------------------
Add to cart
----------------------
Pay bill
Shop owner Deliver the product ----------------------
Billing
----------------------
Manage products
Update website ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig: 4.3: Use-Case Diagram showing Customer (Actor) interacting with
the System ----------------------
Scenarios: ----------------------
A scenario is a sequence of steps an actor performs with the use case. For
----------------------
example, in the above diagram a customer interacts with the use-case search
Product. He can follow the below sequence of steps: ----------------------
1. Open the category to search on website.
----------------------
2. Customer enters the product details into the search option.
----------------------
3. System looks for the available products in the database.
4. Customer can view the different products by specified price and category. ----------------------

System Modelling and UML - I 75


Notes 5. Customer can view the information related to product.
6. Customer selects the products.
----------------------
3. Association, include, extends and generalisation
----------------------
Symbol Meaning
----------------------
Association is a link between the actor and the use case.
---------------------- It is denoted by a solid line.
<<include>> It means one use case must call another use case. For
----------------------
--------------> example, Login use case must include verifying user-id
---------------------- and password use case.
<<extends>> Extends relationship, it means one use case calls another
----------------------
--------------> use case under certain conditions.
---------------------- The child use case inherits the behaviour and meaning of
---------------------- the parent use case. The child may add to or override the
behaviour of its parent.
----------------------
i. Association relationship
---------------------- • It is a link between the actor and the use case.
---------------------- • An association can be of two types: uni-association where there is a
one-way communication between the actor and the use case; another is
----------------------
bidirectional association in which both can send messages to each other.
---------------------- • It is represented by a solid line between actor and use case.
---------------------- ii. Use case “include” relationship

---------------------- • Used to describe similar behaviour across several use cases. The included
use case can be replicated and reused across several use cases.
---------------------- • It is a kind of macros in programming language.
---------------------- • Suppose a use case “P” includes another use case “Q”. At a particular
point in “P” where “Q” is included, control will be transferred to the
----------------------
steps listed for “Q” and after the steps in “Q” are carried out, control is
---------------------- transferred back to the main use case “P”. Suppose other use cases “R”
and “S” want to include the use case “Q”, they can do so. The use case
---------------------- “Q” is written only once and used multiple times by different use cases.
---------------------- • Include relationship supports reuse.
• Avoid using include relationship, if it is not reused.
----------------------
Example: Consider an online computer store, where a customer has two
---------------------- options, one is to buy a computer and another is he can take a computer on rent.
---------------------- Both can use the option pay by credit card.

----------------------

----------------------

76 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 4.4: Use-Case Diagram shows the use of Include Relationship ----------------------
iii. Use case “extend” relationship ----------------------
• “extend” relationship is used to depict additional functionality into a use
case. . ----------------------

• The use case which contains the additional functionality can be extended ----------------------
by a new use case.
----------------------
• It is denoted by dashed arrow with <<extend>> stereotype.
----------------------
• The arrowhead of the extend relationship points to old use case.
Example: Consider a manufacturing company paying some part of salary ----------------------
to their employees as gift coupons. So when an employee pays his utility bills ----------------------
to the supermarket he can have the option of redemption of gift coupons given
by the company. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 4.5: Use Case Diagram showing use of Extend Relationship
iv. Use case generalisation relationship ----------------------
• A new use case is derived from the old use case. The old use case is called ----------------------
base use case whereas new use case is called derived use case.
----------------------
• It is similar to parent-child relationship.
• The derived use case is a specialised version of the old use case. ----------------------

Example: Consider a package which is used to draw different shapes like ----------------------
circle, triangle, etc.
----------------------
So the base use case is “draw shape” and the derived use cases are “draw
triangle”, “draw circle”, etc. ----------------------

System Modelling and UML - I 77


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 4.6: Use Case Diagram showing use of Generalisation


---------------------- 4.3.4 Use Cases for Testing and Validation

---------------------- Use cases can be used for testing. Testing has two objectives - verification
and validation. Verification ensures that the system is implemented correctly
---------------------- according to the requirements and the design. Validation ensures that the system
under development really satisfies the user needs. Use-case scenarios give a
---------------------- proper method to the system to ensure the benefits to users or actors.
---------------------- The use case provides the functional view of the software project from the
start making it the main source for validation. If the use case does not satisfy
---------------------- the user needs, validation is not possible. When the software developer or
---------------------- analyst prepares the use case, this model is discussed with the stakeholders of
the system ensuring that the model meets the user requirements. Use cases play
---------------------- an important part in helping testers organise their test and develop test cases.
----------------------
Check your Progress 2
----------------------
Fill in the blanks.
----------------------
1. UML consists of two types of diagrams: _______________ and
---------------------- _____________.
2. UML is the popular language adapted by programmers and developers
----------------------
for ________, __________ and ___________ the software system.
---------------------- Match the following.
---------------------- i. Actor a. Sequence of steps an actor performs
with the use case.
---------------------- ii. A use case b. It means one use case must call
another use case.
---------------------- iii. A scenario c. It means one use case calls another
use case under certain conditions.
---------------------- iv. Association relationship d. The child use case inherits the
behaviour and meaning of the parent
---------------------- use case.
v. Include relationship e. A system function or process.
---------------------- vi. Extend relationship f. A role that a user plays with respect
---------------------- to the system.
vii. Generalisation relationship g. A link between actor and use case.

78 Software Engineering with UML


Multiple Choice Single Response. Notes
1. Which of the following notations are used in use-case diagrams? ----------------------
i. Actors
----------------------
ii. Use cases
----------------------
iii. Class
iv. i. and ii. ----------------------

2. Which of the following is used to depict some additional functionality ----------------------


required of a use case by putting the description of the additional
----------------------
functionality in another use case?
i. Include ----------------------
ii. Realisation ----------------------
iii. Association ----------------------
iv. Extend
----------------------
3. Use-case model is realised by:
----------------------
i. Domain object model
ii. Design model ----------------------
iii. Analysis model ----------------------
iv. Implementation model ----------------------
v. Testing model
----------------------

Activity 1 ----------------------

----------------------
Draw a use-case diagram for a library management system. Assume
suitable actors and use cases. Try use include, extend and generalisation ----------------------
relationships. ----------------------

----------------------
4.4 STATIC MODELLING USING CLASS DIAGRAM
----------------------
The techniques of static modelling using class diagram are discussed in
the below sections. ----------------------
4.4.1 Class Diagram ----------------------
Class is a binding of data (attributes) and functions (methods) in a unit. It is ----------------------
a base for construction of objects and shows the conceptual view of the system.
A class is called the concept whereas object is a fundamental. Class diagrams ----------------------
are useful for conceptual and implementation level of software development. It
also describes the static view of a system in terms of classes and relationships ----------------------
among them. ----------------------

System Modelling and UML - I 79


Notes To create a class diagram, you need to identify and describe different
important items in the system. After the definition of a number of classes, the
---------------------- relationship between these classes needs to be identified.
---------------------- A class in UML is drawn with a rectangle, which is divided into three
compartments:
----------------------
• The name compartment
---------------------- • The attributes compartment
---------------------- • The operations compartment

---------------------- Name
----------------------
Attributes
----------------------
Operations
----------------------
---------------------- Fig. 4.7: Class in UML
---------------------- The top compartment contains the name of the class. The name should be
decided from the problem domain and should be a noun. The second compartment
----------------------
has attributes that describe properties of the objects. The attributes can have
---------------------- different visibility. Visibility describes the accessibility of the attributes within
other members of the class as well as from other class. If an attribute has the
---------------------- visibility of private, it cannot be accessed from other classes. If an attribute has
the visibility of public, it can be used and viewed from outside the class. If an
----------------------
attribute has the visibility protected, it can be accessible to its derived classes,
---------------------- but not from other classes.
UML has formal syntax for the description of an attribute:
----------------------
Visibility/name: type [multiplicity] =default-value {property-string}
----------------------
Visibility of attributes denoted by + for public, - for private, # for protected
---------------------- whereas some attributes are read only denoted by ‘/’.

---------------------- The third compartment of class has operations or methods. Operations are
useful to describe the state of the object. Operations manipulate the attributes or
---------------------- perform other actions. Operations are normally called functions or methods. An
operation may be described as return type, name of operation and zero or more
---------------------- parameters.
---------------------- UML has a formal syntax for an operation:
---------------------- Visibility name (parameter-list): return-type-expression {property-string}
Visibility for the operations is same as visibility for attributes.
----------------------

----------------------

----------------------

80 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

Fig. 4.8: A Typical Class with Attributes and Operations ----------------------


Objects represent classes that can be created at runtime. Class is a ----------------------
logical construction of attributes and functions and these are implemented and
initialised in objects. ----------------------
Objects in UML are represented as follows: ----------------------
C: Customer ----------------------

----------------------

----------------------
01: Order 02: Order 03: Order
Number = 12 Number = 32 Number = 40 ----------------------

----------------------
S1: Special Order S2: Special Order N1: Normal Order
Number = 20 Number = 30 Number = 60 ----------------------
Fig. 4.9: Object diagram ----------------------
Mapping class to java code
----------------------
public class Triangle {
private float base; ----------------------
private float height;
private float area; ----------------------
private static int noOfTriangles; ----------------------
public void setBase(float b){
} ----------------------
public float getBase(){
} ----------------------
public void setHeight(float h){ ----------------------
}
public float getHeight(){ ----------------------
}
public void calculateArea(){ ----------------------
} ----------------------
public float getArea(){
} ----------------------
}
System Modelling and UML - I 81
Notes 4.4.2 Relationships
There are different types of relationships that can be used among classes.
----------------------
A class diagram is constructed using a collection of different classes and
---------------------- relationships among them. The different types of relationships that can be used
are association, realisation, dependency and generalisation.
----------------------
An association is a connection between classes. It depicts that object of one class
---------------------- recognises the object of another class. An association is normally bidirectional,
which means that if an object is associated with another object, both objects are
---------------------- known to each other.
---------------------- Person Uses  Computer
----------------------
Fig. 4.10: Association between Person and Computer
----------------------
A person uses a computer. The person has an association to the computer class.
----------------------
Student 1...* Owns  0...* Vehicle
----------------------
 Owned by
----------------------
Fig. 4.11: Association between Student and Vehicle
----------------------
A student owns many (zero-to-many) vehicles. A vehicle can be owned by
---------------------- many (one-to-many) students.

---------------------- Student Owns 0...* Vehicle


----------------------
Fig. 4.12: Navigation Association
----------------------
Teacher ID 1 Teaches  0...* Student
----------------------  Taught by
---------------------- Fig. 4.13: Qualified Association
----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 4.14: Recursive Association
----------------------
Aggregation is a stronger version of association. Aggregation is of two
---------------------- types: shared aggregation and composite aggregation. A shared aggregation
indicates “whole-part” relationship. For example, a computer consists of
---------------------- different parts like motherboard, monitor, keyboard, mouse, etc. The keywords
---------------------- used to identify aggregates are “consists of”, “contains”, “is part of”, that is,

82 Software Engineering with UML


words that indicate a whole-part relationship between the classes involved. Notes
Shared aggregation is denoted by a hollow diamond at whole-part.
----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 4.15: Shared Aggregations
----------------------
Composite aggregation a whole-part association between two classes such that
the parts reside within the whole. Destruction of the whole results in automatic ----------------------
destruction of the parts. Multiplicity on the part side can be many but on the
whole side it has to be zero or one. The composite aggregation is denoted by ----------------------
filled diamond at whole side.
----------------------
----------------------

----------------------

----------------------
Fig. 4.16: Composite Aggregation
Generalisation is a relationship in which the child inherits the properties ----------------------
from the parent. Child is a specialised class from the generalised one. The child ----------------------
class acquires the properties and methods of the parent class. The specific class
(child class) contains the extra behaviour in addition to the parent. ----------------------
The general class (parent) is called the base class or superclass and the ----------------------
more specific class is called the derived class or subclass.
----------------------

----------------------

----------------------

----------------------

Fig. 4.17: Class Diagram showing use of Generalisation Relationship ----------------------

Abstract class is a class that is not allowed to have any instances. ----------------------
Attributes and operations are only declared within this class. Subclasses inherit
these features from the abstract class. Each subclass will have its own definition ----------------------
for each method declared in the abstract superclass. It is represented by italic ----------------------
word superclass or the keyword {abstract} beside the superclass name in the
name compartment of the superclass. A class that has one abstract operation ----------------------
is compulsorily an abstract class. A subclass that inherits from an abstract
superclass must implement all operations of that superclass or itself become ----------------------
abstract. Abstract operations are denoted by the keyword {abstract} beside the ----------------------
operation declaration.

System Modelling and UML - I 83


Notes

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 4.18: Class Diagram showing Abstract Class
----------------------
A realisation is a type of abstraction that shows that elements of one
---------------------- model or class realise a more general element of another model. In general, an
interface can be realised by a class to implement the abstract elements of an
---------------------- interface. An interface contains only method signatures. They do not specify
any implementation neither they are allowed to have any attributes. Interface
----------------------
can be represented by a rectangle having two compartments. Convention is
---------------------- to write <<interface>> and its name on the next line of the first compartment.
The second compartment consists of the method names and signatures of the
---------------------- interface.
----------------------

----------------------

----------------------

----------------------
Fig. 4.19: An Interface Structure in UML
----------------------
Interface can be realised by another classes to perform their task. For example,
---------------------- there are two applications which want to implement the calculator interface.
The realisation relationship is used.
----------------------

----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 4.20: Realisation Relationship


Packages and classes: A package is used to group classes into a unit. It
----------------------
can never be instantiated. All the classes that are part of a package are owned
---------------------- or referenced by that package. Destruction of package results in automatic
destruction of all its containing classes. The classes of a package can include
---------------------- other packages, interfaces, components or nodes.
----------------------

84 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------
Fig. 4.21: Package P with Classes A and B ----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 4.22: Package P extends Package Q ----------------------
A dependency is a relationship in which elements of one class are dependent
on elements of another class. Changes in one element will affect the dependent ----------------------
elements. ----------------------
Class A depends on another class C if changes to C cause changes to A. Suppose
class A in Package P depends on class C in package Q, then we can say that ----------------------
“Package P is dependent on Package Q”. While designing it is important to ----------------------
minimise dependencies between packages.
----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 4.23: The Dependency of Package P on Package Q
----------------------

----------------------

----------------------

System Modelling and UML - I 85


Notes
Check your Progress 3
----------------------
Fill in the blanks.
----------------------
1. A ___________ is a conceptual view of system.
---------------------- 2. A class notation in UML contains ___________, __________ and
---------------------- ___________compartments.
Match the following.
----------------------
i. Association a. To implement the abstract elements of an
---------------------- interface.
ii. Shared aggregation b. It depicts that object of one class recognise
---------------------- the object of another class.
---------------------- iii. Composite aggregation c. Indicates “whole-part” relationship.
iv. Generalisation d. Destruction of whole results in automatic
---------------------- destruction of parts.
v. Realisation e. Parent-child relationship
----------------------
Multiple Choice Single Response.
---------------------- 1. Which of the following relationship between elements specifies
behaviour and provides implementation?
----------------------
i. Composition
---------------------- ii. Include relationship
iii. Association
----------------------
iv. Realisation
---------------------- 2. It is a whole-part association between two classes such that a part can
reside within many wholes at the same time.
----------------------
i. Composite aggregation
---------------------- ii. Generalisation
---------------------- iii. Shared aggregation
iv. None of these
---------------------- 3. Which of the following is true?
---------------------- i. Association may also correspond to relation between instances
of three or more classes.
---------------------- ii.  Association lines may be unlabelled or they may show
---------------------- association name.
iii. None of these.
---------------------- iv. i and ii.
---------------------- 4. It is a whole-part association between two classes such that the parts
reside within the whole.
---------------------- i. Composite aggregation
---------------------- ii. Realisation
iii. Shared aggregation
---------------------- iv. Composition

86 Software Engineering with UML


Notes
Activity 2
----------------------
Use the use-case diagram used in Activity 1 for library management ----------------------
system and draw the class diagram.
----------------------

4.5 ACTIVITY DIAGRAM ----------------------

An activity diagram is used to model the flow of work. It basically shows ----------------------
the communication between the systems. When objects are interacting with
----------------------
each other, the objects also perform work in terms of activities. These activities
and their order are described in an activity diagram. Activity diagrams do not ----------------------
have to reference a specific object but can just reference a high-level flow.
A typical work flow contains different states in the system, which are called ----------------------
activity states.
----------------------
An activity state does not wait for an event to occur, to transfer from one
activity state to next activity state. When one activity state gets completed the ----------------------
control will transform to the next activity state. An activity should have definite ----------------------
start and end. The activity diagram has provisions to model activities which
can be performed concurrently by different persons in an organisation. It can ----------------------
also branch to indicate activities to be performed only if certain conditions are
fulfilled. ----------------------

Activity diagrams are used: ----------------------


• To capture actions (work) that will be performed when a function or ----------------------
operation is executing.
----------------------
• To represent the internal work in an object.
• To show the sequence of actions that can be performed and how the other ----------------------
objects around them are affected.
----------------------
• To show the execution of scenarios in uses cases.
----------------------
• To show the business functionalities in terms of actors, workflows,
organisation and objects in the business. ----------------------
For example, the following diagram shows the different actions performed ----------------------
when scanning a document to an application.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

System Modelling and UML - I 87


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------
Fig. 4.24: Activity Diagram
----------------------
When user calls ScanAllDocs function from the UserWindow class, the action
---------------------- starts. The first action is to show a message box on the screen; after this the
condition is checked - whether the scanner is connecter or not. If the scanner is
----------------------
connected, the documents are scanned and the scanned document is saved. If
---------------------- the scanner is not connected the activity ends.
The different symbols used in activity diagram are as follows:
----------------------
Symbol Meaning
----------------------
Start (initial) state
----------------------

---------------------- Final state

----------------------
Junction
----------------------

---------------------- Fork
----------------------
Join
----------------------

----------------------

----------------------

----------------------

88 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------
Fig. 4.25: Depicting Parallel Activities ----------------------
Swimlanes: In order to make the activity diagram denote “who does
what”, it must be arranged into vertical zones, each zone separated by solid ----------------------
lines. Each zone can represent the activities of a particular class or department. ----------------------
There are two departments - customer service and the Finance. The work of
accepting selected books, packing them, calculating the bill, giving the bill to ----------------------
the customer and the packed books to the cashier is done by the customer service
department. Actual acceptance of the cash and handing over the purchase to the ----------------------
customer is done by the finance department. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

System Modelling and UML - I 89


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------
Fig. 4.26: Activity Diagram showing use of Swimlanes
----------------------

---------------------- Check your Progress 4


---------------------- State True or False.
---------------------- 1. Activity diagram begins with an initial node.

---------------------- 2. At least one activity diagram can be constructed for each use case.
3. To specify who does what, you can divide an activity diagram flow.
----------------------
4. In an activity diagram, all actions coming into a fork must be
---------------------- completed before processing continues.
---------------------- 5. In an activity diagram, a subactivity indicator indicates separate
activity diagram.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

90 Software Engineering with UML


Summary Notes

• A system model is an abstract view of the system. Different types of ----------------------


models provide different system information.
----------------------
• Context models show the position of a system in its environment with the
other system and process. ----------------------
• Data flow models may be used to model the data processing in a system. ----------------------
State machine model the systems behaviour in response to internal or
external events. ----------------------

• Semantic data models describe the logical structure of the data which is ----------------------
imported to or exported by the system.
----------------------
• Object models describe logical system entities, their classification and
aggregation. An interaction model shows the interaction between the ----------------------
system and other side actors (users).
----------------------
• Use cases are used during analysis of a project to identify and partition
system functionality. They separate the system into actors and use cases. ----------------------
It is a requirement analysis concept.
----------------------
• Class is a binding of data (attributes) and functions (methods) in a unit. It
is a base for construction of objects and shows the conceptual view of the ----------------------
system. A class is called the concept whereas object is a fundamental.
----------------------
• An activity diagram is used to model the flow of work. It basically shows
the communication between the systems. When objects interact with each ----------------------
other, the objects also perform work in terms of activities. ----------------------
• A typical work flow contains different states in the system. These are
called activity states. An activity state does not wait for an event to occur ----------------------
to transfer from one activity state to the next activity state. When one ----------------------
activity state gets completed the control will transform to the next activity
state. An activity should have definite start and end. ----------------------

----------------------
Keywords
----------------------
• Actor: An entity or an object.
----------------------
• Use case: Function or method.
• Class: A logical construction. ----------------------
• Scenario: Sequence of steps or actions in a use case. ----------------------
• Activity: Comprises action events. ----------------------

----------------------

----------------------

----------------------

System Modelling and UML - I 91


Notes
Self-Assessment Questions
----------------------
1. What is UML? Write the use of different diagrams in UML.
---------------------- 2. What is a use case? Explain the different types of relationships used in
use-case diagrams with an example of each.
----------------------
3. What is a class? Explain the different types of relationships used in class
---------------------- diagrams with an example of each.
---------------------- 4. What is the need to draw an activity diagram during system or software
development? What are the different symbols used in an activity diagram?
---------------------- Draw an activity diagram for a scenario where a customer withdraws cash
---------------------- from an ATM machine.

---------------------- Answers to Check your Progress


---------------------- Check your Progress 1
---------------------- Fill in the blanks.
---------------------- 1. An analyst or system analyst is a person who works on creating different
models which help him to communicate with customers.
----------------------
Match the following.
---------------------- i. – b.
---------------------- ii. – c.

---------------------- iii. – d.
iv. – a.
----------------------
v. – e.
----------------------
Check your Progress 2
---------------------- Fill in the blanks.
---------------------- 1. UML consists of two types of diagrams: structural diagrams and
behavioural diagrams.
----------------------
2. UML is the popular language adapted by programmers and developers for
---------------------- analysing, designing and documenting the software system.
---------------------- Match the following.
i. – f.
----------------------
ii. – e.
----------------------
iii. – a.
---------------------- iv. – g.
---------------------- v. – b.
vi. – c.
----------------------
vii. – d.
92 Software Engineering with UML
Multiple Choice Single Response. Notes
1. Which of the following notations are used in use-case diagrams?
----------------------
iv. i. and ii.
----------------------
2. Which of the following is used to depict some additional functionality
required of a use case by putting the description of the additional ----------------------
functionality in another use case?
----------------------
iv. Extend
3. Use-case model is realised by: ----------------------

ii. Design model ----------------------


Check your Progress 3 ----------------------
Fill in the blanks.
----------------------
1. A class is a conceptual view of system.
----------------------
2. A class notation in UML contains class name, attributes and operation
compartments. ----------------------
Match the following. ----------------------
i. – b.
----------------------
ii. – c.
----------------------
iii. – d.
iv. – e. ----------------------
v. – a. ----------------------
Multiple Choice Single Response. ----------------------
1. Which of the following relationship between elements specifies behaviour
----------------------
and provides implementation?
iv. Realisation ----------------------
2. It is a whole-part association between two classes such that a part can ----------------------
reside within many wholes at the same time.
----------------------
iii. Shared aggregation
3. Which of the following is true? ----------------------

ii. Association lines may be unlabelled or they may show association ----------------------
name.
----------------------
4. It is a whole-part association between two classes such that the parts
resides within the whole. ----------------------
i. Composite aggregation ----------------------

----------------------

----------------------

System Modelling and UML - I 93


Notes Check your Progress 4
State True or False.
----------------------
1. True
----------------------
2. True
---------------------- 3. False
---------------------- 4. False

---------------------- 5. True

----------------------
Suggested Reading
----------------------
1. Fowler, Martin. UML Distilled: A Brief Guide the Standard Object
---------------------- Modelling Language. Addison-Wesley.

---------------------- 2. Rumbaugh, James, Ivar Jacobson and Grady Booch. The Unified
Modelling Language Reference Manual. Addison-Wesley.
---------------------- 3. Sommerville, Ian. Software Engineering. Addison-Wesley.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

94 Software Engineering with UML


System Modelling and UML - II
UNIT

5
Structure:

5.1 Introduction
5.2 Sequence Diagram
5.3 Collaboration Diagram or Communication Diagram
5.4 State Chart Diagram
5.5 Component Diagram
5.6 Deployment Diagram
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

System Modelling and UML - II 95


Notes
Objectives
----------------------
After going through this unit, you will be able to:
----------------------
• Implement the use-case behaviour using sequence diagram
----------------------
• Explain modelling using collaboration diagram
---------------------- • Discuss an object behaviour using state diagram
---------------------- Elaborate on the organisation of different components using
• 
component diagram
----------------------
• Describe system deployment using deployment modelling
----------------------

---------------------- 5.1 INTRODUCTION


---------------------- Sequence diagrams are used to illustrate the dynamic behaviour of a
group of objects that communicate by passing messages in order to perform a
---------------------- certain task. We know, if we have to depict the behaviour of the system, use-case
---------------------- diagram helps to list the behaviour of the system. To implement the behaviour
sequence, diagrams are used. In this unit, we will discuss more about the same.
----------------------
5.2 SEQUENCE DIAGRAM
----------------------
In a use-case diagram, a use case has sequence of steps to perform a task.
----------------------
These steps are called scenarios. There are two types of scenarios: first, which
---------------------- leads to task to be performed successfully and second, the task which is not
performed successfully. So the use-case diagram has the scenarios which lead
---------------------- to success as well as possibility of the use case to be in failure. Certain steps are
to be performed to make a failure use case turn to successful scenarios. While
----------------------
describing the documentation of use case in terms of listing the scenarios, the
---------------------- developer should find possible sequence of steps which can lead to success as
well as failure and to convert the failure scenarios into success scenarios.
----------------------
A modeller can model the implementation of these scenarios using
---------------------- sequence diagram. Sequence diagrams are types of interaction diagrams used to
show the manner in which messages are passed between objects as the system
---------------------- executes to implement a specific behaviour.
---------------------- The two types of interaction diagrams are sequence diagram and
communication diagram or collaboration.
----------------------
Consider an ATM system in which a customer wants to withdraw cash.
----------------------

----------------------

----------------------

----------------------

96 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------
Fig.5.1: Sequence Diagram ----------------------
In Figure 5.1, there are three objects of the respective classes - ATM, ----------------------
Server and Customer shown by rectangles. The formal syntax is object name
followed by colon followed by class name with entire text underline. ----------------------
E.g., Objectname:className ----------------------
It indicates object. The object may be with name or without name.
----------------------
E.g., : className
----------------------
Figure 5.1 shows unnamed objects. The dashed vertical line shows the
lifeline of the object. The solid line shows activation boxes; at that point objects ----------------------
are active. The activation box indicates objects are executing or waiting for
response from another object. ----------------------
In the above example, the object communication is as follows: ----------------------
1. Customer object asks to execute InsertCard () function. It is used for ----------------------
acceptance of card.
----------------------
2. The object of ATM sends a message to object of class Server to execute
VerifyCard () function. It does verification of card. ----------------------
3. After verification of card, ATM Object asks for pin number to customer
----------------------
class through EnterPin () function.
4. Customer asks for cash through RequestCash () function. ----------------------
5. ATM object checks the availability of cash using VerifyAvailability() ----------------------
function.
----------------------
6. ATM object dispense cash to customer using DispenceCash() function.
7. Deletion of an object is shown by a large ‘X’ at the end of the lifeline. ----------------------

System Modelling and UML - II 97


Notes Depiction of Asynchronous Messages
Suppose an object of class “P” sends a message msg1 ( ) to object of class
----------------------
“Q”. If the first object does not have to wait for the return then the message is
---------------------- asynchronous, i.e., the object of class “P” can continue to do its own processing
like sending a message msg2 ( ) to object of class “R”. It does not have to wait
---------------------- for the object of class “B” to finish executing its operation.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

---------------------- Fig.5.2: Asynchronous Messages


---------------------- Creation of New Objects

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 5.3: Creation of New Object


---------------------- Consider the case of an object of class “P” creating an object of the class
“Q”. It is depicted by showing an arrow from an activation box over the lifeline
---------------------- of the object of the class “P” to the created object of class “Q”.
----------------------

----------------------

98 Software Engineering with UML


Combination Fragments Notes
• Sequence diagrams can be broken down into chunks called fragments.
----------------------
• Around each fragment a frame is drawn. There is a specifier in the upper
left-hand corner of the frame that represents an operator that states how the ----------------------
fragment is handled.
----------------------
• There are one or more than one operand regions within the fragment.
----------------------
• They are placed vertically and each is separated by a horizontal dashed
line. ----------------------
The Alt Combination Fragment ----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 5.4: “alt” Combination Fragment specifies Conditional Behaviour
----------------------
• “alt” combination fragment specifies conditional behaviour. Either one
out of the two operations will be invoked. ----------------------
• In Figure 5.4, if the Video Player is free then message is sent by ----------------------
VideoServer object to VideoPlayer Object to invoke “play” method. If
the Video Player is busy then message is sent to Queue object to execute ----------------------
Enqueue() operation.
----------------------
• If there are multiple conditions and if it is necessary to execute a sequence
of instruction and if all the conditions fail, then an “else” can be included. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

System Modelling and UML - II 99


Notes The Loop Combination Fragment

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
---------------------- Fig. 5.5: “loop” Combination Fragment
---------------------- • Suppose it is necessary for the Video Player to play the track “movie1.
avi” five times. The keyword “loop” with parameters 1 5 is included in
---------------------- the pentagram of the fragment. So play (movie1.avi) operation will be
invoked five times.
----------------------
The Opt Combination Fragment
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 5.6: “opt” Combination Fragment
----------------------
• It is used to model an “if-then” statement. If a certain condition occurs then
---------------------- the execution of the messages takes place. This combination fragment is
similar to the “alt” combination fragment with the exception that there
----------------------
is no else part to it. The keyword “opt” is used in the pentagram at the
---------------------- top left-hand corner of the frame. For example, the computer sends a

100 Software Engineering with UML


message play(movie1.avi) to the VideoServer. If the VideoPlayer is free, Notes
the VideoServer sends the play() message to it.
----------------------
The Par Combination Fragment
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------
Fig. 5.7: “par” Combination Fragment
----------------------
• It depicts the concurrent execution of operations. The word “par” is
included at the top left-hand corner of the enclosing frame within a ----------------------
pentagram. A message - message1 ( ) - is sent to object of the class Q by
----------------------
the object of class P.
• Upon receipt of this message, it sends two messages - message2 ( ) and ----------------------
message3 ( ) - to itself at the same time. Upon execution of these messages, ----------------------
control is transferred back to the object of class P.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

System Modelling and UML - II 101


Notes The Break Combination Fragment

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
---------------------- Fig. 5.8: “break” Combination Fragment

---------------------- • The frame has the keyword “break”. It indicates that when a break is
encountered, all statements within the frame are executed but the
---------------------- remainders of statements outside the frame are skipped.

---------------------- The Ref Combination Fragment

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 5.9: “ref” Combination Fragment
---------------------- In the above figure, upon entering the pin by the customer, verifyPin
sequence diagram will be called in which detail steps of verifying pin can be
----------------------
modelled. It is used for reducing the complexity of the diagram.
----------------------

----------------------

102 Software Engineering with UML


Recursion Notes
• A recursive operation is one that will continue invoking itself till some
----------------------
terminating condition is met. While representing recursive operations
in a sequence diagram, the message must always be synchronous. The ----------------------
FirstFunc() operation will call itself till some terminating condition
(which must be compulsorily present) is met.   ----------------------

----------------------

----------------------

----------------------

----------------------

Fig. 5.10: Recursion ----------------------

Iteration over a Collection ----------------------


----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 5.11: Iteration over a Collection
----------------------
• There is a multiobject which represents multiple objects of the class Y.
An object of class X sends a message msg1 ( ) to Y. An asterisk is placed ----------------------
preceding the message name and the multiobject is indicated as shown. 
----------------------
Invoking Static Messages
----------------------
•  n object of class X sends a message to class Y asking it to execute the
A
static operation msg1 ( ). The message being sent to a class Y and not to ----------------------
an object is indicated by not underlining Y.
----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 5.12: Message Sending
----------------------

System Modelling and UML - II 103


Notes
Check your Progress 1
----------------------

---------------------- State True or False.


1. Sequence diagrams represent dynamic models of how objects change
----------------------
their states in response to events.
---------------------- 2. A sequence diagram depicts the interaction among objects during a
certain period of time.
----------------------
3. In sequence diagram, asynchronous messages are shown by circles at
---------------------- arrow head.
---------------------- 4. “par” fragment in sequence diagram depicts concurrent operations.

----------------------

---------------------- Activity 1

---------------------- Assume the list of behaviour in use-case diagram for library management
system (refer Unit 4, Activity 1) and implement it using sequence diagram.
----------------------
Draw possible implementation of different scenarios through different
---------------------- sequence diagrams.

----------------------
5.3 COLLABORATION DIAGRAM OR COMMUNICATION
---------------------- DIAGRAM
---------------------- Collaboration diagram focusses on communication and links among a set
---------------------- of objects, while sequence diagram focusses on time-ordered communication.

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 5.13: Collaboration Diagram for playing a Movie

---------------------- Collaboration diagrams are also called communication diagrams. It is


another form of interaction diagram. The sequence of messages is indicated by
---------------------- explicitly numbering them. There are three objects of the classes -Computer,
VideoServer and VideoPlayer. The object of the type computer sends a message
---------------------- to the object of the type VideoServer asking it to execute its play () operation.
---------------------- This message is given the number 1.

104 Software Engineering with UML


The receipt of this message prompts the object of the type VideoServer Notes
to send a message to the object of the type VideoPlayer to execute its play ()
operation. The message number is 1.1. It is called nested message. ----------------------
Suppose computer object has to send the message to another object, it can ----------------------
be numbered as 2 and the subsequent messages can be labeled as 2.1, 2.1.1, etc.
----------------------
Labeling Messages
• Formal syntax:  ----------------------
[predecessor] [guard condition] sequence expression [return value ‘:=’] ----------------------
message-name ‘(‘ [argument list] ‘)’
----------------------
Characters in single quotes like: = and () are literal values. Terms in [ ]
are not compulsory. Other terms are replaced by actual values. Terms in ----------------------
braces {} are repeated zero or more times.
----------------------
• Predecessor: It is a list of the sequence number of messages that must
occur before the current message is sent. This feature is useful if branches ----------------------
are present. If no branch is present, then Predecessor can be safely omitted.
----------------------
Syntax of the predecessor:
----------------------
sequencenumber1 {‘,’ sequencenumber2}’/’
The forward slash indicates the end of the list. It is indicated when an ----------------------
explicit predecessor is shown, e.g., 1, 1.1, 1.2,2, 2.1 /3: msg1 (). It means that ----------------------
for msg1 () to be passed, messages with sequence numbers 1 (with nested
messages 1.1 & 1.2) and 2 (with nested message 2.1) must be passed. ----------------------
• Guard condition: It must be true before the message can be passed. ----------------------
It is stated in any programming language or psuedocode. No UML
specification is needed to state it. ----------------------
For example, [VideoPlayer free] 1.1. play (). The message play() will be ----------------------
sent only if the VideoPlayer is free.
----------------------
• Sequence expression: It is a list of integers optionally separated by
dots followed by a single letter name followed by a recurrence term and ----------------------
terminated by a colon.
----------------------
• Syntax: integer {‘.’ integer} [name] [recurrence]’:’For example, 1.1a
*[i=1..10]:play(). The above example indicates that the message to ----------------------
execute play() is labeled 1.1a and it will iterate 10 times.
----------------------
• Return value: For example, 1.1a [i<10]:y=play() ,If i<10 only then play()
will be executed and the output of play() will be assigned to y. ----------------------

----------------------

----------------------

----------------------

----------------------

System Modelling and UML - II 105


Notes Messages to self:

----------------------

----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 5.14: Message to Self

---------------------- This is indicated by drawing a link from the object to itself.


Instance Creation:
----------------------

----------------------
----------------------

----------------------

----------------------
Fig. 5.15: Example of Instance Creation
---------------------- Creating instances
---------------------- In the UML, the convention to create an object is to name the function
creating it as “create”. But if any other name is used, then the message can be
---------------------- adorned with the <<create>> stereotype. Suppose, for example, an object of
the type A creates an instance of the class B by using the create message and
----------------------
passing 2 parameters - a and b.
---------------------- Iteration for a single message
----------------------

----------------------

----------------------

----------------------
Fig. 5.16: Example of Iteration for a Single Message
---------------------- On receipt of message msg (), the object of class A sends a message msg2()
to the object of class B ‘N’ times. It is indicated by putting an asterisk after
----------------------
the message number. Suppose the modeller does not want to show the number
---------------------- of times the message is sent, then he can omit the brackets and the entire text
within them.
----------------------

----------------------

----------------------

106 Software Engineering with UML


Iteration over a collection Notes

----------------------

----------------------

----------------------

----------------------
Fig. 5.17: Example of Iteration over a Collection
Suppose there is a collection of objects called B. On receipt of message msg() ----------------------
the object of the class A sends a message msg2() to every object in the collection. ----------------------
It is indicated by showing an asterisk after the message number as well as at the
end of the link on the collection side. Double-box indicates the multi-object. ----------------------
Invoking static messages ----------------------

----------------------
----------------------

----------------------
Fig. 5.18: Example of invoking Static Messages
----------------------
Check your Progress 2 ----------------------

----------------------
State True or False.
1. Collaboration diagram is a type of interaction diagram. ----------------------

2. Collaboration diagram is used to model the communication between ----------------------


objects over a certain period of time.
----------------------
3. Sequence numbers to messages are used in collaboration diagram.
----------------------
4. Collaboration diagrams can be an alternative to sequence diagrams.
----------------------

Activity 2 ----------------------

----------------------
Refer to the sequence diagram in Activity 1 and draw the collaboration
diagram. Compare the diagrams. ----------------------

----------------------
5.4 STATE CHART DIAGRAM ----------------------
A state chart diagram describes states of an object during its life cycle and ----------------------
behaviour of object in those states along with its events and actions which cause
change in the state. ----------------------

----------------------

System Modelling and UML - II 107


Notes A state machine visualises an object of a class as an individual. It depicts
behaviour of object with the rest of the world by detecting events and giving
---------------------- responses. State diagrams model the dynamic aspects of a system as an isolated
entity. It shows all the possible states that an object can have during its life
---------------------- cycle and how it responds to an event when it is in a particular state. So a state
---------------------- machine is a graph of states and transitions. A state is associated with an object
of a class which describes the responses of that object to event that it receives.
----------------------
Consider a state diagram of a CD player.
----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 5.19: States of a DVD/CD Player


Types of Events
----------------------
There are five types of events.
----------------------
Time event: The time is calculated either as absolute time or the passage
1. 
---------------------- of relative amount of time. For example, settings on each machine are
such that it will go into locked mode if it is idle for two minutes. So the
---------------------- passage of time of two minutes in the idle state transforms the machine to
the locked state.
----------------------
A guard condition event: This is shown as a guard condition on a state
2. 
---------------------- transition. When the transition is set to occur, the condition is tested. If it
is true then the state changes.
----------------------
Change event: It is evaluated continuously till it becomes true and finally
3. 
---------------------- when it becomes true, the transition fires.
---------------------- Call event: It is the receipt of an explicit synchronous request among
4. 
objects that wait for a response.
----------------------
Suppose an object “ob1” sends a message to object “ob2”. “ob2” processes
---------------------- the call event either by transitioning to a new state or failing to make a
transition. Either way, the control returns to calling object.
----------------------
Signal event: Here, the calling object sends asynchronous messages to
5. 
---------------------- receiving objects. The sender does not wait for the receivers to process
the messages and return. It continues its own work independently.
----------------------
It is not necessary for an event to be attached to a state transition. The
---------------------- state of an object can change when its internal actions are executed. Thus,
the performance of all actions in a state transitions the object to a new
----------------------
state.
----------------------

----------------------

108 Software Engineering with UML


States and Transitions Notes
• A state when represented using a rectangular box with rounded edges can
----------------------
have three compartments.
• The first compartment contains the name of the state, e.g., Stopped, ----------------------
Ready, etc.
----------------------
• The second compartment is optional. It indicates the behaviour in response
to events. There are three reserved event names in UML. They are: ----------------------
 entry: It indicates actions to be done upon entering into a state. ----------------------
 do: It indicates actions to be done while in the state. ----------------------
 exit: It indicates actions to be done on exit from a state.
----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------
Fig. 5.20: Representation of a State
----------------------
The syntax for the activity compartment is: eventname argument-list ‘/’ action-
expression. ----------------------
• The third compartment is also an optional compartment depicting internal ----------------------
transitions. An internal transition is one which has a source state but no
target state. The active state does not change as a result of its firing. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

Fig. 5.21: State Transition Representation ----------------------


Formal syntax for specifying a state transition ----------------------
• Formal syntax: ‘[‘ guard condition ‘]’ ‘/’ action expression send-clause ----------------------
• Event signature: It consists of the event name and parameters.
----------------------

System Modelling and UML - II 109


Notes Eventname ‘(‘list of parameters separated by commas’)’
• Guard condition: It is tested at the time the event fires. This transition
----------------------
takes place only if the guard condition is true. If both event signature
---------------------- and guard condition are present, then the event must occur and the guard
condition must be true for the transition to take place.
----------------------
• Action expression: It is an expression to be executed when the transition
---------------------- fires. In case of multiple actions, they are fired from left to right and they
are separated by a forward slash ‘/’ on the diagram.
----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------
Fig. 5.22: Syntax for specifying a State Transition
----------------------
When go() event is triggered the state is changed from A to B. At that time, i
---------------------- gets incremented by 1 and j by 2. i=i+1 and j=j+2 are the action expressions.
---------------------- • Send-Clause: It is a special syntax for sending a message during a
transition from one state to another.
----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 5.23: Send-Clause for specifying a State Transition


When ‘print’ event occurs, the object sends a message to itself to execute
---------------------- its own print function. Syntax of the send clause is:
---------------------- ‘^‘destination-expression.destinationmessagename’(‘arguments’)’
---------------------- E.g. Nopaper ^ indicator.light(red)
A transition may have more than one send-clause each with its own ^
----------------------
delimiter. The sequence of action-expression statements, operations and send-
---------------------- clauses determines the order of the execution.
Substates
----------------------
Internally, a state can have substates. There are two types of substates: and-
---------------------- substate and or-substate.
----------------------

110 Software Engineering with UML


• OR-substate: A state can have multiple substates but only 1 substate may Notes
be true at a given time.
----------------------
• AND-substate: The current state can have concurrent substates. Several
of them may be true in parallel. And-substates can be used while modelling ----------------------
the states of concurrent threads.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------
Fig. 5.24: Active State
There is a superstate called Active. When the object enters this state, it ----------------------
enters the states B and D at the same time. Suppose an event X causes the
----------------------
transition to substate C from substate B. It is independent and has no effect on
the second nested substate. ----------------------
However, if the object transitions from Active superstate to some ----------------------
superstate, say, Passive, a transition from all concurrent substates occurs. The
object can either be in substate B or C and D or E at any time it is in Active state. ----------------------
So, states B and C are or-substates and so are states D and E.
----------------------
The History Indicator (Shallow and Deep History)
The history indicator allows the state to remember the last substate that ----------------------
it was in before the occurrence of the event changed the state. The symbol H is ----------------------
used even before the initial substate, in our case before B.
----------------------
• Shallow history: It remembers only the history of the immediate nested
state machine. ----------------------
• Deep history: If there are multiple layers of nesting, UML provides for
----------------------
another symbol H* to indicate “deep history”. Deep history remembers
down to the innermost substate at any depth. ----------------------
• If the nesting is at one level only as in the previous example, shallow and
----------------------
deep history indicators are equivalent.
----------------------

----------------------

----------------------

System Modelling and UML - II 111


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 5.25: History Indicator


---------------------- The junction state
----------------------

----------------------
----------------------

----------------------

----------------------
Fig. 5.26: Junction State
----------------------
A junction state is denoted by a circle. When the event “event1” occurs, the
---------------------- sequence of actions are action2, action1 and action3. A junction builds a single
transition from multiple transition segments. However, among the segments,
----------------------
only the first segment can have an event trigger.
---------------------- The synch state
---------------------- When state X is entered into, substates A and B are also active
simultaneously. Each concurrent region is independent of the other, with each
---------------------- one having its own thread of control. Suppose, for the object to enter into substate
---------------------- D, it was necessary that the transitions from substate A from region 1 and
substate B of region 2 should have fired. Synch state models the circumstances
---------------------- in which the transformation to a substate in one region also depends upon the
firing of a transition from a substate in the other region.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 5.27: Synch State

112 Software Engineering with UML


It connects two concurrent regions that belong to the same composite Notes
state. Transition from state ‘A’ is given as input to a fork in the first concurrent
region. ----------------------
Two threads of control emanate from the fork. One is a transition to ----------------------
substate ‘C’ and the other is given as input to the synch state. The output of
the synch state is given as input to the join in the other concurrent region along ----------------------
with the output from the first substate of that region. The output of the join is
----------------------
the transition to the second substate in the second region.
Suppose transition from A fires which will be an input to the fork. The ----------------------
object will also transition to substate C in the first concurrent region. However,
----------------------
for the object to transition in the second concurrent region to substate D, the
transition from the join has to fire. Transition from join will fire if only the ----------------------
transition from B and the synch state have fired.
----------------------
Stub state
Suppose, in a particular state machine, there is a transition to a submachine ----------------------
reference state. So, the transition to the initial state of the submachine occurs. ----------------------
The occurrence of the event e1 will transition the object from state A to the
submachine reference state, i.e., to state C. ----------------------
But sometimes when a transition to a submachine reference state occurs, ----------------------
it is desirable to transition to a state other than the start state of the target
submachine. So a stub state is placed within the submachine reference state ----------------------
which identifies a state within the referenced submachine. This identified state
in the submachine becomes active when a transition to the stub state occurs. ----------------------

----------------------

----------------------

----------------------
Fig. 5.28: Stub State ----------------------
Suppose the model is such that on occurrence of the event e2, the transition
----------------------
should be to state E of the submachine B and not to state C. A crossbar is placed
within the submachine reference state and it is labelled with the state of the ----------------------
submachine (in our case E) to which the transition must occur from state A
on the occurrence of event e2. The crossbar represents a stub state. There may ----------------------
be multiple stub states within the submachine reference state, but connections
----------------------
between any two stub states are prohibited.
----------------------

----------------------

----------------------

----------------------

----------------------

System Modelling and UML - II 113


Notes
Check your Progress 3
----------------------

---------------------- State True or False.


1. The entry event in state diagram indicates actions to be while in the
----------------------
state.
---------------------- 2. Idle or Active represents state category.
---------------------- 3. A transition into a concurrent composite state is to make a transition
directly to one of its substates.
----------------------
4. 
A state diagram contains three compartments; second and third
---------------------- compartments are optional.

----------------------

----------------------
Activity 3

---------------------- Consider the sequence diagram in Activity 2 for library management system
and draw the state diagram depicting the different states of the objects
----------------------
within it.
----------------------

---------------------- 5.5 COMPONENT DIAGRAM


---------------------- In software development, the end-products reside on a physical node and
they are either executables or contribute in the execution of some program.
----------------------
Thus, the physical end-product lives in the world of bits. They are modelled in
---------------------- the UML as components. A component depends on some interfaces and realises
others. It can serve as a link between a logical and a physical model. Logically,
---------------------- an interface can be specified for a class. Ultimately, a physical component will
realise this interface.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 5.29: Component Diagram
---------------------- Representation of Components: Depiction of Components and Interfaces
---------------------- There are two types of relationships between components and interfaces.
A component can provide interfaces and also depend on other interfaces.
----------------------

114 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

Fig. 5.30A: Representation of Components ----------------------


----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 5.30B: Representation of Components
----------------------

----------------------

----------------------
Fig. 5.30C: Representation of Components ----------------------
Types of Components ----------------------
There are three types of components:
----------------------
1. Deployment component
----------------------
2. Work product
3. Execution components ----------------------
Consider, for example, a Java program to calculate the Fibonacci series ----------------------
of a number and write the output to a file named “Fibonacci.dat” created during
the execution of the program named “Fibonacci .cpp”. ----------------------
The file “Fibonacci .cpp” is compiled in the visual environment and an ----------------------
executable Fibonacii.exe is created. When it is executed, a file “Fibonacci .dat”
is created and the output is written to it. A deployment component is necessary ----------------------
and sufficient to form an execution system on its own, e.g., “Fibonacci .exe” ----------------------

System Modelling and UML - II 115


Notes Work product components assist in the construction of an executable system
but do not participate in it, e.g., “Fibonacci .cpp”
----------------------
Execution components are created as a result of an executing system, e.g.,
---------------------- “Fibonacci .dat”.
Stereotypes Applicable to Components
----------------------
• File (document which contains source code or data)
----------------------
• Table (a database table),
---------------------- • Executable (an executable file which can be deployed and executed on a
---------------------- node)
• Library (static or dynamic object library)
----------------------
• Document (any generic document).
----------------------

---------------------- Check your Progress 4

---------------------- State True or False.


---------------------- 1. A component is nothing but an abstraction over classes or objects that
can be deployed on a physical node.
----------------------
2. A component can have required and provided interfaces.
----------------------
3. Mainly there is a dependency relationship among the components.
---------------------- 4. A main component can contain subcomponents.
----------------------

---------------------- Activity 4
---------------------- Draw a component diagram for an online shopping system. Depict all the
---------------------- components and their specification in detail.

----------------------
5.6 DEPLOYMENT DIAGRAM
----------------------
During the development of software, classes, interfaces packages, etc.
---------------------- represent the logical entities while components represent the physical packaging
of these logical entities.
----------------------
However, in order to execute these components, they have to be deployed
---------------------- on a hardware device called a node. A node has some memory and processing
---------------------- capabilities.

----------------------

----------------------

----------------------

116 Software Engineering with UML


Notes

----------------------

----------------------

----------------------

----------------------
Fig. 5.31: Depiction of node ----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 5.32: Exposure of Components deployed on a Node
----------------------
Like a class, a node also can have attributes and operations. The server can
have the properties like value of RAM, capacity of hard disk, frequency, etc. It ----------------------
can have operations like startUp (), shutdown () and restart (). A node can have
relationships with other nodes like associations and can include role names and ----------------------
multiplicity. The association will be the actual physical connection between the ----------------------
nodes like Ethernet cable.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig 5.33: Depiction of a Node with Attributes Operations and deployed
Components ----------------------

----------------------

----------------------

----------------------

----------------------

System Modelling and UML - II 117


Notes
Check your Progress 5
----------------------

---------------------- Fill in the blanks.


1. ___________ shows organisation of nodes carrying components.
----------------------
2. __________ comprises one or more components.
----------------------
3. Deployment node contains _________ components.
---------------------- 4. A node has _______ and _______ capability.
----------------------

---------------------- Activity 5
----------------------
Draw a deployment diagram for online shopping system.
----------------------
---------------------- Summary
---------------------- • A sequence diagram represents the interaction among different objects
of a system in the time order. These are used to document the systems
---------------------- requirements depending on the scenarios of the use-case diagram.
---------------------- • A collaboration diagram is a type of interaction diagram. Objects are
connected with numbered (sequenced) arrows. The numbered arrows are
---------------------- the links which depict the information flow between the objects.
---------------------- • Component diagrams are used to visualise the components of the system.
A component contains the software modules which can be deployed over
----------------------
a physical node. It constructs executables. It can be used to describe the
---------------------- physical artifact of the system.
• Deployment diagrams are used to model the topology of the physical
----------------------
nodes. A physical node may be a computer machine or a machine which
---------------------- gives interfaces to the client. A physical node on which the software
components are deployed is represented by a box which contains
---------------------- compartments name, attributes, functionalities and executables.
----------------------
Keywords
----------------------
• Sequence diagram: An interaction diagram that shows how processes
---------------------- operate with one another and in what order.
---------------------- • Collaboration diagram: It represents a combination of information
taken from class, sequence and use-case diagrams describing both the
---------------------- static structure and dynamic behaviour of a system.
----------------------

----------------------

118 Software Engineering with UML


• State diagram: A type of diagram used in computer science and related Notes
fields to describe the behaviour of systems.
----------------------
• Component diagram: It depicts how components are wired together to
form larger components and or software systems. ----------------------

----------------------
Self-Assessment Questions
----------------------
1. What is a sequence diagram? Explain the different types of fragmentation
used in sequence diagrams with an example. ----------------------
2. Differentiate between sequence diagram and collaboration diagram. ----------------------
3. What is a state diagram? What are its different types of compartments?
----------------------
Explain in detail.
4. Explain component diagram and deployment diagram in detail. ----------------------

----------------------
Answers to Check your Progress
----------------------
Check your Progress 1
----------------------
State True or False.
1. False ----------------------
2. True ----------------------
3. False ----------------------
4. True
----------------------
Check your Progress 2
----------------------
State True or False.
1. True ----------------------
2. False ----------------------
3. True ----------------------
4. True
----------------------
Check your Progress 3
----------------------
State True or False.
1. False ----------------------

2. True ----------------------
3. True ----------------------
4. True
----------------------

----------------------

----------------------

System Modelling and UML - II 119


Notes Check your Progress 4
State True or False.
----------------------
1. True
----------------------
2. True
---------------------- 3. True
---------------------- 4. True

---------------------- Check your Progress 5


Fill in the blanks.
----------------------
1. Deployment diagram shows organisation of nodes carrying components.
----------------------
2. Deployment node comprises one or more components.
---------------------- 3. Deployment node contains work product components.
---------------------- 4. A node has memory and processing capability.
----------------------
Suggested Reading
----------------------
1. Eriksson, Hans-Erik, Magnus Penkar, Brian Lyons and David Fado.
---------------------- UML2 ToolKit. Wiley.
---------------------- 2. Fowler, Martin. UML Distilled: A Brief Guide to the Standard Object
Modeling Language. Addison-Wesley.
----------------------
3. Miles, Russ and Kim Hamilton. Learning UML 2.0. O’Reilly Publication.
----------------------
4. Rumbaugh, James, Ivar Jacobsobn and Grady Booch. The Unified
---------------------- Modelling Language User Guide. Addison-Wesley.

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

120 Software Engineering with UML


Design Concepts and Principles
UNIT

6
Structure:

6.1 Introduction
6.2 Design Process
6.3 Design Principles
6.4 Design Concepts
6.5 Design Heuristics for Effective Modularity
6.6 Design Model
6.7 Design Documentation
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

Design Concepts and Principles 121


Notes
Objectives
----------------------
After going through this unit, you will be able to:
----------------------
• Explain the design process and design principles
----------------------
• Elaborate on the design concepts
---------------------- • Implement design heuristics for effective modularity
---------------------- • Discuss design model and design documentation

----------------------
6.1 INTRODUCTION
----------------------
Software design is the core of software engineering process. The
---------------------- requirements are gathered at the software analysis phase and the software
design is the final engineering action within the modeling activity. It helps in
---------------------- construction of code for the software.
---------------------- A software analysis model has different elements. Each element in the
software analysis model provides the information for the design model.
----------------------

---------------------- 6.2 DESIGN PROCESS


---------------------- Some elements that provide the information to the design model are
categorised into scenario-based elements, flow-oriented elements, class-based
---------------------- elements and behavioural elements.
---------------------- Figure 6.1 shows the design model.
----------------------
Component
---------------------- Level Design

----------------------
Interface
---------------------- Design
----------------------

---------------------- Architectural Design


----------------------

----------------------
Data Design
----------------------

---------------------- Fig. 6.1: Design Model


----------------------

----------------------

122 Software Engineering with UML


• The top layer in the design model is the component-level design which Notes
transforms class based, flow oriented and behavioural information from
the analysis model. ----------------------
• The interface design depicts how the software communicates with the ----------------------
users. It uses flow control information from flow-oriented elements like
data flow diagrams from analysis model. It also transforms scenario- ----------------------
based information from the analysis model.
----------------------
• The architectural design transforms flow based and class-based elements.
An architecture is a framework for software system under development. ----------------------
• Data design also called class design transforms class-based elements into ----------------------
design.
----------------------
So, all these layers are used to transform the different analysis elements
into the design. Collectively, it describes the transformation from analysis ----------------------
model to design model.
----------------------
Software design is a blueprint of the software which depicts the overall
view of the software. It is an iterative process. Iterations will occur until the ----------------------
software goal is reached.
----------------------
McGlaughlin suggests three characteristics for evaluation of a good design.
----------------------
• The design must implement all of the explicit requirements contained
in the analysis model, and it must accommodate all of the implicit ----------------------
requirements desired by the customer.
----------------------
• The design must be a readable, understandable guide for those who
generate code and for those who test and subsequently support the ----------------------
software.
----------------------
• The design should provide a complete picture of the software, addressing
the data, functional and behavioural domains from an implementation ----------------------
perspective.
----------------------
To evaluate the quality of a design representation, the developer must
establish technical criteria for good design. ----------------------
A design should contain the hierarchical organisation of all the ----------------------
subsystems within the software in a controlled manner. A good design should
distinguish clearly between the representation of data, architecture, interfaces ----------------------
and components within the design model. Most of the designs use a standard
notation which can be used to effectively communicate to the community of ----------------------
developers. ----------------------
Hewlett-Packard developed a set of software quality attributes – FURPS
----------------------
– that is, functionality, usability, reliability, performance and supportability.
These attributes represent a target for all software designs. ----------------------
Functionality: This is assessed by evaluating capability of the program,
• 
----------------------
generality of functions and the security of the overall system.
----------------------

Design Concepts and Principles 123


Notes Usability: It is assessed by considering the users of the system, consistency
• 
and documentation.
----------------------
Reliability: It is assessed by evaluating the accuracy of output, measuring
• 
---------------------- failure of the system and recovery procedures.
Performance: It is assessed by measuring the processing speed, response
• 
----------------------
time, resource consumption, throughput and efficiency.
---------------------- Supportability: It is concerned with maintainability, testability and
• 
compatibility of the system. It also assesses the configurability and ease
----------------------
of installation of the system.
----------------------
Check your Progress 1
----------------------

---------------------- State True or False.


---------------------- 1. Software designing is a kernel of software engineering.
2. Flow-oriented element and class-based element from analysis model
----------------------
is transformed by component level in data model.
---------------------- 3. Software designing does not help in code construction in software
development.
----------------------
4. 
In software design process, the developer requires to establish
---------------------- technical criteria.
---------------------- 5. A software design model consists of a hierarchical model of software
modules.
----------------------

---------------------- 6.3 DESIGN PRINCIPLES


----------------------
A design process contains steps that enable the software designer to
---------------------- describe all the elements that are analysed in the software analysis step. A
designer must use creative skills and past experiences while modelling the
---------------------- software.
---------------------- It is similar to an architect’s plan for a building. It includes the plan of the
building, 2D and 3D view of the building, guidance for constructing each part
---------------------- of the building. 
---------------------- Davis describes the set of principles for software design:

---------------------- 1. 
The design process should not suffer from tunnel vision. It means that a
good designer should consider alternative approaches.
----------------------
2. 
The design should be traceable to the analysis model. It suggests that the
---------------------- design model transforms the analysis elements, so all the elements of the
analysis model should be traceable.
----------------------
3. 
The design should reinvent the wheel. It means that the design should be
---------------------- representing new ideas and integration of patterns of those that already
exist.
124 Software Engineering with UML
4. 
The design should minimise intellectual distance between the software Notes
and the problem as it exists in the real world.
----------------------
5. 
The design should exhibit uniformity and integration.
6. 
The design should be structured to degrade gently, even when bad data, ----------------------
events or operating conditions are encountered.
----------------------
7. The design should be reviewed to minimise conceptual (semantic) errors.
----------------------
8. Design is not coding,
9. The design should be structured to accommodate change. ----------------------

10. The design should be assessed for quality as it is being created. ----------------------

----------------------
Check your Progress 2
----------------------
State True or False.
----------------------
1. While designing the software, a designer should not consider the
alternative solutions. ----------------------

2. Designing is nothing but code construction for software. ----------------------


3. Software design should be assessed for quality. ----------------------

----------------------
6.4 DESIGN CONCEPTS
----------------------
Some fundamental design concepts are as follows:
----------------------
1. Abstraction
• Abstraction refers to hiding details. In the modular software design ----------------------
many levels of abstractions can be used. Each level hides its details ----------------------
from another level. The highest level gives a broader view of the
system, whereas the lowest level gives detailed description. ----------------------
• A data object is a collection of data that describes the data object. ----------------------
A data attribute describes a data object. A programming language
provides the abstraction over the attributes. Some of the languages ----------------------
are Ada, Modula, CLU, etc.
----------------------
2. Architecture
----------------------
• A software architecture gives an overall view of the software. It
consists of a hierarchical structure which depicts the components ----------------------
and their relationship.
----------------------
• Shaw and Garlan describe a set of properties of architecture design:
• 
Structural properties: The architecture design defines the ----------------------
system components and their interactions. ----------------------

----------------------

Design Concepts and Principles 125


Notes • 
Extra-functional properties: The architecture design should
address how the design architecture achieves requirements for
---------------------- performance, capacity, reliability, adaptability and security.
---------------------- • 
Families of related systems: The architecture design should
draw upon repeatable patterns in the design of families of
---------------------- similar systems.
---------------------- • An architectural design consists of different methods. These are
structural model, framework model, dynamic model, process model and
---------------------- functional model. The structural model represents an organised collection
of components. Framework models are used to increase the level of
----------------------
abstraction by identifying repeatable architectural design frameworks that
---------------------- are used in similar types of applications. The behaviour of the software
can be depicted by the dynamic models. The process models are used
---------------------- to focus on the design of the business and technical process. Functional
models are used to represent functional hierarchy of a system.
----------------------
3. Modularity
----------------------
• A software is an integration of different components which are
---------------------- separately named as modules.

---------------------- • Meyer defines five criteria to evaluate a design method for an


effective modular system:
---------------------- • 
Modular decomposability: It is a systematic mechanism
---------------------- of design for decomposing a problem into sub-problems. It
reduces the complexity and helps to achieve the modularity
---------------------- for the system.
---------------------- • 
Modular composability: In this design method, the existing
design components are assembled into a new system. It helps
---------------------- in reusability of the components for the new systems.
---------------------- • 
Modular understandability: A module can be understood
as a standalone unit. It makes applications easier to build and
---------------------- easier to change.
---------------------- • 
Modular continuity: Changes to the system requirements result
in changes to individual modules instead of complete system.
----------------------
• 
Modular protection: When an abnormal condition occurs
---------------------- within a module, then its effects, changes are limited within
that module. The other modules can be protected from these
---------------------- abnormal changes.
---------------------- Modularity is a criterion for the structure of software which describes
individual modules and their interconnection. The two important terms used
---------------------- are cohesion and coupling. Cohesion means keeping two or more modules
---------------------- together. The strength of connection between modules is called coupling. A
highly coupled module increases the dependency. A loosely coupled module
---------------------- decreases the dependency between them and makes modules independent.

126 Software Engineering with UML


4. Refinement Notes
• Stepwise refinement is a top-down design strategy proposed by
----------------------
Niklaus Wirth. It is a simple, realistic method. The basic idea behind
this is to start with a high-level problem, break down the problem ----------------------
into small number of sub-problems to solve. Repeat this until all the
sub-problems are solved. ----------------------
• Refinement helps designers to expose low-level details. Abstraction ----------------------
and refinement are complementary concepts.
----------------------
5. Information hiding
• Each module in the software has data and functions or procedures. ----------------------
These data and functions are hidden from the other modules. So ----------------------
changes in modules do not affect other modules. So, modularity in
the software is effective and it enforces access constraints. ----------------------
• It is related to abstraction, cohesion and coupling. ----------------------
6. Refactoring
----------------------
• It is a design method used for agile methods. It is a reorganisation
technique. It is used to simplify the design or code of a module ----------------------
without changing the function or behaviour.
----------------------
• Martin Fowler defines refactoring as “the process of changing a
software system in such a way that it does not alter the external ----------------------
behaviour of the code [design] yet improves its internal structure.”
----------------------
• After refactoring the software, the design is examined for
redundancy. It is used to improve the design of the existing code. ----------------------
7. Functional independency ----------------------
• It is related to independency between the modules within the ----------------------
software system. Each module or unit within the software system
has specific functional requirements. It is measured using two terms ----------------------
- coupling and cohesion.
----------------------
• The different types of cohesion are logical cohesion, temporal
cohesion, procedural cohesion and communication cohesion. ----------------------
Logical cohesion means the modules perform their task logically.
----------------------
Temporal cohesion is related to performing the task within a time
limit. Procedural cohesion is related to performing task in an order ----------------------
and communication cohesion focuses on data structure which is
accessed by processing elements within the modules. ----------------------
• The strength of connection between modules is called coupling. ----------------------
There are different types of coupling - data coupling, stamp coupling,
control coupling, external coupling, common coupling and content ----------------------
coupling. Data coupling is when a module or component uses
----------------------
another module by argument passing. Stamp coupling is when a
module or component uses another module through data structure. ----------------------

Design Concepts and Principles 127


Notes Control coupling is when the control is passed between the modules
or components using a control variable. External coupling is when
---------------------- a module is connected to the external environment. Common
coupling is when all the modules share some global variable. When
---------------------- one module uses the data or control information of another module,
---------------------- it is called content coupling.
• A good modular design must have a high cohesion and low coupling.
----------------------
8. Designing classes
----------------------
• Defining classes is an important method for designing object-
---------------------- oriented systems. A designer designs different types of classes.
Some of these classes are system classes, process classes, user
---------------------- interface classes, business classes and persistent classes.
---------------------- • System classes are used to implement control and management
functions to communicate with the outside environment. Process
---------------------- classes are used to manage the business domain classes. Business
---------------------- domain classes are related to the business domain areas. User
interface classes are related to Human Computer Interaction (HCI).
---------------------- It is used to design the interfaces that describe all the elements of
the system.
----------------------
• A designer must develop complete set of attributes and operations
---------------------- for these classes.
----------------------
Check your Progress 3
----------------------
State True or False.
----------------------
1. A software consists of integration of different components and these
---------------------- are separately called modules.
---------------------- 2. Refinement helps designers to expose high-level details.

---------------------- 3. Refactoring is used to simplify the design or code of a module without


changing function or behaviour.
----------------------

---------------------- 6.5 DESIGN HEURISTICS FOR EFFECTIVE


---------------------- MODULARITY

---------------------- An effective modularity can be achieved by applying design concepts


like abstraction, architecture, refinement, information hiding, refactoring,
---------------------- functional dependency and designing classes after creating the program
structure. This structure can be reorganised as per guidelines (heuristics) for
----------------------
effective modularity. Some of the guidelines are as follows:
---------------------- • Evaluate the first iteration of program structure to reduce coupling and
improve cohesion. Program architecture consists of organisation of
----------------------

128 Software Engineering with UML


modules. Attempt should be made to reduce the coupling and improve Notes
the cohesion. It increases the modularity in the program units.
----------------------
• Attempt to minimise structures with high fan-out; strive for fan-in as
depth increases. ----------------------
• Keep scope of effect of a module within the scope of control of that
----------------------
module.
• Evaluate module interfaces to reduce complexity and redundancy and ----------------------
improve consistency.
----------------------
• Define modules whose functions are predictable, but avoid modules that
are overly restrictive. ----------------------

• Strive for controlled entry, no switch or jump. ----------------------


• Packaging of software based on design and requirements. ----------------------

Check your Progress 4 ----------------------


----------------------
State True or False.
----------------------
1. An effective modularity can be achieved by applying design concepts.
2. The functions defined in modules should be predictable. ----------------------

3. Depending on requirement specification packaging of module should ----------------------


be done.
----------------------

6.6 DESIGN MODEL ----------------------

The design model includes representation of data, architecture, interfaces ----------------------


and procedures. Figure 6.2 shows a design model that contains the elements - ----------------------
data design, architecture design, interface design and procedural design.
----------------------
There are two dimensions that exist for design model - one is abstract
dimension and the other is process dimension. The abstract dimension is a ----------------------
representation of transformation of analysis model to design model. Analysis
model is at high level of abstraction and design model is at low level of ----------------------
abstraction. A decision boundary will be decided by the designer in between
----------------------
high level of abstraction and transformation and low level of abstraction.
The process dimensions contain elements, such as architecture elements, ----------------------
interface elements, component-level elements and deployment-level elements.
----------------------
Software requirements are analysed using class diagrams, packages, CRC
models, collaboration diagrams, data flow diagrams, control flow diagrams and ----------------------
processing narratives. These are transformed into designing classes, realisations ----------------------
between classes, subsystem and collaboration diagram which are related to
design model architecture elements. ----------------------
Interface elements on process dimension are technical interface designing ----------------------

Design Concepts and Principles 129


Notes GUI and navigation designs are the transformation of use cases, activity
diagrams, state diagrams, collaboration diagrams, sequence diagrams which are
---------------------- created at analysis model.
---------------------- Component-level elements on the process dimension are component
diagrams, class designs, activity diagrams and sequence diagrams which are
---------------------- the transformation from class diagrams, packages, CRC models, collaboration
diagrams, data flow diagrams, control flow diagrams and sequence diagrams
----------------------
from the analysis models.
----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 6.2: Dimensions of Design Model

---------------------- Check your Progress 5


----------------------
Fill in the blanks.
----------------------
1. _________ includes representation of data, architecture, interfaces
---------------------- and procedures.

---------------------- 2. ________ and navigation design are the transformation of use cases.

----------------------
6.7 DESIGN DOCUMENTATION
----------------------
Design documentation helps in navigating the design elements. Some of the
---------------------- following points can be incorporated when designing the document:
---------------------- • First, scope needs to be defined which contains system objectives, major
software requirements, design constraints and limitations.
----------------------
• Second, data design which contains details about data objects and data
---------------------- structures, file and database structures which are logical structure, logical
record descriptions, access methods, global data, file and data cross-
---------------------- reference.
----------------------

130 Software Engineering with UML


• Third is architectural design details. These are review of data and control Notes
flow, derived program structure.
----------------------
• Fourth, interface design details are human-machine interface specification,
human-machine interface design rules, external interface design which ----------------------
consists of interfaces to external data, interfaces to external systems or
devices, interface design rules . ----------------------
• Fifth, procedural design details for each module, a processing narrative, ----------------------
interface description, design language description, details of modules
used, internal data structures, any comments, restrictions or limitations ----------------------
are detailed.
----------------------
• Requirements cross-reference.
----------------------
• Test provisions and testing guidelines, strategies and special considerations.
• Special notes. ----------------------

• Appendix. ----------------------
The above sequence can be used as a template for documentation. ----------------------

Check your Progress 6 ----------------------

----------------------
Fill in the blanks.
----------------------
1. In ________ of design, interface design details are human-machine
interface specification. ----------------------
2. In documentation of design, scope needs to be defined which should ----------------------
contain _____, _________, ________ and ________ .
----------------------
3. In documentation of design, _________ design details are review of
data and control flow, derived program structure. ----------------------

----------------------
Activity 1
----------------------
Find out the importance of design documentation for a specific project. ----------------------

----------------------
Summary
----------------------
• Design is the core of software engineering. Design consists of refinement ----------------------
of data structure, program architecture and interfaces. It also consists
of development of procedural details, reviewing and documentation of ----------------------
procedural details.
----------------------
• Researchers have proposed a number of software fundamental principles
and concepts. Design model helps in improving the quality of the software. ----------------------
• Design concepts are the basic criteria for design quality. ----------------------

Design Concepts and Principles 131


Notes • After gathering the requirements at the software analysis phase, the
software design is the final engineering action within the modelling
---------------------- activity. It helps in construction of code for the software.
---------------------- • A design model is a pyramid-like structure consisting of data design,
architecture design, interface design and component-level design.
----------------------

---------------------- Keywords
---------------------- • Design principles: Describe fundamental ideas about the practice of a
good visual design.
----------------------
• Modularity: The degree to which a system’s components may be
---------------------- separated and recombined.

---------------------- • Design documentation: A written description of a software product that


a software designer writes in order to give a software development team
---------------------- overall guidance to the architecture of the software project.
----------------------
Self-Assessment Questions
----------------------
1. Explain the software design process in detail.
----------------------
2. Explain the design principles and design concepts in detail.
---------------------- 3. Explain design model and design documentation.
----------------------
Answers to Check your Progress
----------------------
Check your Progress 1
----------------------
State True or False.
----------------------
1. True
---------------------- 2. True
---------------------- 3. False

---------------------- 4. True
5. True
----------------------
Check your Progress 2
----------------------
State True or False.
---------------------- 1. False
---------------------- 2. False

---------------------- 3. True

----------------------

----------------------

132 Software Engineering with UML


Check your Progress 3 Notes
State True or False.
----------------------
1. True
----------------------
2. False
3. True ----------------------
Check your Progress 4 ----------------------
State True or False. ----------------------
1. True
----------------------
2. True
----------------------
3. True
Check your Progress 5 ----------------------

Fill in the blanks. ----------------------


1. 
Design model includes representation of data, architecture, interfaces and ----------------------
procedures.
----------------------
2. GUI and navigation design are the transformation of use cases.
Check your Progress 6 ----------------------
Fill in the blanks. ----------------------
1. In documentation of design, interface design details are human-machine ----------------------
interface specification.
2. In documentation of design, scope needs to be defined which should contain ----------------------
system objectives, major software requirements, design constraints and ----------------------
limitations.
----------------------
3. In documentation of design, architectural design details are review of data
and control flow, derived program structure. ----------------------

----------------------
Suggested Reading
----------------------
1. Pressman, Roger and Bruce Maxim. 2014. Software Engineering: A
Practitioner’s Approach. McGraw-Hill. ----------------------
2. Sommerville, Ian. Software Engineering. Addison-Wesley. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

Design Concepts and Principles 133


Notes

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

134 Software Engineering with UML


Architectural Design
UNIT

7
Structure:

7.1 Introduction
7.2 Software Architecture
7.3 Data Design
7.4 Architectural Styles
7.5 Mapping Requirements in Software Architecture
7.5.1 Transform Mapping
7.5.2 Transaction Mapping
7.6 Refining Architectural Design
7.7 User Interface Design (UID)
7.7.1 The Golden Rules of User Interface Design
7.7.2 Task Analysis and Modelling
7.7.3 Interface Design Activities
7.7.4 Design Evaluation
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

Architectural Design 135


Notes
Objectives
----------------------
After going through this unit, you will be able to:
----------------------
• Explain the concept of software architecture and data design
----------------------
• Analyse software architecture styles
---------------------- • Discuss the concept of user interface design
---------------------- 7.1 INTRODUCTION
----------------------
Architectural design is similar to making a plan on paper. It contains design
---------------------- of the software. A software consists of programs, data structure and interfaces;
an architecture gives the idea of data flow within the system. For example, if
---------------------- you want to construct your house, you take a sketch from the architect who
describes every aspects, specification and layout of your house. After watching
----------------------
the architecture of your house, you finalise and start building it. That sketch
---------------------- provides you an architectural view of your house.
In this unit, we will discuss the various aspects of software architecture
----------------------
and designing of user interfaces.
----------------------
7.2 SOFTWARE ARCHITECTURE
----------------------
A software architecture provides the overall view of the software product.
----------------------
It represents the structure of data and program components to build a system.
---------------------- After gathering the system requirements and specification the structure or
framework is developed which describes the modules and relationship between
---------------------- these modules.
---------------------- An architectural view is an actual design and layout of your requirement
specification (SRS) gathered in the analysis phase. An architectural design is
---------------------- the process of defining a collection of hardware and software components and
their interfaces to establish the framework for the development of a computer
----------------------
system. It represents the structure of data in the system as well as structure of
---------------------- the components which are to be built in the system. Once an architecture of one
system is created, it can be applied to another system.
----------------------
A software engineer can design both data and architecture. A database or
---------------------- data warehouse designer creates the data architecture for the system. The system
architect selects appropriate architectural style for the requirements gathered
---------------------- during software requirement analysis. Architecture helps the software engineer
---------------------- to analyse the effectiveness of the system and it can reduce the potential risks.
Architecture of a system can be a communication medium between the software
---------------------- development teams which shows the directions and details of the development.
Architecture depicts all the components of the system and how the system
---------------------- works. In Software Architecture in Practice by Len Bass, there are three key
---------------------- reasons as to why software architecture is important.

136 Software Engineering with UML


• It enables communication between all the stakeholders. Notes
• The architecture highlights early design decisions that will have an impact
----------------------
on all software engineering work that follows.
• Architecture contains relatively small, intellectually graspable model of ----------------------
how the system is structured and how it’s all components work together.
----------------------
An architectural design process has some basic steps as follows:
----------------------
• Design data structure.
• Derive possible architectural structures from SRS for the system. ----------------------

• Analyse and select architecture from available alternatives which can be ----------------------
best suited to customer requirements.
----------------------
• Make the architecture specification in detail.
----------------------
Check your Progress 1 ----------------------

State True or False. ----------------------

1. Software architecture represents the overall view of the product. ----------------------


2. Software architecture is the implementation of system requirement ----------------------
specification gathered in the analysis phase.
----------------------
3. Software architecture model of one software can be applied to other
software. ----------------------
4. Software architecture depicts all the components of the software
----------------------
system and tells how it works.
----------------------

Activity 1 ----------------------

----------------------
Suppose an apartment security software is to be developed to provide
security to apartments. It should consist of several types of sensors and ----------------------
cameras. Analyse it and draw its overall software architecture using
----------------------
UML component diagram.
----------------------
7.3 DATA DESIGN ----------------------
Data design transforms the data objects defined in the analysis model into ----------------------
data structures. These data structures are directly accessible by the software
components. So the data design concentrates on the aspect of accessibility ----------------------
of the data structures to the software components. In a software system data ----------------------
quality has an importance. The main challenge is to store and retrieve data
successfully without redundancy. It enables the organisation of the database ----------------------
into the data warehouse which can be helpful for data mining. In the analysis
phase, for example, ER diagrams depict the analysing view of data which can be ----------------------

Architectural Design 137


Notes transformed into data structures which are required to implement the software.
Data design is used at the architectural level and component level.
----------------------
Data Design at Architectural Level
---------------------- Data warehouse and data mining are examples of data design at the
architectural level. Data mining techniques are also called knowledge discovery
----------------------
in databases. At the business level there is existence of multiple databases, their
---------------------- different structures makes data mining difficult within an existing database
environment. So the solution for this is data warehouse which is an additional
---------------------- layer to the data architecture.
---------------------- Data Design at Component Level

---------------------- It focuses on the representation of data structures. These data structures are
directly accessed by one or more software components. The design principles
---------------------- of analysis model can be used to specify and design these data structures. Some
of the design principles for data specification are as follows:
----------------------
• The systematic analysis principles applied to function and behaviour
---------------------- should be applied to data.
---------------------- • All data structures and the operations to be performed on each should be
identified.
---------------------- • A mechanism for defining the content of each data object should be
---------------------- established and used to define both data and operations applied to it.
• The data structure may be known to only those modules that make direct
---------------------- use of the data contained within the structure.
---------------------- • A library of useful data structures and operations that may be applied to
them should be developed, for example, a class library.
----------------------
• A software design and programming language should support the
---------------------- specification of abstract data types.
These principles are the basis for component-level data design. It can be applied
----------------------
to both analysis and design-level activities.
----------------------
Check your Progress 2
----------------------

---------------------- State True or False.


---------------------- 1. A data design transforms object design into data structure.
2. ER diagrams can be transformed into data structure.
----------------------
3. Design of data structure is a part of the analysis phase.
----------------------

----------------------
Activity 2
----------------------
Draw the ER diagram for Activity 1 and study the overall data structure for
---------------------- the different entities used in it.

138 Software Engineering with UML


7.4 ARCHITECTURAL STYLES Notes
Architectural styles are the set of rules that comprises components ----------------------
and connectors that interface between components and properties of object.
Architectural style is a family of the architectures constrained by components, ----------------------
connectors and their topology.
----------------------
An architectural style categorised by set of components that performs
functions, constraints on integration and semantic models are useful to ----------------------
understand overall system properties. ----------------------
Some of the architectural styles are:
----------------------
1. Data flow style
----------------------
• Batch sequential
• Pipes and filters ----------------------
2. Data centred ----------------------
• Blackboard ----------------------
• Repository.
----------------------
3. Call and return
----------------------
• Main program and subroutines
• Remote Procedure calls. ----------------------
4. Layered ----------------------
5. Object Oriented ----------------------
1. Data flow style: It depicts the flow of the data throughout the components
----------------------
of the system at a time until it produces the output or is stored into the
database. It gives the picture of orderly motion of the data from process to ----------------------
process. In this, the input is transformed into the output through a series of
components which may do computations of manipulations on the input. ----------------------
These are two types of data flow style: batch sequential and pipes and filters. ----------------------
• Batch sequential: In batch sequential, the processing steps are
----------------------
independent components. Each step in this gets completed before the next
step begins. Data flows between different steps. A program development ----------------------
is an example. The different steps in a program carries the data input
and produces output. Example of batch sequential style is a transaction ----------------------
processing system which gets input from the user, validates the input,
----------------------
updates and reports to user. All these functionalities are carried in a
sequential order. ----------------------
Input Validate Update Report ----------------------

Fig. 7.1: Batch Sequential Style ----------------------

----------------------

Architectural Design 139


Notes • Pipes and filters: In pipes and filters, each component has a set of input
data and set of output data through pipes. Filters incrementally transform
---------------------- set of input data to data at output. The transformation through these filters
is called stream-to-stream filter and another type of filter is called local
---------------------- transformation. Pipes transfer data from filter of output of the component
---------------------- to the filter of input. It is similar to the pipes and filter concept used in
UNIX system.
----------------------
pipes filter filter
----------------------
filter filter filter filter
----------------------

---------------------- filter filter filter


----------------------
filter
----------------------
pipes and filters
----------------------

---------------------- filter filter filter filter

---------------------- batch sequential


---------------------- Fig. 7.2: Pipes and Filters and Batch Sequential
---------------------- 2. Data centred: In this type, the file or data store is at the centre of the
architecture and the client software components access it frequently to
---------------------- view or modify. Data store is a repository of the data.
---------------------- The data store can be accessed by client software. These data stores
are passive, which means that the client software can access the data
----------------------
independent of any changes to the data or the actions of other client
---------------------- software. A variation to this is “blackboard” that sends notifications to
client software when data of interest to the client changes.
----------------------
client client
---------------------- client
software software
client
software software
----------------------

----------------------
Data store
---------------------- (repositor or
client
client black board)
software
---------------------- software

----------------------
client client
---------------------- software software

---------------------- Fig. 7.3: Data Centre

140 Software Engineering with UML


3. Call and return: The call and return architectural style is different from Notes
filters and pipes, which transform control from one component to another
component and return. It comprises the main program and subroutines, and ----------------------
hierarchical layers. In the main program and subroutine call and return,
transformation is between the main program and their subprograms called ----------------------
subroutines. The following figure shows call and return architecture style ----------------------
elements.
Main Program ----------------------

----------------------

controller controller controller ----------------------


subprogram subprogram subprogram
----------------------

----------------------
Application Application Application
Program Program Program ----------------------
Fig: 7.4: Call and Return: Main Program, Subprogram and Application
----------------------
Program
4. Object orientation: Object orientation comprises object, class, subclass, ----------------------
instance, method, encapsulation, inheritance, dynamic binding, reuse and ----------------------
maintenance and message passing concepts. Modularity and reuse are the
main advantages of object orientation. ----------------------
In an object, data and functions encapsulated in an object is called abstract ----------------------
data type. These objects communicate with each other through functions.
This is called message passing. It is essential in the system that these ----------------------
objects may communicate with each other to run the system and perform
the user operations. In UML, class diagrams and object diagrams give a ----------------------
picture of object orientation style. ----------------------
5. Layered architecture: Layered architecture depicts hidden layer,
----------------------
middle layers and view layers. The view layer hides lower-level layers.
It maintains the abstraction in the different layers so modularity between ----------------------
the systems can be maintained. These different layers communicate with
each other through interfaces. ----------------------

Outer Layer ----------------------


e.g. Application Level
----------------------
Middle Layer
e.g. Basic Utilities
----------------------

----------------------
Core Layer
----------------------

----------------------

----------------------
Fig. 7.5: Layered Architecture

Architectural Design 141


Notes In Figure 7.5 there are three layers - core layer, middle layer and application
layer. Each layer is serving to other layers, which means the core layer is serving
---------------------- the middle layer and the middle layer is serving the outer layer.
----------------------
Check your Progress 3
----------------------
State True or False.
----------------------
1. An architectural style is a family of architectures that defines the
---------------------- organisation of the components, their interfaces and properties.
---------------------- 2. A data flow style contains different layers.
---------------------- 3. In object orientation style, the functions and operations are
encapsulated in an object.
----------------------
4. In layered architecture, the different components are organised into
---------------------- different layers and these layers communicate through interfaces.
5. 
In call and return architecture style, hierarchical structuring of
----------------------
modules are used.
----------------------

---------------------- Activity 3
----------------------
Sketch the different architectural styles for Activity 1.
----------------------

---------------------- 7.5 MAPPING REQUIREMENTS IN SOFTWARE


ARCHITECTURE
----------------------
Mapping requirements is the mapping between the requirements gathered
----------------------
in the analysis phase with the design of the software architecture. It establishes
---------------------- type of information flow. The information flow is of two types - transform flow
and transaction flow.
----------------------
Data Flow Diagram (DFD) is an architectural model which facilitates
---------------------- the transformation from analysis model to design description of the program
structure.
----------------------
The DFD shows the information flow. Transformation of information flow to
---------------------- program structure can be achieved using the following steps:

---------------------- i. Information flow type is established.


ii. Indication of flow boundaries.
----------------------
iii. Control hierarchy is defined by factoring.
----------------------
iv. The resultant program structure is refined using design measures and
---------------------- heuristics.

----------------------

142 Software Engineering with UML


7.5.1 Transform Mapping Notes
In transform flow, overall data flow is sequential and flows along a small
----------------------
number of straight line paths called pipes. The data flows between the different
components of the system. In Data Flow Diagram (level 0), for example, data ----------------------
enters into the system from external entities and it gets transformed into the
internal processes. It transforms from internal processes and outputs from the ----------------------
software as output. The transformation occurs in a sequential order from one
----------------------
component to another component in the system.
The sequence of steps followed in transform mapping is as follows: ----------------------
i. Analysing the fundamental system model ----------------------
ii. Defining the correctness of the data flow diagram by analysing it and ----------------------
refining the data flow diagram
iii. Analysing DFDs for transformation and transaction flow characteristics ----------------------

iv. Specifying incoming and outgoing flow boundaries for transform centre ----------------------
v. Performing first-level factoring ----------------------
vi. Performing second-level factoring
----------------------
vii. Refining the first iteration architecture using design heuristics for
improved software quality ----------------------
7.5.2 Transaction Mapping ----------------------
A system consists of many data items. When an event comes to data item, ----------------------
it has many information flow paths. So occurrence of an event triggers one of
the information flow paths from the available paths. This is called transaction. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 7.6: Transaction Flow and Transformation Flow ----------------------
In this, a data flow diagram which carries the requirement analysis can
----------------------
be mapped into the program structure. The program structure obtained by DFD
can be later refined using design measures and heuristics. After refinement the ----------------------
architecture description is refined and elaborated.
----------------------
A transaction centre is a centre from where an information flow has many
outgoing paths. Information flows within the processes and transaction centres ----------------------

Architectural Design 143


Notes within a system and goes outside of the system which is called transaction. The
evaluation of the transaction is done based on the flow path and its value.
----------------------

----------------------
Check your Progress 4

---------------------- Fill in the blanks.


---------------------- 1. 
_________ is an architectural model which facilitates the
transformation from analysis model to design.
----------------------
2. __________ is defined by factoring.
---------------------- 3. The transformation occurs into the processes is in ____________
---------------------- order.
4. A _________ is a center from where an information flow has many
----------------------
outgoing paths.
----------------------
---------------------- Activity 4
----------------------
Consider the example in Activity 1. Draw transaction flow and transform
---------------------- flow diagrams. Refer to the books named in Suggested Reading for drawing.

----------------------
7.6 REFINING ARCHITECTURAL DESIGN
----------------------
Refining architectural design contains the processing of the narrative
----------------------
developed for each model. A narrative gives the description of the information
---------------------- flow in the system. It gives the description of the data item or data centre,
where the data is stored and processed in the software system. It gives the
---------------------- description about major decision points and procedures, tasks. It briefs about
the constraints, restriction and special features like file input, output operations,
----------------------
hardware dependencies, data stores, special events based on timings. A narrative
---------------------- is useful for first level generation of the design specification and it can be later
incremented based on requirement.
----------------------
The system comprises several modules, which communicate with each
---------------------- other. These modules communicate through the interfaces. So in refinement
of architectures, the interfaces are described in detail for each module. In the
---------------------- analysis model, the ER diagrams describe the view of data organisation which
are implemented in data design. The data design is used to implement the data
----------------------
structures. Data structures are of two types - local data structures and global
---------------------- data structures. It is necessary to correctly define the local and global data
structures. When refining the software architecture it is important to refine the
---------------------- local and global data structures. At the last phase of refining architectures, the
design reviews are conducted and noted.
----------------------

----------------------

144 Software Engineering with UML


Notes
Check your Progress 5
----------------------
State True or False. ----------------------
1. Refinement of architecture design contains the processing of the
----------------------
narrative developed for each model.
2. A narrative gives description of the information flow in the system. ----------------------
3. When refining the software architecture it is important to refine the ----------------------
local and global data structures.
----------------------

Activity 5 ----------------------

----------------------
Consider the different functions with its scenarios of the example in Activity
1 and write the narrative for the information flows. ----------------------
----------------------
7.7 USER INTERFACE DESIGN (UID) ----------------------
User interface is a module or component within software system which gives ----------------------
interface to the user to interact with the system components. It can be visualised and
through this the user can interact with the system. The users who interact with the ----------------------
user interface component can be an internal user and external user. ----------------------
User interface has two main modules or subcomponents. These are input
and output. In the input, user can provide information to the system through the ----------------------
input devices. Output is the processed information which the user gets from the ----------------------
system. The output information produced can be in the form of reports.
----------------------
User interface design is a field of Human Computer Interaction (HCI). Human
computer interaction is a method or technique that deals with analysing and ----------------------
designing how users and computer software communicates with each other. It
deals with the designing of Graphical User Interface (GUI). Users perform their ----------------------
tasks using user interfaces, so it is important to include the relationship between
----------------------
the different task stages. It means there should be a relationship between the
different tasks which the user performs with their system. In the user interface, ----------------------
the conceptual model of the system should be consistent. It should contain
the description of state and alternatives in the interface. Users should receive ----------------------
feedback continuously.
----------------------
7.7.1 The Golden Rules of User Interface Design
----------------------
The golden rules of user interface design are:
1. Place users in control interface ----------------------

• User performs specific tasks using the interface. When user performs ----------------------
some task with the system the interface should not preempt the user
to do some unnecessary task or action. ----------------------

Architectural Design 145


Notes • Maintain abstraction from unauthorised users.
• Provide different preferences to the users.
----------------------
• Allow user to interrupt the interaction and undo the operation
---------------------- performed by him.
---------------------- • Streamline and customise interaction with the interface.

---------------------- 2. Reduce user’s memory load


• A good computer interface should help user to remember information
---------------------- while using the interface.
---------------------- • It should not force users to remember and repeat what the computer
should do for them.
----------------------
• Interface should provide the undo, redo and default fields.
----------------------
• Interface should provide the visual clues to facilitate users.
---------------------- • Interface should provide defaults, shortcuts to the user to do his task
---------------------- speedily and there should be no need to remember the procedures
for performing the task.
---------------------- • Interface should contain the consistent object syntax. It makes easy
---------------------- for the user to understand the object relationships and their actions.
• Interface can be promoted to use the real-world metaphors to transfer
---------------------- knowledge about how things look and work. So it is important to
---------------------- use the consistent metaphors as user can easily recognise it.
• Interface should always provide easy access to the common features
----------------------
and actions used by the user.
---------------------- • In an interface the grouping of menus, items, information should be
proper so that the user can visualise their task clearly. It is the skill
----------------------
of the graphic artist to categorise these menus, options and items
---------------------- clearly.
3. Make the interface consistent
----------------------
• It is important to make consistency in the interface. But sometimes
---------------------- due to change in the environment it becomes necessary to change
---------------------- the interface consistency. So it should be prioritised depending on
the environment.
---------------------- • The interface should sustain the continuity of the user’s task and
---------------------- maintain consistency across all the screens and outputs that the
system produces.
---------------------- 7.7.2 Task Analysis and Modelling
---------------------- In task analysis and modelling, a software engineer plays an important
role. A software engineer studies the tasks of the user who wants to complete
----------------------
his tasks to accomplish the goal. He maps the analysed requirements of the user
---------------------- to the system implemented. A good definition of the tasks should accommodate

146 Software Engineering with UML


the user’s model, design of the system and the system’s perception. A software Notes
engineer can use an object-oriented approach by realising the real-world objects
and user actions or functions. A software engineer should model the interface ----------------------
objects and visualise their real-world implementations.
----------------------
7.7.3 Interface Design Activities
----------------------
While designing an interface it is important to establish the goal for each
task to be performed with its intention. A task is a sequence of actions that the ----------------------
user performs with the system. The result of completion of all the sequence
of actions within the task is a goal which the user wants to achieve. So it is ----------------------
necessary to map the goal to the sequence of the actions that the user performs
----------------------
while performing the task.
The state of the system should be indicated while the user performs his ----------------------
task. For example, when the user is performing a task the system should be
----------------------
in active state or inactive state or in waiting state to reduce the load on the
interface by multiple users. ----------------------
As user’s control is one of the golden rules while designing an interface, ----------------------
these controls should be well defined. User control can affect the state of the
system. In this, proper definitions should be given to the affecting states of the ----------------------
system while placing the user control. The interpretation of each state within
the system from the user’s point of view should be described in detail. ----------------------

The following issues should be considered while designing the interface: ----------------------
• Errors occurred during the information handling. ----------------------
• Help facilities to the user, for example, online helps and offline helps.
----------------------
• Response time of the system to the events triggered by the user.
----------------------
For getting users attention to the interface data, the following data display
qualities can be implied: ----------------------
• Intensity ----------------------
• Marking
----------------------
• Fonts
----------------------
• Inverse video
• Blinking ----------------------
• Colour standard and colour blinking ----------------------
• Audio ----------------------
7.7.4 Design Evaluation
----------------------
The following steps are followed while evaluating an interface:
----------------------
i. Evaluation of preliminary design.
ii. Construction of first interface prototype. ----------------------
iii. User evaluates interface and gives feedback. ----------------------

Architectural Design 147


Notes iv. Evaluation results and feedback studied by designer.
v. Modifications in the design are made as per inputs from the user.
----------------------
vi. Construction of next prototype.
----------------------
vii. If interface is not complete then go to step iii. and repeat.
---------------------- The evaluation criteria are as follows:
---------------------- i. The length and complexity of the interface specification and level of
learning required by user.
----------------------
ii. Definition of interaction time of the user. The number of user’s task and
---------------------- average number of the tasks performed by the user. Evaluation of the
system’s efficiency for these tasks.
----------------------
iii. Indication of memory load to the total number of tasks performed by
---------------------- users.
---------------------- iv. Interface style, help facilities and error handling functions.

---------------------- Check your Progress 6


----------------------
State True or False.
----------------------
1. A user interface gives an interface to the internal users of the system.
----------------------
2. Task analysis on the interface is done by a software engineer.
---------------------- 3. Undo, redo and auto fill reduce user’s memory load.
---------------------- 4. Abstraction from unauthorised users is nothing but an activity of
placing control on user interface.
----------------------

----------------------
Activity 6
----------------------
Create a sample user interface with different menu options and descriptions
----------------------
for the scenario mentioned in Activity 1.
----------------------

---------------------- Summary
---------------------- • Software architecture represents the overall view of a software product.
It depicts the organisation of software components, its structure and
----------------------
connection between them.
---------------------- • Data design translates data objects into data structures within the software.
---------------------- A data design is useful at the component level and the architecture level.
• Architectural styles are the set of rules that comprises components,
---------------------- connectors that interface between components and properties of object.
---------------------- • Design refinement is required to analyse and review the design of smaller

148 Software Engineering with UML


units within the software system. A data flow diagram is mapped into the Notes
program structure using one of the two mapping approaches - transaction
flow and transform flow. ----------------------

----------------------
Keywords
----------------------
• DFD: Graphical representation of the “flow” of data through an
information system. ----------------------
• Architecture style: Particular pattern that focusses on the large scale of a ----------------------
system.
----------------------
• Architectural design: Represents the structure of the data and program.
----------------------
Self-Assessment Questions ----------------------
1. What is architectural design? Explain in detail. ----------------------
2. Explain the different architectural styles. ----------------------
3. Explain transaction mapping and transform mapping.
----------------------
4. What are the different golden rules for user interface design?
----------------------
Answers to Check your Progress ----------------------
Check your Progress 1 ----------------------
State True or False.
----------------------
1. True
----------------------
2. True
3. True ----------------------
4. True ----------------------
Check your Progress 2 ----------------------
State True or False.
----------------------
1. True
----------------------
2. True
3. True ----------------------
Check your Progress 3 ----------------------
State True or False. ----------------------
1. True
----------------------
2. False
----------------------
3. True
----------------------

Architectural Design 149


Notes 4. True
5. True
----------------------
Check your Progress 4
----------------------
Fill in the blanks.
---------------------- 1. 
DFD is an architectural model which facilitates the transformation from
---------------------- analysis model to design.
2. Control hierarchy is defined by factoring.
----------------------
3. The transformation occurs into the processes in sequential order.
----------------------
4. A transaction centre is a centre from where an information flow has many
---------------------- outgoing paths.
Check your Progress 5
----------------------
State True or False.
----------------------
1. True
---------------------- 2. True
---------------------- 3. True
---------------------- Check your Progress 6
State True or False.
----------------------
1. True
----------------------
2. True
---------------------- 3. True
---------------------- 4. True
----------------------
Suggested Reading
----------------------
1. Bass, Len, Paul Clements and Rick Kazman. Software Architecture in
---------------------- Practice. Addison Wesley.
---------------------- 2. Clements, Paul, Felix Bachmann, Len Bass, David Garlen, James Ivers,
Reed Little, Robert Nord and Judith Stafford. Documenting Software
---------------------- Architectures: Views and Beyond. Addison Wesley.
---------------------- 3. Pressman, Roger and Bruce Maxim. Software Engineering: A
Practitioner’s Approach. McGraw-Hill.
----------------------

----------------------

----------------------

----------------------

----------------------

150 Software Engineering with UML


Software Testing Techniques
UNIT

8
Structure:

8.1 Introduction
8.2 Software Testing Fundamentals
8.3 Test Case Design
8.4 White-Box Testing
8.4.1 Basis Path Testing
8.4.2 Control Structure Testing
8.5 Black-Box Testing
8.6 Software Testing Strategies
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

Software Testing Techniques 151


Notes
Objectives
----------------------
After going through this unit, you will be able to:
----------------------
• Discuss the fundamentals of software testing
----------------------
• Compare different testing strategies
---------------------- • Explain white-box testing and black-box testing
----------------------
8.1 INTRODUCTION
----------------------
The technique of detecting faults in the system is called software testing.
----------------------
Software testing is very useful to improve the confidence level of a
---------------------- software developer and a user in the system. A software tester is a professional
in the software development team who is responsible for testing the software. It
---------------------- assesses different factors in the software, such as performance, memory usage,
reliability, security and usability. In this unit, we will be discussing about the
----------------------
various points related to software testing techniques.
----------------------
8.2 SOFTWARE TESTING FUNDAMENTALS
----------------------
If a software which is going to be tested have a better quality in terms of
----------------------
its working it become easy to test. The input and output to the software should
---------------------- be easily observable, so wrong input and output can be identified correctly. This
wrong input and output are because of internal errors in the information flow,
---------------------- computations within the modules, so it should be detected automatically.
---------------------- Software consists of different objects that have different states. Objects
have their attributes (variables) and operations (functions). It is necessary to
---------------------- keep control on variables. These variables should be controllable by the software
tester. It is easy to test the software which is decomposable into different
----------------------
modules. Independent modules can be tested separately and then integrated into
---------------------- the system. It makes detection of faults in the code and information flow easy.
The code in the software should be simple and understandable. These are some
---------------------- of the characteristics of software to be tested.
---------------------- A software tester must understand the functioning of each module in
the software and find the probabilities of how the software might fail. During
---------------------- software testing, a software tester conducts various types of tests on the software
---------------------- to detect the errors. The number of tests conducted should have different
parameters for evaluation so that they reduce the redundancy or repetition in
---------------------- the test and testing the software becomes completely easy. A good test should
uncover all the errors in the software. Different tests should be conducted
---------------------- separately. If there is a series of tests conducted, it may hide some errors and
---------------------- have some side effects. There are two basic techniques used for software testing
- one is white-box testing and the other is black-box testing.
----------------------

152 Software Engineering with UML


Notes
Check your Progress 1
----------------------
State True or False. ----------------------
1. Software testing is used to test performance, memory usage, reliability,
----------------------
security and usability of software.
2. Software testing is used for detecting errors in the software. ----------------------
3. Software testing is used to test the information flow. ----------------------
4. A software testing activity contains a series of tests. ----------------------

----------------------
Activity 1
----------------------
Consider any software you use. Try to find the defects at the operational ----------------------
level. If defects are found, document it.
----------------------

8.3 TEST CASE DESIGN ----------------------

Test case design assists the software team in developing a complete set of ----------------------
test cases for black-box and white-box testing. The number of tools falls into
----------------------
two categories - static testing and dynamic testing. In the industry, code-based
testing tools, specialised testing languages and requirement- based testing tools ----------------------
are used. In code-based testing tools, code is an input and performs number of
analyses to generate the test cases. Specialised testing languages help software ----------------------
engineers to write detailed test specification that describes test cases and
----------------------
logistics for its execution. Requirement-based testing tools isolate specific user
requirements and suggests test cases that will exercise requirements. Dynamic ----------------------
testing tools interact with an executing program, check path coverage and test
value of a variable and execution flow. ----------------------

----------------------
Check your Progress 2
----------------------
State True or False. ----------------------
1. Test cases are designed by software tester.
----------------------
2. Test cases are developed for the errors which occur during the
execution of program, path coverage. ----------------------

----------------------
Activity 2 ----------------------

For the documented errors in Activity 1, try to create the test case design ----------------------
which contains the way of correcting errors. View sample test case designs
----------------------
on the Web.

Software Testing Techniques 153


Notes 8.4 WHITE-BOX TESTING
---------------------- A white-box test is conducted to know the internal working of the
component or module in software. It tests whether all the internal operations are
---------------------- executed according to the specification. It tests all the components according to
their operations closely.
----------------------
A system composed of several modules interact with each other through
---------------------- a logical path. A logical path describes a flow of statements, functions in a
---------------------- module as well as between the modules. In white-box testing these logical paths
are tested.
---------------------- Control structures loops and conditions are tested and test cases are
---------------------- generated. These tests cases give guarantee that all the independent paths within
a module are exercised at least once and all logical decisions are exercised on
---------------------- their true and false side. All loops and data structures are executed to test their
boundaries and outputs.
----------------------
White-box testing methods are based on the internal structure of the code.
---------------------- A method based on statement coverage, branch coverage, path coverage and
data flow coverage is sometimes called structural testing or glass-box testing. It
----------------------
concentrates more on examination of the code rather than specification.
---------------------- 8.4.1 Basis Path Testing
---------------------- It enables a test case designer to derive a logical complexity measure of
a procedural design and this measure is used as a guideline for defining a basis
---------------------- set for execution path.
---------------------- A flow graph notations are used in basis path testing. A flow graph contains
the nodes which specify a statement or group of statements. A node can contain
---------------------- a conditional expression and may be used for branching and predictions. These
---------------------- nodes are connected by using edges or links. In graphical notation, these nodes
and edges bound an area in the flow graph. This area is called a region.
----------------------

---------------------- Region3

---------------------- Region2

---------------------- Region1

----------------------

----------------------

----------------------

----------------------

---------------------- Fig. 8.1: Flow graph and Regions


----------------------

154 Software Engineering with UML


In Figure 8.1, the start node is 0 and the end nodes are 7 and 8. The link Notes
between two nodes is called an edge. Each node indicates a set of statements
or a statement or a condition. The output of the nodes which contain conditions ----------------------
produces a Boolean value true or false. The basis set for the figure above are as
follows: ----------------------

Path 1:0-1-8 ----------------------


Path 2:0-1-2-3-6-7 ----------------------
Path 3:0-1-4-5-6-7
----------------------
Path 4: 0-1-4-5-6-7-1-8
----------------------
Path 5: 0-1-2-3-6-7-1-8
The number of paths in the basis set is determined by cyclomatic ----------------------
complexity. Cyclomatic complexity can be computed in three ways as follows: ----------------------
• Number of regions = 3
----------------------
• V(G) = 10 edges – 9 nodes + 2 =3
----------------------
• V(G) = 2 predicate nodes + 1 = 3
A cyclomatic complexity is a quantitative measure of logical complexity ----------------------
of the program. It gives upper bound for the number of tests to be conducted to ----------------------
ensure all the statements in the program are executed at least once.
8.4.2 Control Structure Testing ----------------------

A white-box testing tests the validity of the loops in the program. In a ----------------------
program there are different types of loops. These are nested loops, simple loops,
----------------------
concentrated loops and structured loops.
In simple loops, the evaluation can be done by using different stages ----------------------
like skipping the loop entirely, one pass and two passes through the loops and
----------------------
checking the upper and lower boundaries. In nested loops the testing starts from
the inner loop to outer loop. Concentrated loops are independent loops and ----------------------
testing is done like in simple loop or nested loop approach.
----------------------
Check your Progress 3 ----------------------

State True or False. ----------------------

1. Flow graph notations are used in control structure testing. ----------------------


2. Different types of loops are tested in control structure testing. ----------------------
3. Nodes and edges bound an area called region.
----------------------
4. White-box testing tests code segment of only one component.
----------------------

----------------------

----------------------

Software Testing Techniques 155


Notes
Activity 3
----------------------

---------------------- Consider the different functionalities of the software identified in Activity


1 and draw the flow graph for any one functionality. Identify possible paths
---------------------- for getting the output from it.
----------------------
8.5 BLACK-BOX TESTING
----------------------
Black-box testing focusses on the functional requirement and information
---------------------- domain of the software. So it is also called functional testing. It has a data-driven
approach. Code is ignored and it concentrates on specification. It complements
----------------------
the white-box testing by identifying different classes of errors. Usually it can
---------------------- be conducted after the white-box testing. A tester identifies the set of input
conditions and tests all the functional requirements.
----------------------
Black-box testing is used to identify the missing functions or incorrect
---------------------- functions within the software. The different modules in the software interact
through the interfaces. These are to be tested. The different errors in the data
---------------------- structure and database access are tested in black-box testing. The behaviour,
performance, initialisation and termination errors are detected in this type of
----------------------
testing. In this testing a program is treated as a black box. The input to the
---------------------- program and output from the program is verified as per the specification. It
is a complement to the white-box testing, which does not include the internal
---------------------- working of the modules in terms of coding and control structure errors. If the
output is not correct as per the specification, the control will be given to the
----------------------
white-box tester who is a programmer who knows about the code. There are
---------------------- two methods used in black-box testing - equivalence partitioning and boundary
value analysis.
----------------------
Equivalence Partitioning
---------------------- Equivalence partitioning divides input domain of the program into the
---------------------- classes. These classes are useful for deriving the test cases. An ideal test case
is derived which can uncover all types of errors related to a particular class. In
---------------------- this way the different ideal test cases are derived to uncover errors in different
classes.
----------------------
An equivalence class describes all valid and invalid states of input
---------------------- classes and exercises all the attributes of that class. Some guidelines are used
to define the input classes. For example, input condition specifies a range
---------------------- that equivalence classes are one for valid and two for invalid. If input range
---------------------- is 1-10, then equivalence classes are {1….10}, {x<1},{x>10}. If the input
condition specifies a specific value, say 29, then its equivalence classes are
---------------------- {29},{x<29},{x>29}. If the input condition specifies a member set or Boolean
value, then one valid and one invalid equivalence classes are formed.
----------------------

----------------------

156 Software Engineering with UML


Boundary Value Analysis Notes
Boundary value analysis is a test case design method that complements
----------------------
equivalence partitioning. It selects test cases for the edges of the classes as
boundary values. It derives the test cases from both input and output domain. ----------------------
For example, if an input condition specifies a range bounded by values a and b,
test cases should be designed with values a and b as well as values just above ----------------------
and just below a and b. If an input condition specifies a number of values, a test
----------------------
case should be developed that exercises the minimum and maximum numbers.
Values just above and just below the minimum and maximum are also tested. ----------------------

Check your Progress 4 ----------------------

----------------------
State True or False.
----------------------
1. Equivalence partitioning is used for dividing the input into classes.
2. In boundary value analysis, the values just below the maximum and ----------------------
minimum range value are analysed. ----------------------
3. A tester requires the knowledge of the code when performing black-
----------------------
box testing.
4. Black-box testing is called functional testing. ----------------------
5. Cyclomatic complexity measures the amount of decision logic in the ----------------------
program module.
----------------------

----------------------
Activity 4
----------------------
Consider the example in Activity 1 and perform the black-box testing.
----------------------
Design test cases for it.
----------------------
8.6 SOFTWARE TESTING STRATEGIES ----------------------
Software testing consists of a set of activities which are to be planned in advance ----------------------
and systematically. A template for software testing contains a set of steps into
which we can place test case design techniques and testing methods. ----------------------

There are different types of software testing strategies. Some of the characteristics ----------------------
are as follows:
----------------------
• To conduct effective testing, a software development team should conduct
formal technical reviews. As a result of this many errors are eliminated. ----------------------
• Testing begins from the component level to the system level. ----------------------
• Different testing techniques are appropriate at different points in time.
----------------------
• Testing can be done by a software developer and an independent test
group if the project is large. ----------------------

Software Testing Techniques 157


Notes • Testing and debugging are different activities. Debugging must be
accommodated in any testing strategy.
----------------------
• A testing strategy must provide guidance to the practitioner and set of
---------------------- milestones to the manager. So testing is done from the low-level code
segment to the high level which validates major system functions.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

----------------------

----------------------

----------------------
Fig. 8.2: Software Testing Strategies
----------------------
Strategic Issues
---------------------- Tom Gilb addressed some issues for successful software strategy implementation.
---------------------- • Specify product requirements in a quantifiable manner long before testing
commences.
----------------------
• State testing objectives explicitly
----------------------
• Understand the users of the software and develop a profile for each user
---------------------- category.

---------------------- • Develop a testing plan that emphasises “rapid cycle testing”.


• Build “robust” software that is designed to test itself.
----------------------
• Use effective formal technical reviews as a filter prior to testing.
----------------------
• Conduct formal technical reviews to assess the test strategy and test cases
---------------------- themselves.
• Develop a continuous improvement approach for the testing process.
----------------------
There are some strategies that can be used to test software. These are unit
---------------------- testing, integration testing, validation testing and system testing.
---------------------- 1. Unit Testing: A system is a collection of modules that is integrated
together to perform a system task to achieve users’ goal. When software
---------------------- is to be tested, it requires testing the units of the software independently

158 Software Engineering with UML


and then placing into the integration with the other modules. It is majorly Notes
used in white-box testing. It tests small units of code. It is performed by a
programmer who writes the code. The different tools used for this are test ----------------------
driver or harness, code coverage analyser, automatic test case generator.
It exercises internal paths and its aim is to exercise and examine every ----------------------
statement of code at least once. A major criterion for this is that it requires ----------------------
coverage of every path within the program.
----------------------
The disadvantage of unit testing (white box) is that the programmer who
writes the code, if he tests the code then he may be biased by his previous ----------------------
experiences and he is the only one who understands the code. It means
that he has created error while writing the code and is responsible for ----------------------
detecting it. Unit testing has the highest percentage of occurrence of
----------------------
errors.
A unit testing has algorithmic and logical approach to test the code and ----------------------
internal paths. It is used to test local and global data structures. The
----------------------
control structures and boundary conditions are tested. A unit test is
considered adjunct to coding step. This can be done when coding starts ----------------------
or after generating complete source code. In a software, components are
connected to each other. It means these are not stand- alone. So drivers ----------------------
and/or stub software must be developed for each unit test. A driver is
----------------------
nothing but the main program and stubs subordinate it. Stubs are called
dummy subprograms, which use subordinate module interface. ----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
Fig. 8.3: Driver and Stubs
----------------------
2. Integration Testing: In unit testing, the individual units called modules
are tested with its code and internal paths. After unit testing these units are ----------------------
integrated with the other units to make the system functioning. Integration
testing tests the communication between of two or more units. This test ----------------------
is performed by programmers and it focusses on interfaces between these ----------------------
integrated units.
----------------------
There are several issues in performing this testing. One of the issues
focusses on order of integration of these units. The order of integration ----------------------
should be decided. Another issue is regarding the correctness and
compatibility of the external components. ----------------------
Integration testing is necessary because one module can have effects ----------------------
on another module. When several units are combined together it may
function differently and produce wrong output. Interfacing errors are not ----------------------
detected in unit tests. In this case integration testing is useful.
Software Testing Techniques 159
Notes In this type of testing two approaches are used - top-down approach and
bottom-up approach. A supplementary approach that can be applied with
---------------------- these two approaches is called critical unit first.
---------------------- Figure 8.4 shows an approach to top-down integration testing and bottom-up
integration testing.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------
----------------------

---------------------- Fig. 8.4: Approach to Top-Down and Bottom-Up Integration Testing

---------------------- Top-down integration testing starts with high-level system at the top level
and integrates from top-down by replacing individual components by stubs.
---------------------- The main control module which integrates is called driver and the individual
components that are replaced are called stubs. Depth-first and breadth-first
---------------------- approach can be used to integrate these modules. The main control module
---------------------- called driver subordinates stubs. Depending on the approach, breadth-first or
depth-first stubs are replaced by modules at a time. Tests run on individual
---------------------- modules that are integrated. Once the tests are conducted the stubs are replaced
by individual modules. Top-down integration is used for verifying major
---------------------- decision points early in the test process. Top-down approach is not as complex
---------------------- as bottom-up approach.
I n bottom-up integration testing, low-level components are combined into
---------------------- clusters or builds. Driver which is a control program is written to coordinate
---------------------- these sub- functions input and output. These individual clusters are tested. At
last drivers are removed and clusters are combined moving upwards in the
---------------------- program structure, which is a hierarchical structure.
---------------------- 3. Validation Testing: The goal of validation testing is to make sure software
functions as per the requirement of the customer. The result of integration
---------------------- testing is validation testing. In integration testing, all the individual
modules are exercised and integrated with testing of interfaces which
----------------------
uncover and correct all the errors. If the result of the integration testing
---------------------- is as per the customer’s requirements, the software can be validated. It
involves regression testing, alpha testing and beta testing.
----------------------
Validation testing tests if the software meets all the requirements defined
---------------------- in the System Requirement Specification (SRS). So it is important to
have proper system requirement specification documentation. If it is not
160 Software Engineering with UML
available, regression testing is performed to determine the modifications Notes
required in the software. Regressing testing involves repeating existing
validation tests for light changes or modifications. ----------------------
It is important that the developer knows the users’ acceptance of the system. ----------------------
The developer should provide an outline of the software functions needed
to be focused by customers as to involve customers into the software ----------------------
testing process to get the formal acceptance from each user. Most of the
----------------------
software developers use a process to do this task, which include alpha and
beta testing to uncover errors that only the customers can see. Alpha tests ----------------------
are conducted at the developer’s site by end-users. At the developer’s
site the software is in controlled environment, that is, as per developer’s ----------------------
setting. The beta testing is conducted at the end-user’s site. In this case
----------------------
the developers are generally not present. So it is the user’s responsibility
to record errors and report to the developer at regular intervals. As per ----------------------
the errors reported by the customer, the developer does modifications or
changes and prepares the software for release at customer’s base. ----------------------
4. System Testing: In system testing complete software is exercised. It ----------------------
contains a series of tests. It verifies whether all the components of the
system are properly integrated and function properly. It is usually done ----------------------
by professional testers. Some of the tests conducted are recovery testing,
----------------------
security testing and stress testing.
In most of the software systems a recovery strategy is defined to protect ----------------------
the system from faults. The software system should be fault tolerant, it
----------------------
means that occurrences of fault should not affect the complete software
components and halt everything. Recovery testing is a system test that ----------------------
forces the software to fail in a variety of ways and verifies that recovery
is properly performed. ----------------------
Software system should protect its data and manage the sensitive ----------------------
information or actions that can harm the software. Security system verifies
the protection of the software. ----------------------

Stress testing tests the probability of the failure of the software during ----------------------
high load on its resources and program modules. It tests the manner in which the
system responds to the high load on its resources. It is conducted by demanding ----------------------
resources in abnormal quantity and volume. ----------------------
Performance testing is designed to test the run-time performance of
software within the context of an integrated system. It includes all the steps ----------------------
of testing process. These are often conducted with stress testing and on both ----------------------
hardware and software.
----------------------
The Art of Debugging
Testing and debugging are different processes. The detected errors are ----------------------
located and corrected in the debugging process. The debugging process starts
----------------------
with the output of the testing result. These errors are located and a repairing
plan is prepared. The repairing plan helps in correcting these errors and the ----------------------

Software Testing Techniques 161


Notes software is re-tested. It helps in test case creation. Locating and repairing the
errors are difficult. The following figure shows the debugging process.
---------------------- Test case result

----------------------
Debugging process
----------------------
Locating Error
----------------------
Error Correction
----------------------
Regression Testing
----------------------

---------------------- Test case creation

---------------------- Fig. 8.5: Flow of Debugging Process

---------------------- Check your Progress 5


----------------------
State True or False.
----------------------
1. Alpha and beta testing are performed in system testing.
----------------------
2. Alpha testing is performed at the customer’s end.
---------------------- 3. Unit test tests the path between the modules.
---------------------- 4. Testing and debugging are the same process.

---------------------- 5. In validation testing, the SRS documentation is compared with the
system functions.
----------------------

---------------------- Activity 5
----------------------
Consider to develop a software for automatic tea/coffee vending machine.
---------------------- Identify its various components and draw the hierarchical structure for its
components and document its unit testing, integration testing and system
---------------------- testing process.
----------------------

---------------------- Summary
---------------------- • The main objective of software testing is to detect errors. A software
testing process contains a series of tests. These are unit testing, integration
---------------------- testing, validation testing and system testing.
---------------------- • Unit and integration tests verify the functional components and their
integration into the software system. Validation testing validates the
---------------------- system requirement documentation to the actual results of the software.
---------------------- These tests help software developer to develop test cases.

162 Software Engineering with UML


• Two techniques are used for test case design; one is white-box testing and Notes
another is black-box testing.
----------------------
• White box focusses on basis path (flow graph notation) and the control
structures used in the program. In black-box testing, equivalence ----------------------
partitioning and boundary value analysis are conducted. These are used
to check the set of input classes to the software. ----------------------

----------------------
Keywords
----------------------
• Testing strategies: An outline that describes the testing approach of the
software development cycle and is created to inform project managers, ----------------------
testers, and developers about some key issues of the testing process.
----------------------
• Unit test: A software testing method by which individual units of source
code, sets of one or more computer program modules together with ----------------------
associated control data, usage procedures and operating procedures are ----------------------
tested to determine if they are fit for use.
• Integration test: The phase in software testing in which individual ----------------------
software modules are combined and tested as a group. ----------------------
• System test: Testing conducted on a complete, integrated system to
----------------------
evaluate the system’s compliance with its specified requirements.
• White-box testing: A method of testing software that tests internal ----------------------
structures or workings of an application, as opposed to its functionality.
----------------------
• Black-box testing: A method of software testing that examines the
functionality of an application without peering into its internal structures ----------------------
or workings.
----------------------

Self-Assessment Questions ----------------------

----------------------
1. What is software testing? Explain the strategy used for software testing.
2. Explain unit testing, integration testing and system testing. ----------------------
3. Explain the debugging process. Also explain how it differs from testing. ----------------------

Answers to Check your Progress ----------------------

----------------------
Check your Progress 1
State True or False. ----------------------
1. True ----------------------
2. True ----------------------
3. True
----------------------
4. True
----------------------

Software Testing Techniques 163


Notes Check your Progress 2
State True or False.
----------------------
1. False
----------------------
2. True
---------------------- Check your Progress 3
---------------------- State True or False.

---------------------- 1. False
2. True
----------------------
3. True
----------------------
4. False
---------------------- Check your Progress 4
---------------------- State True or False.
---------------------- 1. True
2. False
----------------------
3. False
----------------------
4. True
---------------------- 5. True
---------------------- Check your Progress 5
---------------------- State True or False.
1. True
----------------------
2. True
----------------------
3. False
---------------------- 4. False
---------------------- 5. True
----------------------
Suggested Reading
----------------------
1. Pressman, Roger and Bruce Maxim. Software Engineering: A
---------------------- Practitioner’s Approach. McGraw-Hill.
---------------------- 2. Shooman, M.L. Software Testing. New York: McGraw-Hill.
----------------------

----------------------

----------------------

----------------------

164 Software Engineering with UML


Software Configuration Management
UNIT

9
Structure:

9.1 Introduction
9.2 Software Configuration Management: Concept
9.3 Elements of Configuration Management System
9.4 The SCM Repository
9.5 SCM Process and Tasks
Summary
Key Words
Self-Assessment Questions
Answers to Check your Progress
Suggested Reading

Software Configuration Management 165


Notes
Objectives
----------------------
After going through this unit, you will be able to:
----------------------
• Describe the concept of software configuration management
----------------------
• Discuss the elements of SCM
---------------------- • Explain the concept of SCM repository and SCM process
---------------------- 9.1 INTRODUCTION
----------------------
A software development process includes different phases, so change
---------------------- can occur any time during these phases. Software Configuration Management
(SCM) is an umbrella activity which is similar to software project management
---------------------- and software quality assurance. It can be applied throughout the software
development process. SCM is an essential part of project management and
----------------------
software engineering practices. It includes different activities, such as:
---------------------- • Identifying change
---------------------- • Controlling change

---------------------- • Ensuring proper implementation of change.


• Reporting changes
----------------------

---------------------- 9.2 SOFTWARE CONFIGURATION MANAGEMENT: CONCEPT


---------------------- A formal definition of software configuration management is as follows:

---------------------- “Software configuration management is a set of engineering procedures


for tracking and documenting the software throughout its life cycle, to ensure
---------------------- that all changes are recorded and current state of the software is known and
reproducible.”
----------------------
Software configuration management is different from software
---------------------- maintenance. Software maintenance is a collection of software engineering
activities that occur after delivering the software to customer and when the
----------------------
software is operational. SCM tracks and controls the activities like identifying
---------------------- change, controlling change, ensuring proper implementation and reporting
changes from beginning to the end of software project.
----------------------
The goal of SCM is to maximise productivity by minimising mistakes
---------------------- caused by confusion when coordinating software development. SCM identifies,
organises and controls modification to software build by a software development
---------------------- team.
---------------------- A view of SCM from the point of view of different roles within an
organisation is as follows:
----------------------
• Project manager: An auditing system.
---------------------- • SCM manager: A controlling, tracking and policy making mechanism.

166 Software Engineering with UML


• Software engineer: Changing, building and access control mechanism. Notes
• Customer: Quality assurance and product identification mechanism.
----------------------
A software process produces information which comprises computer
programs (source code and executable files), documentation that describes ----------------------
computer programs and data. These items are collectively called software
----------------------
configuration process.
During the software development phases, the major task is to control the ----------------------
change during the various phases of software development life cycle. Some of
----------------------
the reasons to do the software changes are:
• Errors detected in software need to be collected. ----------------------

• New business or market conditions making it necessary to do changes in ----------------------


product requirement and business rules.
----------------------
• Customers can demand modifications in the information system and
functionality of a product. ----------------------
• Customers can also demand for changes in services delivered by a ----------------------
computer- based system.
----------------------
• In certain conditions, organisation may require to reorganise the system
as well as the changes caused by growing or downsizing the project ----------------------
priorities or software engineering team structure.
----------------------
• Budgetary or scheduling constraints management is a set of activities
that has been developed to manage changes throughout the software ----------------------
development life cycle.
----------------------
SCM can be viewed as a software quality assurance activity that is
applied throughout the software development process. So without SCM we can ----------------------
face problems like simultaneous update of data, i.e., multiple users are trying
to update the information, redundancy in maintenance, redundancy in code or ----------------------
common code and no control over software versions. ----------------------

Check your Progress 1 ----------------------

----------------------
State True or False.
----------------------
1. Software configuration management is also referred to as change
management. ----------------------
2. An SCM activity starts at the beginning of a project and ends at the ----------------------
end of the project.
3. The outcome of software process is the information that contains ----------------------
computer programs, documents and data. ----------------------
4. SCM is similar to the software maintenance phase in the software
development life cycle. ----------------------

----------------------

Software Configuration Management 167


Notes Match the following.
---------------------- i. Project manager a. A controlling, tracking, and policy making
mechanism
---------------------- ii. SCM manager b. Changing, building and access control
mechanism
----------------------
iii. Software engineer c. Quality assurance and product identification
---------------------- mechanism
iv. Customer d. An auditing system
----------------------

----------------------
Activity 1
----------------------

---------------------- Try to find out the various roles and tasks allocated to a software development
team for development of software.
----------------------
---------------------- 9.3 ELEMENTS OF CONFIGURATION MANAGEMENT SYSTEM
----------------------
A configuration management system has the following elements:
---------------------- 1. Configuration elements: These are a set of tools coupled with a file
---------------------- management or database management system that enables access to and
management of each Software Configuration Item (SCI).
---------------------- 2. Process elements: These are collection of procedures and tasks that
---------------------- define an effective approach to change management for all stakeholders
of that process.
---------------------- 3. Construction elements: These are the elements required to construct the
---------------------- software. It is a set of tools that automate the construction of software by
ensuring that proper set of valid components (i.e., the correct version) is
---------------------- assembled.
---------------------- 4. Human elements: Software team uses a set of tools and process features
to implement software configuration management system effectively.
----------------------
Baselines
---------------------- There are several reasons to make changes during the software development
process. Some of changes are due to changing customer requirements, software
----------------------
development team wants to change their technical approach, and managers
---------------------- want to change or modify the project development approach. So the concept of
baseline is used to control these changes.
----------------------
As per the definition of IEEE, a baseline is defined as “a specification or
---------------------- product that has been formally reviewed and agreed upon that thereafter serves
as the basis for further development and that can be changed only through
---------------------- formal change control procedure.”
----------------------

168 Software Engineering with UML


In a software development process, a baseline is the outcome of each Notes
phase which can be serves as a basis for further phases. A software development
process, for example, contains requirement analysis which has a basis of system ----------------------
specification and the outcome is software requirement specification which can
be used as a basis for the software design phase. The outcome of the software ----------------------
is data specification which is a basis of the coding phase. The outcome of ----------------------
coding phase is source code file which can be a basis for the testing phase. The
outcome of testing phase is operational system which can be used as a basis for ----------------------
implementation or product release. So during each of these phases a baseline is
used which is formerly agreed upon by the software development team. ----------------------

So a baseline is a specification that can be considered as a basis for further ----------------------


development and that can be changed after formal change procedures. It is a
----------------------
milestone in the development of software and is marked by delivery of one or
more Computer Software Configuration Items (CSCI) that have been approved ----------------------
as a consequence of a formal technical review. So a CSCI is a work product (as
listed in MIL-STD-498), a test suit or a software component. ----------------------
Version ----------------------
Versions are created after an item in SCI is baselined and freezed. The
----------------------
term freezing means changes in that item can be done only after creating a
new version. So a version control system ensures the versioning of a software ----------------------
system in a given time. A version control automation system can be developed
to do the functionalities of the versioning like labelling the product, developing ----------------------
the hierarchical structure for the system, creating versions and documentation.
----------------------

Check your Progress 2 ----------------------

----------------------
Fill in the blanks.
----------------------
1. ___________________ elements are a collection of procedures and
tasks that define an effective approach to change management for all ----------------------
stakeholders of that process.
----------------------
2. _________________ elements are required to construct the software.
3. _______________ elements are coupled with a file management or ----------------------
database management system.
----------------------
4. The changes made after freezing the baseline for software creates
new __________. ----------------------

----------------------

Activity 2 ----------------------

----------------------
Consider a library automation system. Identify the different phases of
software development life cycle and the different baselines for these phases. ----------------------

----------------------

Software Configuration Management 169


Notes 9.4 THE SCM REPOSITORY
---------------------- A paper-based repository (e.g., file cabinet) has several issues. Some of
the issues are listed below:
----------------------
• Finding SCIs in less time is difficult.
---------------------- • No control over changes in items.
---------------------- • Creating or constructing new versions is time-consuming
---------------------- • Determining the relationships between configuration items is difficult.
So today’s automated SCM repository has solutions to the problems
----------------------
related to paper-based repository. An automated SCM repository is a set of
---------------------- mechanisms and data structures that allow a software team to manage change
in an effective manner. It works as a medium for accumulation and storage of
---------------------- software engineering information. There are several tools which are integrated
with the repository to interact with it.
----------------------
An SCM repository has different functions as follows:
----------------------
• Data integrity
---------------------- • Information sharing
---------------------- • Tool integration
---------------------- • Data integration
• Methodology enforcement
----------------------
• Document standardisation
----------------------
Data integrity validates the entries within databases, ensures consistency
---------------------- and cascading of modification within database. Information sharing functionality
shares the information among developers and tools, manages and controls the
---------------------- multiuser access. The tool integration function within an SCM repository is used
---------------------- to establish a data model that can be accessed by many software engineering
tools and it also helps to control access to the data within the system. The data
---------------------- integration functionality allows various SCM tasks to be performed on one or
more CSCIs. Methodology enforcement defines an ER model for the repository
---------------------- that implies a specific process model for software engineering. And finally a
---------------------- standard approach is used to create the software engineering documents.
To work with the above functionalities, different tools are to be integrated
----------------------
with the SCM repository. Some of them are as follows:
---------------------- • Versioning
---------------------- • Dependency tracking

---------------------- • Change management


• Requirement tracing
----------------------
• Configuration management
----------------------
• Audit trails

170 Software Engineering with UML


Versioning tools are used to save and retrieve all repository objects based on Notes
their version numbers. Dependency tracking and change management tools are
used to track and respond to the changes in an object state and relationships of all ----------------------
objects in the repository. Requirement tracing can be done in two ways. One is
forward tracing, which is used to track the design and construction components ----------------------
and deliverables that result from a specific requirement specification. The second ----------------------
is backward requirement tracking which is used to identify which requirement
generated any given work product. ----------------------
A configuration management tool is used to track a series of configurations ----------------------
representing specific project milestones or production release. Audit trail tools
are used to establish information about when, why and by whom changes are ----------------------
made in the repository.
----------------------
Check your Progress 3 ----------------------

----------------------
Fill in the blanks.
1. ___________ and _____________ tools are used to track and respond ----------------------
to the changes in an object state and relationships of all objects in the ----------------------
repository.
2. _____________________ tools are used to establish information ----------------------
about when, why and by whom changes are made in the repository. ----------------------
3. The ____________ function validates the entries within databases,
----------------------
ensures consistency and cascading of modification within database.
4. The ______________ function within an SCM repository is used ----------------------
to establish a data model that can be accessed by many software
----------------------
engineering tools.
----------------------

Activity 3 ----------------------

----------------------
Consider the example of Activity 2. Construct a conceptual SCM repository.
----------------------

9.5 SCM PROCESS AND TASKS ----------------------

Some of the objectives of software configuration management process are: ----------------------

• Identification (tracking multiple versions to enable efficient changes) ----------------------


• Change control (authority to approve and prioritise changes) ----------------------
• Version control (control changes before and after release to customer)
----------------------
• Configuration auditing (ensuring changes are made properly)
----------------------
• Reporting (telling others about changes made)
----------------------

Software Configuration Management 171


Notes To discuss the SCM process, the following questions can be raised:
• How does a software development team identify the elements of a
----------------------
software configuration?
---------------------- • How do organisations manage the versions of an existing program (and its
documentation) in a manner that will enable changes to be accommodated
----------------------
effectively?
---------------------- • How does an organisation control these changes before and after the
software is released to the customer?
----------------------
• Who has the repository for approving and ranking changes?
----------------------
• How can we ensure that changes have been made properly?
---------------------- • What mechanism is used to apprise others of changes that are made?
---------------------- As per discussion in the SCM process, the SCM tasks are as follows:
---------------------- 1. Identification

---------------------- • Identification task names each SCI separately and organises it into
SCM repository using object-oriented approach.
---------------------- • It identifies each object with its name, description and behaviour.
---------------------- The name of an object is unique and unambiguous to all other
objects. Description contains the software configuration item type,
---------------------- an identifier, change and version information.

---------------------- • List of resources needed by object.


• The object realisation in terms of the document, file and the model.
----------------------
2. Change control
----------------------
• It is an activity that ensures quality and consistency during the
---------------------- changes that are made during the software development process.

---------------------- • If there are changes to be done, a request is sent to the configuration
control authority, which is called the Change Control Board (CCB).
---------------------- • Engineering Change Order (ECO) is generated for each change.
---------------------- • New modified objects are added to the repository and old objects
are removed.
----------------------
• The new objects are tested for appropriate SQA standards.
----------------------
• Parallel changes are to be controlled to synchronise and avoid
---------------------- overwriting.

---------------------- 3. Version control


• Management of different versions of configuration objects created
---------------------- during the software development process.
---------------------- • It can have the following capabilities:
---------------------- n Project repository: It stores all the configuration objects.

172 Software Engineering with UML


n Version management: It stores all versions of object. Notes
n Make facility: Construct a specific software version.
----------------------
n Issue tracking capability: It enables to track status of
outstanding issues of each object. ----------------------
n System modeling approach: Templates, component ----------------------
hierarchy, construction rules and verification rules.
----------------------
4. Configuration auditing
• Verification of formal technical review conducted for evaluating ----------------------
technical correctness of the system. ----------------------
• It verifies whether the software process and software engineering
standards were applied properly or not. ----------------------

• It verifies the reflection of changes within the attributes of object. ----------------------


• Verification of SCM standards for recording and reporting the ----------------------
changes.
----------------------
• Verification of all related SCIs updation.
5. Configuration Status Reporting (CSR) ----------------------

• It is nothing but the accounting of configuration status. ----------------------


• It reports to the personnel regarding change of information. ----------------------
• It also answers the questions related to what happened, when, who
----------------------
did and the effects.
• A CSR can be placed in the database which can be accessible to the ----------------------
software development team members as well as the service team.
----------------------

Check your Progress 4 ----------------------

----------------------
Fill in the blanks.
----------------------
1. Tracking multiple versions to enable efficient changes is called
__________________. ----------------------
2. 
Control changes before and after release to customer is called
----------------------
____________________.
3. _____________ ensures changes are made properly. ----------------------
4. 
_____________________ is an activity that ensures quality and ----------------------
consistency of the changes that are made during the software
development process. ----------------------

5. _______________ is generated for each change. ----------------------


6. ______________ is nothing but the accounting of configuration ----------------------
status.
----------------------

Software Configuration Management 173


Notes Summary
---------------------- • Software Configuration Management (SCM) is an umbrella activity which
is similar to software project management and software quality assurance.
----------------------
It can be applied throughout the software development process.
---------------------- • The goal of SCM is to maximise productivity by minimising mistakes
---------------------- caused by confusion when coordinating software development. SCM
identifies, organises and controls modification to software build by a
---------------------- software development team.

---------------------- • There are four elements of software configuration management. These


are configuration elements, process elements, construction and human
---------------------- elements.

---------------------- • A baseline is a specification that can be considered as a basis for further


development and can be changed after formal change procedures.
----------------------
• The term freezing means changes in an item can be done only after
---------------------- creating a new version.
• An automated SCM repository is a set of mechanisms and data structures
----------------------
that allows a software team to manage change in an effective manner.
---------------------- • An SCM repository has data integrity, information sharing, tool
integration, data integration, methodology enforcement functions.
----------------------
• To work with SCM functionalities, an SCM have versioning, dependency
---------------------- tracking, change management, requirement tracing, configuration
---------------------- management and audit trails tools.
• Some of the objectives of software configuration management process
---------------------- are: identification change control version control configuration auditing
---------------------- reporting.

---------------------- Keywords
----------------------
• Software configuration management:  Task of tracking and controlling
---------------------- changes in the software.
• Configuration items:  The term configuration item or CI refers to the
----------------------
fundamental structural unit of a configuration management system.
---------------------- Examples of CIs include individual requirements documents, software,
models, and plans.
----------------------
• Software quality assurance: Monitoring the software engineering
---------------------- processes and methods used to ensure quality. 

----------------------
Self-Assessment Questions
----------------------
1. What is software configuration management? Explain the different
---------------------- functionalities of software configuration management.

174 Software Engineering with UML


2. What is an SCM repository? Explain the different functions and tools of Notes
SCM repository.
----------------------
Answers to Check your Progress ----------------------
Check your Progress 1 ----------------------
State True or False.
----------------------
1. True
----------------------
2. True
3. True ----------------------
4. False ----------------------
Match the following. ----------------------
i. – d.
----------------------
ii. – a.
----------------------
iii. – b.
iv. – c. ----------------------
Check your Progress 2 ----------------------
Fill in the blanks. ----------------------
1. 
Process elements are a collection of procedures and tasks that define an
----------------------
effective approach to change management for all stakeholders of that
process. ----------------------
2. Construction elements are required to construct the software.
----------------------
3. 
Configuration elements are coupled with a file management or database
management system ----------------------
4. The changes made after freezing the baseline for software creates new ----------------------
baseline.
----------------------
Check your Progress 3
Fill in the blanks. ----------------------

1. 
Dependency tracking and change management tools are used to track and ----------------------
respond to the changes in an object state and relationships of all objects
----------------------
in the repository.
2. 
Audit trail tools are used to establish information about when, why and by ----------------------
whom changes are made in the repository.
----------------------
3. The data integrity function validates the entries within databases, ensures
consistency and cascading of modification within database. ----------------------
4. The tool integration function within an SCM repository is used to establish ----------------------
a data model that can be accessed by many software engineering tools.
----------------------

Software Configuration Management 175


Notes Check your Progress 4
Fill in the blanks.
----------------------
1. Tracking multiple versions to enable efficient changes is called
---------------------- identification.
---------------------- 2. Control changes before and after release to customer is called version
control.
----------------------
3. Change control ensures changes are made properly.
---------------------- 4. 
Configuration auditing is an activity that ensures quality and consistency
---------------------- of the changes that are made during the software development process.
5. Engineering change order (ECO) is generated for each change.
----------------------
6. Configuration status reporting is nothing but the accounting of
---------------------- configuration status.
----------------------
Suggested Reading
----------------------
1. Mette, Anne and Jonassen Hass. Configuration Management Principles
---------------------- and Practice. Addison-Wesley.
---------------------- 2. Pressman, Roger and Bruce Maxim. Software Engineering: A
Practitioner’s Approach. McGraw-Hill.
----------------------
3. Sommerville, Ian. Software Engineering. Addison-Wesley.
----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

----------------------

176 Software Engineering with UML

You might also like