Introduction To Software Engineering: Neeraj Publications

You might also like

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

www.neerajbooks.

com

INTRODUCTION TO
SOFTWARE ENGINEERING

DEVELOPMENT OF SRS

Characteristics of SRS
1

Neeraj
In this chapter, we will discuss the following
Software Requirement Specification (SRS) is a characteristics:
requirement specification for the software that forms Completeness
the basis for the development of a software product, Unambiguity
program or set of programs that perform the desired Inconsistency

Publications
functions. Depending on the writer of the SRS, various COMPLETENESS
purposes could be served. It could be used by the The SRS is complete if, and only if, it has the
following: following properties:
Customer and users for understanding what is 1. Description of all significant requirements
relating to functionality, performance, design,

www.neerajbooks.com
expected from them.
Developer for writing the desired software attributes or external interfaces.
product that is to be built. 2. Definition of the response of the software
Testers for performing testing activities. system for all the situations.
Managers for estimating and planning the 3. All the diagrams, tables and figures should be
project to be delivered. fully labelled and referenced.
Maintenance team for maintain the software 4. All the abbreviations should be defined
in future. properly.
SRS minimizes the time consumed by developers This is most difficult to achieve as it is difficult to
in developing as it becomes an ease in understanding specify all the system requirements at the beginning.
the software project which in turn leads to less Missing requirements are difficult to trap since they are
development cost. A good SRS will define all the not visible.
software requirements correctly. No design and UNAMBIGUITY
implementation details should be present in a SRS. The SRS is said to be unambiguous if every stated
SRS should only define ‘WHAT’ a system does requirement has only one interpretation independent of
and not ‘HOW’ it is done. the person or the time when the interpretation is done.
The SRS needs to be unambiguous for all the users who
will create and use the document that is to the authors,
CHARACTERISTICS OF SRS the users, the reviewers as well as developers and testers.
The SRS should be correct, unambiguous, A sentence in the SRS is said to be ambiguous if given
complete, consistent, ranked for importance and/or to few people and asked for the interpretation and there
stability, verifiable, modifiable and traceable. is more than one interpretation. In cases, if a term that is

www.neerajbooks.com
www.neerajbooks.com

to be used for particular context has multiple meanings, (a) One requirement states that two numbers
the term should be included in the glossary where all should be added while the other says that they
the meanings should be specified. should be multiplied.
Some of the issues related to ambiguity are as (b) One requirement says that “A” should always
follows: follow “B” whereas the other says that “A and
1. Requirements are often written in natural B” occur simultaneously.
language. Natural language being imprecise (c) In time sheet one requirement says that the
and ambiguous in nature, so any SRS written work must be done by the end of the week
in natural language should be reviewed by an (Sunday) whereas in other, it states that the
independent party to identify the ambiguity in work should be done by the last working day
SRS and correct the language. of the week (Friday).
2. Ambiguity can be avoided by writing the SRS 3. The requirements describing same real world
in a particular requirement specification entity may have different terminologies. For example,
language, which has a processor that a program’s request for a user input may be called a
automatically detects any lexical, syntactic and “prompt” in one requirement or “cue” in another. In
semantic errors. However, there is a one requirement start of week may be used as Monday
disadvantage associated with it. It takes a lot whereas in another it may be used as Sunday.
of time to learn such language and sometimes The use of standard terminology and definitions

Neeraj
it is not even understood by the users or promotes consistency.
customers. IEEE SRS
3. The requirements could also be depicted using The Institute of Electrical and Electronics Engineers
diagrams, tables or flow charts. These (IEEE) has published the guidelines and standards to
techniques improve the precision of the
organize an SRS document. The SRS should be selected

Publications
requirements, but it is a bit difficult to convert
or defined at the beginning of all the activities. Different
the requirements.
projects require differently organized requirements thus,
INCONSISTENCY
the SRS should be selected accordingly.
The SRS should not be inconsistence. The SRS is
The general organization of an SRS is as follows:

www.neerajbooks.com
consistence if, and only if, no requirements described
in it conflicts. Any conflict between the described 1. Introduction
requirements should be identified and resolved. There 1.1 Purpose
are three types of conflicts that are likely to be seen 1.2 Scope
between the requirements. They are as follows: 1.3 Definitions, Acronyms and Abbreviations
1. Characteristics of real world objects interacting 1.4 References
with the system may conflict. For example: 1.5 Overview
(a) Format of an output report can be described 2. The Overall Description
in tabular form in one requirement whereas in 2.1 Product Perspective
other it can be stated in textual form. 2.1.1 System Interfaces
(b) One requirement may state that all lights are 2.1.2 Interfaces
red whereas other states that the colour of all 2.1.3 Hardware Interfaces
lights is blue. 2.1.4 Software Interfaces
(c) In a time sheet system one requirement states 2.1.5 Communication Interfaces
that a worker cannot work more than 16 hours 2.1.6 Memory Constraints
a day whereas in other requirement it may 2.1.7 Operations
assume that a worker can work for 24 hours a 2.1.8 Site Adaption Requirements
day. 2.2 Product Functions
2. Two specific items can have logical or 2.3 User Characteristics
temporal conflict between them. For example: 2.4 Constraints

www.neerajbooks.com
www.neerajbooks.com

2.5 Assumptions and Dependencies References: This sub-section will:


2.6 Apportioning of Requirements (i) Provide a complete list of all documents that
3. Specific Requirements are referenced in the SRS.
3.1 External Interfaces (ii) Identify the document by title, report number,
3.2 Functions date and publishing organization.
3.3 Performance Requirements (iii) Sources from which the references are obtained
3.4 Logical Database Requirements should be specified.
3.5 Design Constraints Overview: This sub-section will include:
3.5.1 Standards Compliance (i) Description of the rest of the SRS.
3.6 Software System Attributes (ii) Explanation of how SRS is organized.
3.6.1 Reliability The Overall Description: The factors that affect
3.6.2 Availability the product and its requirements are being described
3.6.3 Security here. This section does not state specific requirements
3.6.4 Maintainability instead it makes easier to understand the requirements
3.6.5 Portability that are stated later as it provides background for those
requirements.
3.7 Organizing the Specific Requirements Product Perspective: Product is being put into
3.7.1 System Mode perspective with other related products. Independent and

Neeraj
3.7.2 User Class self-contained product should be stated here. If the
3.7.3 Objects product defined in the SRS is a component of a larger
3.7.4 Feature system, then this sub-section relates the requirements
3.7.5 Stimulus of the larger system to functionality of the software
3.7.6 Response interfaces between the system and the software is being

Publications
3.7.7 Functional Hierarchy identified.
4. Change Management Process System Interfaces: All system interfaces are listed
5. Document Approvals and the functionality of the software to accomplish the
6. Supporting Information system requirement and the interface description to
match the system is being identified.

www.neerajbooks.com
Now we will study the explanation of the above
SRS format. Interfaces: In this sub-section, we will specify:
Introduction: The sub-sections of this topic will (i) The logical characteristics of each interface
provide an overview of the entire SRS. between the software product and its users.
Purpose: In this sub-section identify the purpose (ii) All the aspects of optimizing the interface with
of the SRS and specify its intended audience. the person who must use the system.
Scope: In this sub-section we will: Hardware Interfaces: The logical characteristics
(i) Identify the names of the software product to of each interface between the product and the hardware
be produced. component of the system are specified. Configuration
(ii) Tell about what and what not a software characteristic is also included. It also tells about what
product will do. and how devices are to be supported and protocols.
(iii) Application of the software being specified is Software Interfaces: The required software
being described along with the relevant products and interfaces with other application system
benefits, objectives and goals. are specified. The required software product includes
(iv) Be consistent with similar statements in higher- the following:
level specifications, if they exist. (i) Name
Definitions, Acronyms and Abbreviations: This (ii) Mnemonic
section provides the definitions of all the terms, (iii) Specification number
acronyms and abbreviations that are required to (iv) Version number
understand the SRS. This information may be provided (v) Source
by referring the document or an Appendix. Each interface provides:

www.neerajbooks.com
www.neerajbooks.com

(i) The software relating to the software product handshake protocols ( for example, XON-XOFF, ACK-
is being discussed. NACK), reliability requirements, criticality of the
(ii) The interface in terms of message content and application and safety and security considerations.
format is defined. Assumptions and Dependencies: All the
Communications Interfaces: This sub-section requirements that are affected in the SRS are listed.
specifies the various interfaces to communications. These factors are the changes to the design constraints
Memory Constraints: The applicable character- that can affect the requirements in the SRS. For example,
istics and limits on primary and secondary memory are an assumption might be that a specific operating system
specified. would be available on the hardware designated for the
Operations: In this sub-section, we will specify software product but instead it is not present, so the
the normal and special operations that are required by SRS has to change accordingly.
the user. Some of them are: Apportioning of Requirements: The requirements
(i) Modes of operation in user organization. that may be delayed until the future versions of the
(ii) Periods of interactive and unattended system are identified.
operations. Specific Requirements: This section contains all
(iii) Data processing support functions. the detailed information of the software requirements
(iv) Backup and recovery operations. required by the designers to design the system, for tester
Site Adaptation Requirements: In this sub-section: to test the system for those software requirements.

Neeraj
(i) The requirements specific to a given site, Throughout the section the requirements stated are
mission, or operational mode for any data or perceived by the user, operators or both. These should
initialization sequences is defined. include at least a small description of every input, output
(ii) The site that should be modified to adapt the and functions performed by the system.
software for particular installation is specified. The following principles apply:

Publications
Product Functions: In this section, we will provide (i) Requirements should be stated in accordance
the major functionality that the software will perform. with the characteristics of a good SRS, that is
Sometimes the function summary is taken from the it should be, correct, unambiguous, complete,
section of higher level specification that allocates the consistent, ranked for importance and/or

www.neerajbooks.com
functions to a software product. stability, verifiable, modifiable and traceable.
For clarity: (ii) Requirements should be cross-referenced to
(i) The functions should be organized in such a earlier requirements that relate.
way that they are understandable and readable (iii) For maximum readability of the SRS the
by the customer or anyone who is reading the requirements should be organized carefully.
information for the first time. External Interfaces: This sub-section contains all
(ii) Different functions and their relationships the information of all inputs and outputs of the system.
could be shown using textual or graphical It contains both content and format as follows:
methods. Name of item
User Characteristics: It describes the Description of purpose
characteristics of the intended users of the product that Source of input or destination of output
is the educational level, experience and technical Valid range, accuracy and/or tolerance
expertise. It also tells about why a specific requirement Units of measure
is discussed later in the SRS. Timing
Constraints: Provide a general description of those Relationships to other inputs/outputs
items that could limit the options for developers. They Screen formats/organization
can include regulatory policies, hardware limitations (for Window formats/organization
example, signal timing requirements), interface to other Data formats
applications, parallel operation, audit functions, control Command formats
functions, higher-order language requirements, signal End messages.

www.neerajbooks.com
www.neerajbooks.com

Functions: In this sub-section, we will describe Efficiency- amount of code and resources
the fundamental actions that need to be taken for required to perform function.
processing the inputs and generating the outputs and Testability- effort needed to test the product.
are listed as “shall” statements like “the system shall….” Usability- effort required to learn, operate the
These include validity checks on inputs, exact system.
sequence of operations, response to abnormal situation Reliability: Specify the extent to which program
(including overflow, communication facilities, error performs with required precision.
handling and recovery), effect of parameters, Availability: Specify the factors that tell that the
relationship of outputs to inputs (including input/output specific level is available for the system such as
sequence, formulas to input to output conversion). checkpoints, recovery and restart.
It is appropriate to partition it into sub-functions. Security: It specifies the factors that will protect
Performance Requirements: This sub-section the software from destruction or abnormal access.
will tell about the static and dynamic numerical Maintainability: This will specify the effort
requirements placed on the software or on human required to locate and fix an error during operation.
interaction. Static numerical requirements may include: Portability: This will specify the effort needed to
(i) The number of terminals that are supported. transfer the hardware or software from one environment
(ii) The number of simultaneous user. to another. This may include percentage of components
(iii) Amount and type of information to be handled. with host-independent code, use of a particular operating

Neeraj
Dynamic numerical requirements may include the system, use of a particular compiler or language subset,
number of transactions and tasks and the amount of etc.
data to be processed within certain time periods under Organizing the Specific Requirements: The
all conditions. requirements should be organized in a manner that is
Logical Database Requirements: This sub- optimal for understanding the detailed requirements.

Publications
section will describe the logical requirements for the There is no optimal organization for all systems.
information that is to be placed in the database. This Different systems have different organizations some of
may include, types of information used by various which are described below:
functions, frequency of use, accessing capabilities, data System Mode: System behaves differently
entities and their relationships, integrity constraints and depending on the mode of operation that is dependent

www.neerajbooks.com
data retention requirements.
Design Constraints: All the imposed design
constraints are specified in this sub-section.
or independent.
User Class: Different functions are provided to
different classes of users.
Standard Compliance: The requirements that are Objects: Objects are real world entities that exist
derived from existing standards or regulations are in the system. Objects are associated with set of attributes
specified which may include, report format, data and functions. Number of objects that share the same
naming, accounting procedures, audit tracing. set of attributes and function can be grouped together
For example, the requirements for software to and called as class.
processing activities could be specified. Feature: Feature is generally described as a
For example, in an audit trace requirement it is sequence of stimulus-response pair and is externally
stated that all the changes in the payroll should be desired service by the system.
recorded in the database with before and after values. Stimulus: Specify functions in terms of stimuli.
Software System Attributes: There are number Response: Systems are organized by describing
of quality attributes that can serve as a requirement for their function in terms of response.
the software whose achievements could be verified. Functional Hierarchy: The overall functionality
Some of the quality attributes with their definitions are of the system can be organized in a hierarchy of functions
as follows: by their common inputs or outputs.
Correctness- extent to which program fulfills Change Management Process: This section will
user’s objectives. identify the change management process that is used to

www.neerajbooks.com
www.neerajbooks.com

identify, log, evaluate and update the SRS to reflect 4. The software projects are generally given tight
changes in project scope and requirements as changes project schedules. Pressure is created from customer
to requirements are unavoidable. side to hurriedly complete the project. This normally
Document Approval: The document approvers cuts down the time requirements analysis phase, which
of the SRS are identified whose name, signature and frequently leads to disaster(s).
date should be used. 5. Requirements engineering is communication
Supporting Information: This section makes the intensive. User and developers have different
SRS easier for use. It includes: vocabularies, professional backgrounds and psychology.
Table of contents User writes specifications in natural language and
Index developer usually demands precise and well-specified
Appendices. requirement.
Appendices not always forms the part of actual 6. In present time, the software development is
requirements specification and are not even necessary. market driven having high commercial aspect. The
Appendices include: software developed should be a general purpose one to
(i) Sample I/O formats, descriptions of cost satisfy anonymous customer and then it is customized
analysis studies, result of user surveys. to suit a particular application.
(ii) Supporting or background information that 7. The resources may not be enough to build
helps the readers of the SRS. software that fulfils all the customer’s requirements. It

Neeraj
(iii) Description of the problems that are solved by is left to the customer to prioritize the requirements and
the software. develop software fulfilling important requirements.
(iv) Special packaging instructions for the code and
media to meet certain requirements such as
security, export, etc. Q. 1. What do you mean by SRS?

Publications
Tables can provide different ways to structure the Ans. SRS stands for system requirement
SRS on the specific requirements. specification. SRS is the documentation of the
Problems in SRS: There are various features that requirements which is used by the user or customer for
make requirements analysis difficult. These are reviewing or understanding the system.

www.neerajbooks.com
discussed below: Q. 2. List the other five characteristics of the
1. Complete requirements are difficult to uncover. SRS? Briefly explain each of them?
In recent trends in engineering, the processes are Ans. Five characteristics of a good SRS are as
automated and it is practically impossible to understand follows:
the complete set of requirements during the 1. Correct: SRS is said to be correct if and only
commencement of the project itself. if it all the requirements stated in it are required
2. Requirements are continuously generated. for the software.
Defining the complete set of requirements in the starting 2. Ranked for importance and/or stability: It
is difficult. When the system is put under run, the new is ranked for importance and/or stability if each
requirements are obtained and need to be added to the requirement in it has an identifier to indicate
system. But, the project schedules are seldom adjusted either the importance or stability of that
to reflect these modifications. Otherwise, the particular requirement. This can also be done
development of software will never commence. by classifying the requirements under essential,
3. The general trends among software developer conditional and optional categories.
shows that they have over dependence on CASE tools. 3. Verifiable: SRS is verifiable if all the
Though these tools are good helping agents, over requirements stated within it are verifiable. A
reliance on these requirements engineering tools may requirement is verifiable if any process or
create false requirements. Thus, the requirements machine can check if the requirement is desired
corresponding to real system should be understood and for the project that is it meets the requirement
only a realistic dependence on tools should be made. of the software.

www.neerajbooks.com
www.neerajbooks.com

4. Modifiable: SRS is modifiable if and only if to be imposed on the software before imple-
any change in the requirement is easily, mentation is seen?
completely and consistently reflected in the Q. 7. Give the organization of the SRS?
SRS without affecting its structure. Ans. Organization of the SRS by IEEE format is
5. Traceable: SRS is traceable if and only if the as follows:
origin of the requirement is clear and it 1. Introduction
facilitates the referencing of each requirement 1.1 Purpose
in future development. One can do backward 1.2 Scope
as well as forward traceability. 1.3 Definitions, Acronyms and Abbre-
Q. 3. When is the SRS called complete? viations
Ans. The SRS is said to be complete if it includes 1.4 References
all the requirements related to functionality, 1.5 Overview
performance, design constraints, etc. SRS is complete 2. The Overall Description
when all the terms, diagrams, tables and responses of 2.1 Product Perspective
the software in all classes of situations are defined. 2.1.1 System Interfaces
Q. 4. Why consistency is a desired characteristic 2.1.2 Interfaces
of SRS? 2.1.3 Hardware Interfaces
Ans. Consistency is a desired characteristic of SRS 2.1.4 Software Interfaces

Neeraj
because if there is any conflict between requirements 2.1.5 Communication Interfaces
of the SRS then the SRS will not produce the correct 2.1.6 Memory Constraints
product as it will lead to a conflict as to which 2.1.7 Operations
requirement is correct and which is not. SRS can be 2.1.8 Site Adaption Requirements
consistent if it resolves all the conflicts between the 2.2 Product Functions
2.3 User Characteristics

Publications
requirements of the SRS which may lead to better
understanding and ease to read the SRS. 2.4 Constraints
Q. 5. What do you mean by unambiguity in SRS? 2.5 Assumptions and Dependencies
2.6 Apportioning of Requirements
Ans. SRS is said to be unambiguous if the
3. Specific Requirements
requirements stated in the SRS have only one meaning.

www.neerajbooks.com
3.1 External interfaces
Each sentence in the SRS should have unique
3.2 Functions
interpretation. If one requirement has more than one
3.3 Performance Requirements
meaning in different context then it should be specified
3.4 Logical Database Requirements
in the glossary with each of its meaning.
3.5 Design Constraints
Q. 6. What are the issues that SRS writer will
3.5.1 Standards Compliance
address?
3.6 Software System Attributes
Ans. Issues that a SRS writer will address are as
3.6.1 Reliability
follows:
3.6.2 Availability
1. Functionality: What the software is supposed
3.6.3 Security
to do?
3.6.4 Maintainability
2. External Interfaces: How the software will 3.6.5 Portability
interact with people, hardware or other 3.7 Organizing the Specific Requirements
software? 3.7.1 System Mode
3. Performance: At what speed, response time, 3.7.2 User Class
availability, etc. various functions will work. 3.7.3 Objects
4. Attributes: What are the considerations for 3.7.4 Feature
portability, security, reliability, etc.? 3.7.5 Stimulus
5. Design constraints imposed on an imple- 3.7.6 Response
mentation: Are there any constraints that have 3.7.7 Functional Hierarchy.

www.neerajbooks.com
www.neerajbooks.com

4. Change Management Process. 3. Too much dependence on the CASE tools


5. Document Approvals. sometimes does not cover the requirements
6. Supporting information. corresponding to real system which should be
Q. 8. Mention the problems in SRS. understood properly and only a realistic
Ans. The problems in SRS are as follows: dependence on tools should be made.
1. All the requirements are difficult to be known 4. Due to tight project schedules the time
at the start of the project. As the project allocated to requirement analysis phase is less
enhances new requirements are being which leads to disasters as the requirements
discovered which are to be added in the for the project are not understood and
process. Sometimes these changes are not determined properly.
5. There is a language barrier between the user
incorporated in the process which is not
and the developer which results in
acceptable by the customer.
requirements not being understood properly.
2. It is difficult to uncover all the requirements
6. Resources are not enough to build software that
during the enhancement of the project. Now-
fulfils all the customer’s requirements. So it is
a-days, processes are being automated so it is left for the customer to prioritize the
difficult to understand the requirements in the requirements and only important requirements
entire course of the project. are being fulfilled in software development.

Neeraj
Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

Function Oriented Modelling


2
3. Structure Chart: This chart shows the
Function oriented modelling is practiced informally breakdown of the system to its lowest
since programming began. Many systems have been manageable levels.
developed using this approach and is directly supported 4. SRS: System Requirement Specification as
by many programming languages. This approach relies discussed in previous chapter tells us what the
on decomposing the system into a set of interacting system is intended to do.

Neeraj
functions with a centralized system state which is shared 5. Data Dictionaries: It contains the data about
by these functions. This is shown in the following figure:
the data that is metadata.

DATA FLOW DIAGRAM (DFD)

Publications
As information moves through software, it is
modified by a series of transformations. A data flow
diagram is a graphical representation that depicts the
information flow and transforms that are applied as data

www.neerajbooks.com
move from input to output. A data flow diagram provides
a visual representation of the data flow. Users can see
where and when the data and information can be
accessed at various stages of its life cycle. It is useful to
include clickable information on responsibilities of the
centers, schedules, data formats, data volumes, etc.
Access to the data at intermediate points in the data flow
A functional approach to design is successful when
and information on data and product delivery can also
the amount of system state information is minimized
be provided through these diagrams. It is used widely
i.e. where the system is concerned with processing
for many years prior to invent of computers.
independent actions whose outcomes are not affected
by previous actions and information sharing is explicit. It provides a clear picture of a business function
In this chapter we will discuss the following: which starts with the first step of creating an overview
1. Data Flow Diagram: This shows how data is of the system and continues by analyzing each of the
transferred between different functions of the functional aspect of the system. This further can be
system. elaborated to the level the details are required. DFD is
2. Entity Relationship Diagram: This is the also known as a data flow chart or a bubble chart. The
logical representation of data of an basic form of data flow diagram for cash withdrawal
organization. from a bank is shown below:

www.neerajbooks.com
www.neerajbooks.com

Neeraj
Source: www.schools.ash.org.au
DFD have the following important observations:
1. In name in DFD should be unique which makes
it easier to be referenced.

Publications
or
2. It is not a flow chart as it does not tell the order
of events instead it tells about the flow of data
that is why it is also known as data flow chart.
3. No logical decisions are shown in a DFD. 3. Data Store: It is a repository of data, also referred
to as files sometimes, which can be used at any later

www.neerajbooks.com
4. Describe the details of the requirements at each
level according to the demand. stage or by the other processes in a different order. It is
Advantages of DFD are as follows: represented as a set of parallel lines.
1. Since it is a graphical representation so it is
easier to understand the flow of data.
2. It has properly described system boundaries. Data Store
3. At each level of abstraction data can be
represented precisely.
Notations of DFD 4. External Entity (Source or Sink): External
The notations that are used for creating a DFD are entities are the objects outside the system with which
as follows: the system communicates. Source acts as the source of
1. Process: It is represented as a circle or bubble input and sink act as the destination of the output in the
that transforms the input data into output data. system. They are represented as rectangle.

2. Data Flow: It is used to connect various Levels of DFD: The DFD is used to represent a
processes to each other, to source or to sink with the system at any level of abstraction. A DFD can be
arrowhead indicating the flow of data in the system. It partitioned into a number of levels to which the
is shown as follows: information or function detail is required.

www.neerajbooks.com
www.neerajbooks.com

A level-0 DFD, also called the context diagram, 2. Identify data stores and processes of the system
represents the functionality of the entire system in a and draw first level physical DFD.
single bubble with incoming and outgoing arrows 3. Explore the processes of first level and draw
indicating the input and output data, respectively. It also second level DFD.
shows the interface between the system and external 4. Explore the processes of second level and draw
entities. Thus context diagram aims at system boundary third level DFD.
and clears the scope of analysis precisely. 5. Derive the logical view of each physical DFD
For example, a context level diagram is shown by the following ways:
below: (a) Remove documents and show actual data
in data flow.
(b) Remove registers and use files as data
stores.
(c) Remove unnecessary processes.
(d) Remove data flow between external
entities (if any) and show data flow
through processes.
ENTITY RELATIONSHIP DIAGRAM ERD
Entity Relationship diagram also referred as E-R
Diagram is another tool of requirement analysis. An E-
R Diagram is a logical representation of data of an
organization which uses three main i.e. entities,

Neeraj
relationships and attributes. It uses different symbols to
represent the above type of information. Boxes are used
Source: www.smartdraw.com to represent an entity. Diamonds are used to represent
A context diagram is expanded into a number of relationship and ellipse to depict the attributes.
inter-related processes. Each process may be further Entities: An entity is a fundamental thing of the

Publications
expanded into a set of inter-connected sub processes. organization about which data is maintained. It has an
This procedure of expanding a DFD is known as independent existence and can be uniquely identified
levelling. The higher the level more details of each which makes each entity separate from each other. When
function is described. Level-1 DFD tells about all the we say entity we normally say for an aspect that exist in
major functions of the system. Level-2 or higher gives real world and is distinguished from the other real world

www.neerajbooks.com
the details about each functions in specific. aspects. An entity can be anything like physical object,
Types of DFD: There are two types of DFD - concept or an event.
Physical and Logical DFD. A set of similar types of entity is called the entity
(a) Physical DFD: The data flow diagrams which sets which have certain attributes that apply to it.
represent the model of the current system It is represented as a rectangle with capital letters
(manual or computerised), are known as used to name the entity type. The name is placed inside
physical DFD. These diagrams are drawn, the rectangle representing the entity.
when the analyst studies the current working
system in detail. ENTITY SET NAME
(b) Logical DFD: The data flow diagrams which
represent the model of the proposed system, For example, a university offers two kinds of
are known as logical DFD. These diagrams are programme that is regular and correspondence and
drawn from the physical DFD. enrolls both national and international students.
Each of these DFD can be further categorised into Here STUDENT and PROGRAMME are the entity
different levels like zero level (context diagram), first set and national and international are the entities of
level, second level and third level. Each higher level STUDENT and regular and correspondence are the
DFD is drawn by adding more details to each process entities of PROGRAMME.
of lower level, by a technique called ‘Exploding DFD’. This is shown below:
Steps to Draw DFD: A DFD can be drawn using
the following steps:
1. Identify external entities and data flows of the STUDENT PROGRAMME
current system and draw physical context
diagram.

www.neerajbooks.com
www.neerajbooks.com

Attributes: Each entity set has a set of attributes associated with it. An attribute is a property or characteristic
that defines the entity that is of interest.
Notation for attribute is:

Attribute name

Attribute
Attributes in E-R Diagram are represented as an ellipse with the name of the attribute written in it and are
connected to the entity set with a line joining the attribute and the entity set.
For example, for a STUDENT entity set we can have Student_ID, Name, Address, Age, Phone_num as some
of the characteristics or attributes that can be associated with the entity set.
The following diagram shows the representation for a STUDENT entity set using E-R Diagram notations:

Neeraj
Publications
Candidate Keys and Identifier: Every entity set
has an attribute or a set of attributes that distinguish
one instance from the other of the same type. Candidate

www.neerajbooks.com
key is an attribute that uniquely identifies each instance
of an entity set. Candidate key can be a single or a group
of attributes that uniquely identifies every instance of
an entity set.
For example, Student_ID is the candidate key for
the STUDENT entity set.
One entity set can have more than one candidate
key. The designer has to choose the most appropriate
candidate key for that entity set as the identifier. An
identifier is the candidate key that is selected to uniquely
identify the instances of the entity set. It is depicted in
Relationships: Relationship is the association
E-R Diagram as follows:
between two entity sets that is it tells how the data is
being shared between any two entities. It is sometimes
also referred to as binary relationship as it is the
association between two entity sets. Sometimes more
than two entities can also be associated with each other.
Relationship is represented as a diamond in the E-R
For example, the candidate key and the identifier,
Student_ID for the STUDENT entity set, will be Diagram with the relation name written in between the
represented as follows: diamond. Notation for the relationship is:

www.neerajbooks.com
www.neerajbooks.com

For example, an EMPLOYEE works for a DEPARTMENT can be represented as follows:

Let us consider another example in which, each student of a university is registered for a programme that the
university is offering. This is shown as follows:

Neeraj
Publications
The arrows in the above diagram show “many to one relationship” that is many students can be registered for

www.neerajbooks.com
a programme and there can be a number of programmes that are offered by a university.
We also have “one to one relationship” and “many to many relationship”. Examples of these are:

This is one to one relationship.

This is many to many relationship.


Degree of Relationship: It means that how many entity sets are participating in the relationship that is the
number will tell the degree of the relation. We can have unary, binary and ternary relationship.
Unary Relationship: This is also known as recursive relationship. In this relationship only one entity set is
involved. There can be many instances of the same entity type that are being involved in the relationship.
For example: An employee is being supervised by another employee of a company. This can be shown as
follows:

www.neerajbooks.com
www.neerajbooks.com

In the above diagram, it shows that an employee is being supervised by another employee who is the supervisor.
This means that here only one entity set is participating but with different instances of it that are worker and
supervisor.
Binary Relationship: It is a relationship between two entity sets. Mostly binary relationships exist in the E-R
Diagrams. For example, a student can enroll for a programme of a university. This is shown as follows:

Neeraj
Ternary Relationship: In this relationship three entity sets are participating.
For example, the relationship “may have” could be associated with three entities STUDENT, SUBJECT and
TEACHER. This is many to many relationship. This is shown as follows:

Publications
www.neerajbooks.com
There is also n-ary relationship. It is when with a single relationship n- entities participate.
Cardinalities: Cardinality is the number of instances of an entity set that participates in a relationship with the
other entity set.
For example, a STUDENT can be registered for more than one SUBJECT.

Hence, in this example only one instance of STUDENT entity set is there whereas many instances of SUBJECT
entity set are participating. Thus, this is one-to many relationship.
The minimal cardinality is the minimum number of instances that participate in a relationship. If the minimum
number of instances that are associated with the other entity set is zero then we say it is an optional participant but
if the cardinality is 1 then it is a mandatory participant. The maximum cardinality is the maximum number of
instances that are associated with the other entity set and it is referred as many.
The cardinality of relationship is shown below:

www.neerajbooks.com
www.neerajbooks.com

Benefits of ERD: Data modelling and the entity- the data are transmitted between them. It includes

Neeraj
relationship diagram provides the analyst with a concise analysis of input-to-output transformations and also the
notation for examining data within the context of a data analysis of transaction.
processing application. In most cases, the data modelling It shows which module within a system interacts
approach is used to create one piece of the analysis and graphically depicts the data that are communicated
model, but it can also be used for database design and between various modules.
to support any other requirement analysis method. Structure charts are developed prior to the writing

Publications
STRUCTURE CHART of program code. They identify the data passes existing
It is the most commonly used method for system between individual modules that interact with one
design. A Structure Chart (SC) in software engineering another. They are not intended to express procedural
and organizational theory is a chart which shows the logic. This task is left to flowcharts and pseudo code.

www.neerajbooks.com
breakdown of a system to its lowest manageable levels. They don’t describe the actual physical interface
They are used in structured programming to arrange between processing functions.
program modules into a tree. Each module is represented The modules are connected with each other with
by a box, which contains the module’s name. The tree the help of lines. The lines show the connection between
structure visualizes the relationships between modules. the activity and its sub-activity. The top level module
A structure chart is a design tool that pictorially shows calls the modules at lower level. The components are
the relation between processing modules in the software. generally read from top-to-bottom and left-to-right and
It describes the hierarchy of component modules and modules are numbered in hierarchal numbering scheme.

www.neerajbooks.com
www.neerajbooks.com

A structure chart depicts the size and complexity of the system, number of readily identifiable functions and
modules within each function and whether each identifiable function is a manageable entity or should be broken
down into smaller components.
Each module acts as a black box where only the functionality is taken into account and not the internal design.
Here, the inputs are given to the black box and outputs are generated by the black box. When a module calls another
it views the module as a black box, passing parameters needed for the called module’s functionality and receiving
answers.
Notations
Control data passed between different modules is represented with a labelled arrow and a filled in circle
whereas the data is depicted with a labelled arrow and an open circle.
When a module is used by many other modules then it is put into the library of modules.
Diamond symbol is used for the conditional call of the module that is the outcome of the module will
depend on the condition that is attached to the diamond.
Repetition of a module is represented by a loop around the control flow arrows and is called the repetition
symbol.
The pictorial notations that are used in structure chart are as follows:

Neeraj
Publications
www.neerajbooks.com

Construction: According to Wolber, “A structure chart can be developed starting with the creating of a structure,
which places the root of an upside-down tree which forms the structure chart. The next step is to conceptualize the
main sub-tasks that must be performed by the program to solve the problem. Next, the programmer focuses on each
sub-task individually, and conceptualizes how each can be broken down into even smaller tasks. Eventually, the
program is broken down to a point where the leaves of the tree represent simple methods that can be coded with just
a few program statements”.
An example of structure chart is shown below:

www.neerajbooks.com
www.neerajbooks.com

Neeraj
Publications
(SRS) www.neerajbooks.com
SOFTWARE REQUIREMENTS SPECIFICATION

Software Requirements Specification (SRS) is the


formal translation process producing a formal output
must have a precise and unambiguous input. A procedure
for identifying requirements can therefore be at best set
starting point of the software development activity. Little of guidelines.
importance was attached to this phase in the early days The requirement specification phase consists of two
of software development. The emphasis was first on basic activities: problem or requirement analysis and
coding and then shifted to design. As systems grew more requirement specification.
complex it became evident that the goals of the entire Role of SRS: A good SRS provides many benefits.
system cannot be easily comprehended. Hence, the need Some of goals it accomplishes are:
for the requirement analysis phases arose. Now, for large 1. Establishing the basis for agreement between
software systems, requirement analysis is perhaps the client and supplier on what the software product will
most difficult activity and also the most error prone. do.
Many software engineers believe that the software 2. Reducing the development cost. The preparation
engineering discipline is weakest in this critical area. of the SRS forces rigorous specification of the
The SRS is a means of translating the ideas in the requirements before the design begins. Careful
minds of the clients, into a formal document (the output development of an SRS can reveal omissions,
of the requirements phase). Thus, the output of the phase inconsistencies and mis-understandings early in the
is a set of formally specified requirements, which development cycle, which can considerably reduce cost.
hopefully are complete and consistent, while the input 3. Providing a reference for validation of the final
has none of these properties. Clearly, the process of product. The SRS assists the client in determining if the
specifying requirements cannot be totally formal. Any software meets the requirements.

www.neerajbooks.com
www.neerajbooks.com

Outline of SRS: The SRS outline is given below: 4. Verifiable: A SRS is verifiable, if there exists
1. Introduction some cost-effective process that can check if the final
(i) Purpose software meets that requirement. A SRS is verifiable if
(ii) Scope and only if every stated requirement is verifiable. This
(iii) Definitions, acronyms and abbreviations implies that the requirements should have as little
(iv) References subjectivity as possible because subjective requirements
(v) Overview. are difficult to verify.
2. Overall description 5. Consistent: A SRS is consistent if there is no
(i) Product perspective requirement that conflicts with another. Terminology can
(ii) Product functions cause inconsistencies; for example, different
(iii) User characteristics requirements may use different terms to refer to the same
(iv) Constraints object. There may be logical or temporal conflict
(v) Assumptions and dependencies. between requirements causing inconsistencies. This
3. Specific requirements occurs if the SRS contains two or more requirements
(i) External Interfaces whose logical or temporal characteristics cannot be
(ii) Functional requirements satisfied together by any software system.
(iii) Performance requirements 6. Modifiable: Writing an SRS is an iterative
(iv) Logical database requirements process. Even when the requirements of a system are
(v) Design constraints

Neeraj
specified, they are later modified as the needs of the
(vi) Software system attributes client change with time. Hence, an SRS should be easy
(vii) Organizing the specific requirements to modify. An SRS is modifiable if its structure and style
(viii) Additional comments. is such that any necessary change can be made easily,
4. Supporting information while preserving the completeness and consistency.
(i) Table of contents and index 7. Traceable: A SRS is traceable if the origin of

Publications
(ii) Appendixes. each of its requirements is clear and if it facilitates the
Characteristics of an SRS: To properly satisfy the referencing of each requirement in future development.
basic goals, an SRS should have certain properties and Forward traceability means that each requirement should
should contain different types of requirements. A good be traceable to some design and code elements.
SRS is:

www.neerajbooks.com
Backward traceability requires that it should be possible
1. Understandable: A SRS produces a document to trace design and code elements to the requirements
upon which the client, the users and the developers can they support. Traceability aids verification and
agree. Since multiple parties need to understand and validation.
approve the SRS, it is of utmost importance that the Components of a SRS: Completeness of
SRS should be understandable. specifications is difficult to achieve and even more
2. Unambiguous: A SRS is unambiguous if and difficult to verify. Having guidelines about what different
only if every requirement stated has one and only one things an SRS should specify will help in completely
interpretation. Requirements are often written in natural specifying the requirements. Here, we describe some
language, which are inherently ambiguous. If the of the system properties that an SRS should specify.
requirements are specified in a natural language, the The basic issues which an SRS must address are:
SRS writer has to be especially careful to ensure that 1. Functionality: Functional requirements specify
there are no ambiguities. One way to avoid ambiguities which outputs should be produced from the given inputs.
is to use some formal requirements specification They describe the relationship between the input and
language. output of the system. For each functional requirement,
3. Complete: A SRS is complete if everything the a detailed description of all the data inputs and their
software is supposed to do is in the SRS. A complete source, the units of measure and the range of valid inputs
SRS defines the responses of the software to all classes must be specified. An important part of the specification
of input data. For specifying all the requirements, the is the system behaviour in abnormal situations, like
requirements relating to functionality, performance, invalid input or error during computation. The functional
design constraints, attributes and external interfaces requirement must clearly state what the system should
must be specified. do if such situations occur.

www.neerajbooks.com
www.neerajbooks.com

2. Performance: This part of SRS specifies the Recovery requirements are often an integral
performance constraints on the software system. All the part here, detailing what the system should do
requirements relating to the performance characteristics if some failure occurs in order to ensure certain
of the system must be clearly specified. There are two properties.
types of performance requirements–static and dynamic. (iv) Security: Security requirements are
(i) Static requirement: These do not impose particularly significant in defense systems and
constraint on the execution characteristics of many database systems. Security requirements
the system. These include requirements like place restrictions on the use of certain
the number of terminals to be supported and commands, control access to data, provide
number of simultaneous users to be supported, different kinds of access requirements for
number of files and their sizes that the system different people require the use of passwords
has to process. and cryptography techniques and maintain a
(ii) Dynamic requirement: These specify log of activities in the system.
constraints on the execution behaviour of the 4. External Interface: All the possible interactions
system. These typically include response time of the software with people, hardware and other software
and throughput constraints on the system. should be clearly specified. For the user interface, the
Response time is the expected time for the characteristics of each use interface of the software
completion of an operation under specified product should be specified. User interface is
circumstances. Throughput is the expected increasingly becoming more important and must be

Neeraj
number of operations that can be performed given proper attention. A preliminary user manual should
in a unit time. be created with all user commands, screen formats, an
3. Design Constraints: There are number of factors explanation of how the system will appear to the user,
present in the client’s environment that may restrict the and feedback and error messages. Like, other
choices of designer. Such factors include: standards that specifications these requirements should be precise and

Publications
must be followed, resource limits, operating verifiable.
environment, reliability and security requirements and Problems in SRS: There are various features that
policies that may have an impact on the design of the make requirements analysis difficult. These are
system. discussed below:
(i) Standards Compliance: This specifies the 1. Complete requirements are difficult to uncover.

www.neerajbooks.com
requirements for the standards that the system
must follow. The standards may include the
report format and accounting procedures.
In recent trends in engineering, the processes are
automated and it is practically impossible to understand
the complete set of requirements during the
There may be audit tracing requirements, commencement of the project itself.
which require certain kinds of changes or 2. Requirements are continuously generated.
operations that must be recorded in an audit Defining the complete set of requirements in the starting
file. is difficult. When the system is put under run, the new
(ii) Hardware Limitations: The software may have requirements are obtained and need to be added to the
to operate on some existing or pre-determined system. But, the project schedules are seldom adjusted
hardware, thus imposing restrictions on the to reflect these modifications. Otherwise, the
design. Hardware limitations can include the development of software will never commence.
type of machines to be used, operating system 3. The general trends among software developer
available on the system, languages supported, shows that they have over dependence on CASE tools.
and limits on primary and secondary storage. Though, these tools are good helping agents, over
(iii) Reliability and Fault Tolerance: Fault reliance on these requirements engineering tools may
tolerance requirements can place a major create false requirements. Thus, the requirements
constraint on how the system is to be designed. corresponding to real system should be understood and
Fault tolerance requirements often make the only a realistic dependence on tools should be made.
system more complex and expensive. 4. The software projects are generally given tight
Requirements about system behaviour in the project schedules. Pressure is created from customer
face of certain kinds of faults are specified. side to hurriedly complete the project. This normally

www.neerajbooks.com
www.neerajbooks.com

cuts down the time requirements analysis phase, which output from the process, as a store, as an
frequently leads to disaster(s). external entity)
5. Requirements engineering is communication (d) Content description: a notation for
intensive. User and developers have different representing content
vocabularies, professional backgrounds and psychology. (e) Supplementary information: other
User writes specifications in natural language and information about data types, present values
developer usually demands precise and well-specified (if known), restrictions or limitations, etc.
requirement. Once a data object or control item name and its
6. In present time, the software development is aliases are entered into the data dictionary, consistency
market driven having high commercial aspect. The in the name can be enforced. That is, if an analysis team
software developed should be a general purpose one to member decides to name a derived data item xyz, but
satisfy anonymous customer, and then it is customized xyz is already in the dictionary, the CASE tool
to suit a particular application. supporting the dictionary posts warn to indicate
7. The resources may not be enough to build duplicate names. This improves the consistency of the
software that fulfils all the customer’s requirements. It analysis model and helps to reduce errors.
is left to the customer to prioritize the requirements and “Where-used/how-used” information is recorded
develop software fulfilling important requirements. automatically from the flow models. When a dictionary
THE DATA DICTIONARY entry is created, the CASE tool scans DFDs and CFDs
The analysis model includes representations of data to determine which processes use the data or control

Neeraj
objects, functions and control. In each representation, information and how it is used. It is one of the most
data objects and/or control items play a role. An important benefit of the dictionary.
organized approach for representing the characteristics The mathematical operators used in data dictionary
of each data object and control item is done by the data are as follows:
dictionary. Notation Meaning

Publications
The data dictionary is a quasi-formal grammar for
describing the contents of the objects defined during X= a+b X consists of data elements a
the structured analysis. and b
It is an organized listing of all the data elements X= [a/b] X consist of either data element
that are pertinent to the system, with precise, rigorous a or b

www.neerajbooks.com
definitions so that both the user and system analyst will X= a X consists of an optional data
have a common understanding of inputs, outputs, element a
components of stores and (even) intermediate X= y{a} X consists of y or more
calculations. occurrences of data element a
Thus data dictionary is a set of meta-data which X= {a}z X consists of z or fewer
contains the definition and representation of data occurrences of data element a
elements. It gives a single point of reference of data X= y{a}z X consists of some occurrences
repository of an organization. Data dictionary lists all of data element a which are
data elements but does not say anything about between y and z
relationships between data elements. The data dictionary can be used for:
The data dictionary is always implemented as part 1. Create an ordered listing of all data items.
of a CASE “structured analysis and design tool”. 2. Create an ordered listing of subset of data items.
Although, the format of dictionaries varies from tool to 3. Find a data item from a description.
tool, most have the following information: 4. Design the software and test cases.
(a) Name: the primary name of the data or control
item, the data store, or an external entity.
(b) Alias: other names used for the first entry. Q. 1. What is Data Modelling? How does it differ
(c) Where-used/how-used: a listing of the from DFD?
processes that use the data or control the items Ans. DATA Modelling–Data modelling answers
and how it is used (e.g., input to the process, specific questions that are relevant to any data

www.neerajbooks.com
www.neerajbooks.com

processing application. What are the primary data applications in which data and the relationships that
objects to be processed by the system? What is the govern data are complex. Unlike the data-flow diagram,
composition of each data object and what attributes data modelling considers data independently of the
describe the object? Where do the object currently processing that transforms the data.
reside? What are the relationships between objects? Q. 2. Write short notes on:
What is the relationship between the objects and the (1) Data Objects
processes that transform them? (2) Attributes
To answer these questions, data modelling (3) Relationships.
methods make use of the Entity Relationship Diagram Ans. The data model consist of three interrelated
(ERD). The ERD allows a software engineer to identify items of information : the data object, the attributes that
data objects and their relationships using a graphical describe the data object, and the relationships that
notation. In structured analysis, the ERD defines all data connect data objects to one–another.
that are input, stored, transformed and produced within (i) Data Objects: A data object is a representation
an application. of almost any composite information that must be
The entity-relationship diagram focuses solely on understood by software. Composite information means
data (and therefore satisfies the first operational analysis something that has a number of different properties or
principle), representing a “data network” that exists for attributes. Therefore “height” (a single value) would not
a given system. The ERD is especially useful for be a valid data object, but area (in cooperating length
and width) could be defined as an object.

Neeraj
Objects Attributes Relationships:
Name
Address
Age

Publications
Profession

Make Colour
B/w TV Model TV

www.neerajbooks.com
ID number Colour
Figure 3 : Data objects, attributes, and relationships

A data object can be an external entity (e.g., A data object encapsulates data only—there is no
anything that produces or consumes information), a reference within a data object to operations that act on
thing (e.g., a report or a display), an occurrence (e.g., a the data. Therefore, the data object can be represented
visit) or event (e.g., an accident), a role (e.g., student), as a table as shown in following Figure 4. The headings
an organizational unit (e.g., computers department), a in the table reflect attributes of the object. The body of
place (e.g., a house), or a structure (e.g., a folder). For the table represents specific instances of the data object.
example, a person or a TV (Figure 3) can be viewed as For example, a BPL Flat TV is an instance of the data
a data object in the sense that either can be defined in object TV set.
terms of a set of attributes. The data object description (ii) Attributes: Attributes define the properties of
incorporates the data object and all of its attributes. a data object and take one of three different
characteristics. They can be used to
Data objects are related to one-another. For
(1) name an instance of the data object,
example, a person can own TV set where the
(2) describe the instance, or
relationship own connotes a specific connection between
(3) make reference to another instance in another
person and TV. The relationships are always defined
table. One or more of the attributes must be defined as
by the context of the problem that is set being
an identifier—that is, the identifier attribute becomes a
analyzed.
“key”, when an instance of the data object is to be found.

www.neerajbooks.com
www.neerajbooks.com

Naming
attributes
  Ties one data object to another in this case, owner

Descriptive Referential


Identifier  
attributes
 
attributes

Fig. 4. Tabular representation of data objects

In some cases, values for the identifier (s) are (iii) Relationships: Data objects are connected to
unique, although, this is not a requirement. Referring to one-another in a variety of different ways. Consider two
the data object a reasonable identifier might be the data objects, book and library. These objects can be
Model No. represented using the simple notation illustrated in
The set of attributes that is appropriate for a given following Figure. (a). A connection is established
data is determined through an understanding of the between book and library because the two objects are
problem context. related. To determine the relationship

Neeraj
Publications (a) A basic connection between objects

www.neerajbooks.com

(b) Relationship between objects

the role of books and library is to be understand to be built. We can define a set of object-relationship pairs that
define the relevant relationships. For example,
— a library orders books
— a library displays books
— a library stocks books
— a library lends books
— a library purchases books
The relationships orders, displays, stocks, lands and purchases define the relevant connections between book
and library. above Figure (b) shows these object-relationship pairs graphically.

www.neerajbooks.com
www.neerajbooks.com

Object-relationship pairs are bi-directional; that number of occurrences of another [object]. Cardinality
is, they can be read in either direction. A library lends is usually expressed as simply ‘one’ or ‘many.’ For
books or books are lent by a library. example, a husband can have only one wife (in most
Q. 3. What is cardinality and modality? How cultures), while a parent can have many children. Taking
do they differ from each other? into consideration all combinations of ‘one’ and ‘many,’
Ans. Cardinality and Modality: The basic two [objects] can be related as:
elements of data modelling–data objects, attributes and — One-to-one (1 : 1): An occurrence of [object]
relationships–provide the basis for understanding for ‘A’ can related to one and only one occurrence
information domain of a problem. of [object] ‘B,’ and an occurrence of ‘B’ can
We have a set of objects and the object- relate to only one occurrence of ‘A.’ For
relationship pairs that bind them. But a simple pair that example, one man-one vote.
states : object X relates to object Y does not provide — One-to-many (1 : N): One occurrence of
enough information for software engineering purposes. [object] ‘A’ can relate to one or many
We must understand how many occurrences of object occurrences of [object] ‘B’, but an occurrence
X are related to how many occurrences of object Y. A of ‘B’ can relate to one or more occurrences
data modelling concept called cardinality helps. of ‘A.’ For example, teacher-student.
Cardinality: The data model must be capable of Cardinality defines “the maximum number of
representing the number occurrences of objects in a object relationships that can participate in a
given relationship. Tillmann defines the cardinality of relationship.” It does not, however, provide an indication

Neeraj
an object-relationship pair in the following way : of whether or not a particular data object must participate
Cardinality is the specification of the number of in the relationship. To get this information, the data
occurrences of one [object] that can be related to the model adds modality to the object-relationship pair.

Publications
www.neerajbooks.com

Cardinality and Modality

Modality: The modality of a relationship is zero repair actions may be required. Previous figure
if there is no explicit need for the relationship to occur illustrates the relationship, cardinality and modality
or the relationship is optional. The modality is 1 if an between the data objects customer and repair action.
occurrence of the relationship is mandatory. To illustrate, In the figure, a 1 to many cardinality relationship
consider, software that is used by a local telephone is established. That is, a single customer can be provided
with zero or many repair actions. The symbols on the
company to process requests for field service. A
relationship connection closest to the data object
customer indicates that there is a problem. If the problem rectangles indicate cardinality. The vertical bar indicates
is diagnosed as relatively simple, a single repair action 1, and the three-pronged fork indicates many. Modality
occurs. However, if the problem is complex, multiple is indicated by the symbols that are further away from

www.neerajbooks.com
www.neerajbooks.com

the data object rectangles. The second vertical bar on the left indicates that there must be a customer for a repair
action to occur. The circle on the right indicates that there may be no repair action required for the type problem
reported by the customer.
Q. 4. Briefly explain Entity-Relationship Diagram?
Ans. Entity-Relationship Diagram: The object-relationship pair is the cornerstone of the data model. These
pairs can be represented graphically using the Entity-Relationship Diagram (ERD). A set of primary components
are identified for the ERD: data objects, attributes, relationships and various type indicators. The primary purpose
of the ERD is to represent data objects and their relationships.
Data objects are represented by a labelled rectangle. Relationships are indicated with a labelled line connecting
objects. In some variations of the ERD, the connecting line contains a diamond that is labelled with the relationship
connection between data objects and relationship are established using a variety of special symbols that indicate
cardinality and modality.
The relationship between data objects TV set and manufacturer would be represented as shown following in
figure. One manufacturer makes one or many TV sets. Given the context implied by the ERD, the specification of

Neeraj ID# Model Body size Channels .............

Publications (a) A simple ERD and data object table

www.neerajbooks.com

(b) An expanded ERD

www.neerajbooks.com
www.neerajbooks.com

the data object TV set would be the earlier specification. By examining the symbols at the end of the connection
line between objects, it can be seen that the modality of both occurrences is mandatory (the vertical lines).
Expanding the mode, we can represent simplified ERD (Figure (b)) of the distribution element of the TV
business. New data objects, transports, contracts, licenses and stocks–indicate how the data objects shown in the
figure associate with one-another.
In addition to the basic ERD notation the analyst can represent data object type hierarchies. In many instances,
a data object may actually represent a class or category of information. For example, the data object TV can be
categorized as Indian or imported. The ERD notation shown in Figure (c) represents this categorization in the form
of a hierarchy.
ERD notation also provides a mechanism that represents the associatively between objects as in figure
associated with the data object TV set.
Data modelling and the entity-relationship diagram provide the analyst with a concise notation for examining
data within the context of a data processing application. In most cases, the data modelling approach is used to
create one piece of the analysis model, but it can also be used for database design and to support any other requirements
analysis method.

Neeraj
Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

Q. 5. Explain DFD along with its use in Software Development?


Ans. Data Flow Diagram: As data goes through software, it is modified by a series of transformations. A Data
Flow Diagram (DFD) is a graphical technique that depicts information flow and the transforms that are applied as
data move from input to output. The basic form of a data flow diagram is shown in Figure (A). The DFD is also
known as a data flow graph or a bubble chart.
The data flow diagram is used to represent a system or software at any level of abstraction. DFDs may be
partitioned into levels that represent increasing information flow and functional detail. Therefore, the DFDs provides
a mechanism for functional modelling as well as information flow modelling. In so doing, it satisfies the second
operational analysis principle (i.e., creating a functional model).
A level 0 DFD, also called a fundamental system model or a context model, represents the entire software
element as a single bubble with input and output data indicated by incoming and outgoing arrows, respectively.
Additional processes (bubbles) and information flow paths are presented as the level 0.

Neeraj
Publications
Figure (A) : Information flow refinement

www.neerajbooks.com
Figure (B) : Information flow model

A producer or consumer of information that resides outside the bounds


of the system to be modelled.
A transformer of information (a function) that resides within the bounds
of the system to be modelled.

A data object; the arrowhead indicates the direction of data flow.

A repository of data that is to be stored for use by one or more processes;


may be as simple as a buffer or queue or as sophisticated as a relational
database.
Figure (C) : Basic DFD notation

www.neerajbooks.com
www.neerajbooks.com

DFD is a partitioned to reveal more detail. For Today, the data dictionary is almost always im-
example, a level 1 DFD might contain five or six bubbles plemented as part of a CASE “structured analysis and
with interconnecting arrows. Each of the processes design tool.” Although, the format of dictionaries varies
represented at level 1 are sub-functions of the overall from tool to tool, most have the following information:
system. — name—the primary name of the data or control
The basic notation used in a DFD is shown in item, the data store, or an external entity
Figure (C). A rectangle is used to represent an external — alias—other names used for the first entry
entity, that is, a system element (e.g., hardware, a person, — where-used/how-used—a listing of the proc-
another program) or another system that produces esses that use the data or control items and how
information for transformation by the software or it is used (e.g., input to the process, output from
receives information produced by the software. A circle the process, as a store, as an external entity)
represents a process or transform that is applied to data — content description—a notation for represent-
(or control) and changes it in some way. An arrow ing content
represents one or more data items or data objects. All — supplementary information—other information
arrows on a data flow diagram are labelled. The double about data types, present values (if known), re-
line represents a data store–stored information that is strictions or limitations, etc.
used by the software. The simplicity of DFD notation is Once a data object or control item name and its
one reason why structured analysis techniques are the aliases are entered into the data dictionary consistency
most widely used. in name can be enforced. That is, if an analysis team
No explicit indication of the sequence of member decides to name derived data item xyz, but xyz
already in the dictionary, the CASE tool supporting the

Neeraj
processing is supplied by the diagram. Each of the
bubbles may be refined or layered to depict more detail. dictionary posts warning to indicate duplicate names.
A fundamental model for system P indicates the primary This improves the consistency of the analysis model
input is A and ultimate output is B. The model is refined and helps to reduce errors.
“Where-used/how-used” information is recorded
into transforms P1 to P7 information flow continuity is
automatically from the flow models. When a dictionary
maintained, that is, input and output to each refinement

Publications
entry is created, the CASE tool scans DFDs and CFDs
remain the same. This concept, sometimes called to determine which processes use the data or control
balancing, is essential for the development of consistent information and how it is used. It is one of the most
models. important benefits of the dictionary.
The data-flow diagram is a valuable graphical tool The data dictionary defines information items

www.neerajbooks.com
during software requirements analysis. However, its unambiguously. For large computer-based systems the
function should not be confused with the flowchart. A data dictionary grows rapidly in size and complexity.
data-flow diagram depicts information flow without In fact, it is extremely difficult to maintain a dictionary
explicit representation of procedural logic (e.g., manually. For this reason, CASE tools are used.
conditions or loops). It is not a flowchart. Q. 7. List the steps for creating a Data Flow
Q. 6. What do you mean by Data Dictionary? Diagram?
Explain briefly. Ans. Creating a Data Flow Model: The Data Flow
Ans. The Data Dictionary: The analysis model diagram (DFD) helps the software engineer to develop
includes representations of data objects, functions and models of the information domain and functional
control. In each representation data objects and/or domain at the same time. As the DFD is refined into
control items play a role. An organized approach for greater levels of detail, the analyst performs an implicit
representing the characteristics of each data object and functional decomposition of the system, thereby
control item is done by the data dictionary. accomplishing the fourth operational analysis principle.
The data dictionary is a quasi-formal grammar The DFD refinement also results in a corresponding
for describing the content of objects defined during refinement of data as it moves through the processes
structured analysis. This important modelling notation that embody the application.
is defined in the following way : Guidelines that can help during derivation of a
The data dictionary is an organized listing of all data-flow diagram are :
data elements that are pertinent to the system, with pre- (1) The level 0 data-flow diagram should depict
cise, rigorous definitions so that both user and system the software/system as a single bubble;
analyst will have a common understanding of inputs,
(2) Primary input and output should be carefully
outputs, components of stores and (even) intermediate
calculations. noted;

www.neerajbooks.com
www.neerajbooks.com

(3) Refinement should begin by isolating as well as external entities that produce or
candidate processes, data objects and stores consume information.
to be represented at the next level; (2) Taking the objects one at a time, the analyst
(4) All arrows and bubbles should be labeled and customer define whether or not a
with meaningful names; connection exists between the data object
(5) Information flow continuity must be and other objects.
maintained from level to level; and (3) Wherever a connection exists, the analyst
(6) One bubble at a time should be refined. and customer create one or more object-
Information flow continuity is maintained between relationship pairs.
levels 0 and 1. The processes represented at DFD level (4) For each object-relationship pair, cardinality
1 can be further refined into lower levels. and modality are explored.
The refinement of DFDs continues until each (5) Steps 2 through 4 are continued iteratively
bubble performs a simple function, that is, until the until all object-relationship pairs have been
process represented by the bubble performs a function defined. New objects and relationships will
that would be easily implemented as a program compo- invariably be added as the number of
nent. Cohension, that can used to assess the simplicity iterations grows.
of a given function. (6) The attributes of each entity are defined.
Q. 8. List the steps for creating an Entity (7) An entity-relationship diagram is formalized
Relationship Diagram? and reviewed.

Neeraj
Ans. Entity-Relationship Diagram: The entity- (8) Steps 1 through 7 are repeated until data
relationship diagram lets a software engineer fully modelling is complete.
specify the data objects that are input and output from a Q. 9. What is the Degree of Relationship?
system, the attributes that define the properties of these Explain with example.
objects, and the relationships between objects. The ERD Ans. The number of entities that participate in the
is constructed in an iterative manner. The following are relationship is the degree of the relationship.

Publications
the steps taken : We can have unary, binary or ternary relationship.
(1) During requirements gathering, customers Unary Relationship: Its degree is 1 as only one
are asked to list “items” that the application entity set is participating in the relationship with many
or business process addresses. These items instances of the same entity involved in the relationship.
become list of input and output data objects For example: A person is married to another person

www.neerajbooks.com
Binary Relationship: Its degree is 2 since two entity sets will participate.
For example: A student can enroll for a programme of a university.

Ternary Relationship: Its degree is 3 as three entity sets are participating.


For example, the relationship “may have” could be associated with three entities STUDENT, SUBJECT and
TEACHER. This is many to many relationship. This is shown as follows:

www.neerajbooks.com
www.neerajbooks.com

Object Oriented Modelling


3
object oriented software and the software development
Object Oriented Modelling is a modelling process. It is not a process instead it describes a notation
paradigm used in computer programming. The object- that is used in a design process. It mostly uses the
oriented paradigm is a development strategy in which graphical notations to express the design of the software.
the system is built from the reusable components called Using UML helps the project teams communicate,
objects, instead of separating data and its functionality explore potential designs and validate the architectural
design of the software.

Neeraj
as done in structured programming. Object oriented
software is based on the static, or object model: the UML is a modelling syntax used to create a number
things in the system, or, the things outside the system of software system and is widely used in a number of
about which we need to record information, and their areas. UML possesses the following characteristics:
relationships. Thus, it is the most stable view in the 1. Syntax Only: UML is just a language; it tells
us what model elements and diagrams are

Publications
system. It is why an object oriented model is preferred
by the system software over a long period. available and the rules associated with them.
Each object represents some entity of interest in It does not tell about what diagrams to create.
the system being modelled, and is characterized by its 2. Comprehensive: It can be used to design
anything.

www.neerajbooks.com
class, its state (data elements), and its behaviour. Various
models can be created to show the static structure, 3. Language Independent: It means that it does
dynamic behaviour, and run-time deployment of these not matter whatever language the program is
collaborating objects. Collaboration between the objects written in. Mapping of code is done by the case
means sending messages to each other. Sending a tool that is used.
message differs from calling the function as when an 4. Process Independent: The process written for
object sends a message, it decides on its own which creating a model is separate from the definition
function has to be called for the incoming message rather of the language of the model.
than choosing a function explicitly. There are a number 5. Tool Independent: It does not matter what tool
of different notations for representing these models, is being used. It is on the choice of the user to
such as the Unified Modelling Language (UML). choose a tool for the creation of the software
system.
6. Well Documented: The UML notation guide
UML INTRODUCTION is available as a reference to all the syntax
The Unified Modelling Language or UML is a available in the language.
graphical modelling language which is used to express 7. Its Application not Understood Properly:
the designs of the system. It is a standard language used Even though, a guide is available but it is not
for specifying, visualizing, constructing and sufficient to understand the language. It is on
documenting the artifacts and components of the the user to understand the application they are
software system. It is very important part for developing building.

www.neerajbooks.com
www.neerajbooks.com

Goals of UML: The goals of the UML are: Class: A class is a description of a set of objects
1. Provide the user with a manual that is that share the same attributes, operations, relationships,
expressive and ready-to-use so that user can and semantics. A class implements one or more
develop and exchange meaningful models. interfaces. Graphically a class is rendered as a rectangle,
2. Provide extensibility and specialization usually including name, attributes and operations.
mechanisms to extend the core concepts.
3. It should be language independent. Window
4. Provide a formal basis for understanding the
language. Origin
5. It should encourage the use of a variety of tools.
6. Support higher-level development concepts Size
such as collaborations, frameworks, patterns Open ()
and components.
7. Respond to the variety of needs of the Close ()
organization.
Application Areas of UML: The UML has been Move ()
used effectively for such domains as:
Enterprise information systems Display ()
Banking and financial services

Neeraj
Telecommunications Interface: An interface is a collection of
Transportation operations that specify a service of a class or component.
Defence An interface therefore describes the externally visible
Medical electronics behaviour of that element. An interface may represent
Distributed web based services. the complete behaviour of a class or component or only
A Conceptual Model of the UML: To form a a part of that behaviour. An interface defines set of

Publications
conceptual model of UML, knowledge of three major operation specifications (i.e. There signature) but never
elements is required: the UML’s basic building blocks, a set of operation implementation. Graphically an
the rules that dictate how those building blocks may be interface is rendered as a circle together with its name.
put together and some common mechanisms that apply

www.neerajbooks.com
throughout the UML.
Building Blocks of UML: The vocabulary of UML
encompasses three kinds of building blocks:
1. Things ISpelling
2. Relationships Collaboration: Collaboration defines an
3. Diagrams interaction and is a society of roles and other elements
Things are the abstractions that are first class that work together to provide some cooperative
citizens in a model; relationships tie these things behaviour that’s bigger than sum of all the elements.
together; diagrams group interesting collections of Thus collaborations have structural as well as
things. behavioural dimensions. Graphically collaboration is
Things in the UML: There are four kinds of the represented as an ellipse with dashed lines, usually
things in UML. including only its name.
1. Structural things.
2. Behavioural things. Chain of Responsibility
3. Grouping things.
4. Annotational things. Use Case: A use case is a description of set of
These things are used to write well formed models. sequence of actions that a system performs that yields
Structural Things: Structural things are the nouns an observable result of value to a particular actor. A use
of UML models. These are the mostly static parts of a case is used to structure the behavioral thing in a model.
model, representing elements that are either conceptual A use case is realized by collaboration. Graphically a
or physical. In all, there are seven kinds of structural use case is represented by an ellipse with solid lines,
things. These are: usually including only its name.

www.neerajbooks.com
www.neerajbooks.com

representing behaviour over time and space. There are


Place Order two primary kinds of behavioural things. They are:
1. Interaction: An interaction is a behaviour that
Active Class: An active class is a class whose comprises a set of message exchanged among
objects own one or more processes or threads and a set of objects within a particular context to
therefore can initiate control activity. An active class is accomplish a specific purpose. An interaction
just like a class except that its objects represent elements involves a number of other elements, including
whose behaviour is concurrent with other elements. messages. Graphically, a message is rendered
Graphically an active class is rendered just like a class, as a directed line, almost always including the
but with heavy lines, usually including its name, name of its operation. This is shown as follows:
attributes and operations. Display
2. State Machine: The state machine is a behaviour
Event Manager that specifies the sequence of states of an object or an
interaction goes through during its life time in response
to events, together with its responses to those events.
Flush () Graphically a state is rendered as a rounded rectangle,
usually including its name and its sub states, if any.
Suspend ()
States name

Neeraj
Component: A component is a physical and
replaceable part of the system that conforms to and Grouping Things: Grouping things are the
provides the realization of a set of interfaces. In a system organizational parts of UML models. These are the
there are different kinds of deployment components, boxes into which a model can be decomposed. There is
such as COM+ components or java beans, as well as one primary kind of grouping thing, namely, package.
Package: A package is a general purpose

Publications
components that are artifacts of the development process
such as source code files a component typically mechanism for organizing elements into groups.
represents physical packaging of logical elements such Structural things, behavioural things and even other
as classes, interfaces and collaborations. grouping things may be placed in a package. Unlike
components (which exist at run time), package is purely

www.neerajbooks.com
Order for m.java conceptual (meaning it exists only at development
time). Graphically a package is rendered as a tabbed
folder, usually including only its name and sometimes
its contents.

Node: A node is a physical element that exists


at run time and represents a computational resource,
generally having at least some memory and often Business Rules
processing capability. A set of components may reside
on a node. Graphically, a node is represented as a cube,
usually including only its name.
Annotational Things: Annotational things are the
explanatory parts of UML models. These are the
comments you may apply to describe, illuminate and
remark about any element in a model. There is one
primary kind of annotational thing, called a note. A note
is simply a symbol for rendering constraints and
comments attached to an element or a collection of
elements. Graphically a note is rendered as a rectangle
Behavioural Things: These are the dynamic parts with a dog eared corner, together with a textual or
of UML models. These are the verbs of a model, graphical comment.

www.neerajbooks.com
www.neerajbooks.com

UML Diagrams: A diagram is a graphical


presentation of a set of elements, most often rendered
as a connected graph of vertices (things) and arcs
(relationships). Diagrams are drawn to visualize a
Relationships in UML: There are four kinds of system from different perspectives, so a diagram is a
relationships in the UML: projection into a system. There are a number of UML
1. Dependency. diagrams that depict different perspectives of the
2. Association. software system that makes it easier to be understood
3. Generalization. by the users. UML diagrams mainly include the
4. Realization. following:
These are the basic relational building blocks of 1. Use Case Diagram: It displays the overall
the UML. These are used to write well formed models. functionality of the software system by displaying the
1. Dependency: A dependency is a semantic relationship between the actors and the use cases.
relationship between two things in which a change to 2. Class Diagrams: It is used to describe the types
one thing (independent thing) may affect the semantics of objects and their relationship in the system. It models
of the other thing (dependent thing). Graphically a the class structure and contents using design elements
dependency is rendered as a dashed line, possibly such as classes, packages and objects.
directed and occasionally including a label. 3. Interaction Diagram: An interaction diagram
shows an interaction, consisting of a set of objects and

Neeraj
2. Association: An association is a structural their relationships, including the messages that may be
relationship that describes a set of links. A link being a dispatched among them. It includes the following types
connection among objects. Aggregation is a special kind of diagrams:
of association, representing a structural relationship (a) Sequence Diagram: It displays the time
between a whole and its parts. Graphically, an ordering of the messages that participate in the

Publications
association is rendered as a solid line, possibly directed, interaction with time on vertical dimension and
occasionally including a label and often containing other objects on horizontal.
adornments, such as multiplicity and role names. (b) Collaboration Diagram: It displays the
structural organization of the objects that send
3. Generalization: A generalization is a and receive messages. Numbers are used to

www.neerajbooks.com
specification relationship in which objects of the
specialized elements (the child) are substitutable for
objects of the generalized elements (the parent). In this
show the sequence of messages.
4. State Diagram: It describes the state of the
object in interaction goes through when it receives a
way the child shares the structure and the behaviour of stimuli and with its response and actions.
the parent. Graphically, a generalization relationship is 5. Activity Diagram: It illustrate the dynamic
rendered as a solid line with a hollow arrowhead nature of the system by modelling the flow of control
pointing to the parent. between different activities. An activity diagram
represents the operation on some class in the system
that results in the change of the state in the system. This
diagram focuses on the flows driven by internal
4. Realization: A realization is a semantic processing.
relationship between classifiers, whereas one classifier 6. Component Diagram: It displays the static
specifies a contract that another classifier guarantees to implementation view of the system they are related to
carry out. Realization relationship is encountered at two class diagrams in that a component typically maps to
places: between interfaces and the classes or components one or more classes, interfaces or collaboration.
that realizes them and between use cases and the 7. Deployment Diagram: It captures the
collaborations that realizes them. relationship between the physical components and the
hardware. It displays the configuration of run-time
processing elements and the software components,
processes, and objects that live on them.

www.neerajbooks.com
www.neerajbooks.com

Rules of UML: The UML’s building blocks can’t Stereotypes


simply be thrown together in a random fashion. Like Tagged values
any language, the UML has a number of rules that Constraints.
specify what a well formed model should look like. A A stereotype extends the vocabulary of the UML,
well formed model is one that is semantically self- allowing it to create new kinds of building blocks that
consistent and in harmony with all its related models. are derived from the existing ones, but they are specific
The UML has semantic rules for: to the problem. For example, if you are working in a
Names programming language, such as java or C++, you will
often want to model exceptions. In these languages,
Scope
exceptions are just classes, although, they are treated in
Visibility
very special ways. You can make exceptions as basic
Integrity building blocks- by marking them with an appropriate
Execution. stereotype.
Common Mechanisms in UML: Drawing the A tagged value extends the properties of a UML
diagrams in UML is made simpler by four common building block, allowing you to create new information
mechanisms that apply consistently throughout the in that element’s specification. For example, version of
language. a product is not primitive UML concepts. They can be
Specification added to any building block, such as a class, by
Adornments introducing new tagged values to the building block.

Neeraj
Common divisions A constraint extends the semantics of a UML
Extensibility mechanisms. building block, allowing it to add new rules or modify
Specifications: The UML is more than just a the existing ones. For example, ordered may be the
graphical language. Rather, behind every part of its constraint for the event Queue class so that all additions
graphical notation there is a specification that provides are done in order.
USE CASE DIAGRAM

Publications
a textual statement of the syntax and semantics of that
building block. For example, behind a class icon is a Use Case Diagram in the Unified Modelling
Language is a type of a behavioural diagram whose
specification that provides the full set of attributes,
purpose is to provide a graphical representation of the
operations and behaviour that class embodies.
functionality of the software system in terms of actors
Adornments: Most elements in the UML have a

www.neerajbooks.com
and the relationship of them with the use cases. Hence,
unique and direct graphical notation that provides a a use case diagram captures the functional aspects of a
visual representation of the most important aspects of system. Interaction among the actors is not shown on
the elements. A class’s specification may include other the use case diagram.
details, such as whether it is abstract or the visibility of The diagrams building blocks are the use cases,
its operations and attributes. Many of these details can actors, system boundary boxes and the relationships.
be rendered as graphical or textual adornments to the Use Case: A Use Case is the description of the
class’s basic rectangular notation. interaction of the system and the actors external to the
Common Divisions: In modelling object oriented system. It is initiated by a user with a particular goal in
systems, the world often gets divided in at least a couple mind and completes when that goal is satisfied. It is
of ways. First there is a division of classes and objects. described by writing the required steps and also
Second there is a separation of interface and mentioning the alternative actions that can be performed
implementation. on each step. For example, the use case for searching a
Extensibility Mechanism: The UML provides a word is shown as:
1. User enters the word to be searched.
standard language for writing software blueprints, but
2. User clicks the search button.
it is not possible for one closed language to ever be
3. Search begins.
sufficient to express all possible nuances of all models
4. Results are shown.
across all domains across all time. For this reason, the Alternative: Search Failed. If the search fails at step
UML is open ended, making it possible for you to extend 3, the user is redirected to the search screen at step 1.
the language in controlled ways. The UML’s Thus, use case captures who (actor) does what
extensibility mechanisms include: (interaction) with the system for what purpose (goal)

www.neerajbooks.com
www.neerajbooks.com

without dealing with the system internals. It is written Benefits of use cases:
in easy to understand textual format. The users may 1. Use cases provide the users with a better
validate the use cases and may involve in the process of understanding of what is expected from the
requirement gathering and defining the requirements. proposed system and how to interact with the
It is shown as a oval in the use case diagram. Its notation system.
is shown below: 2. Every requirement is detailed properly.
3. It helps in generation of test cases required for
testing the system product.
4. It ensures that the developers pay more
There is no standard use case template for writing importance to the “task orientation” of the
the use cases. A template for writing the use case is given system.
below: 5. It can easily be converted into the object
1. Brief Description: Describe the purpose of models, for developers using object oriented
the use case. design methodologies.
2. Actors: Name the actors that participate in 6. Better traceability throughout the system
the use case. development process.
3. Flow of Events. 7. Quality of the software is improved by
3.1 Basic Flow. List the primary events that identifying the exception scenarios earlier in

Neeraj
will occur when the use case is executed. the development process.
3.2 Alternate Flow. Any other possible flow 8. Easier user validation.
that will also lead to satisfying the goal will Problems with Use Cases: Some of the pitfalls
be listed here. A use case can have many that need to be avoided while employing the use case
alternate flows. approach are as follows:
4. Special Requirements. Business rules for

Publications
1. Use cases should be ensured that they are
the flow of event should be listed here. Both detailed enough and not to abstract. The
success and failure scenarios should be interaction with the system should be
described here. visualized by the user.
5. Pre-conditions. Conditions that need to be 2. Separate use cases should not be drawn for

www.neerajbooks.com
satisfied for use case to execute. every exceptions and alternative. They all
6. Post-conditions. Different states that a should be included in the same use case.
system will be in after the execution of the 3. Do not duplicate the same sequence of steps
use case is described here. across multiple use cases. If this situation
7. Extension Points. occurs that is common steps of sequence occurs
Use Case Guidelines: The following are the steps in multiple use cases then make a separate use
for creating a use case: case for these steps and using the “include”
1. Identify the various users of the system. relationship refer in each use case these steps
2. Create a user profile for the users of each are to be mentioned.
category which includes all the roles that users 4. Do not include user interface design and data
play relevantly to the system and identify all definitions in use cases.
the important goals of the users that the system 5. Do not create a use case for each requirement.
will support. It will be very difficult to convert every non-
3. For each goal a use case has to be created functional requirement into a use-case.
following the use case template. Steps in higher
Actor: The use case diagram allows a designer to
level use cases may be treated as goals for
graphically show the use cases and the actors that use
lower level, sub-use cases.
4. Use cases are to be structured. Over-structuring them. An actor is a role that a user plays in the system.
should be avoided so that it remains easy to be An actor or external agent lies outside the system but
understood. interacts with the system. It can be a person, machine
5. Review and validate with the users. or an information system that is external to the system.

www.neerajbooks.com
www.neerajbooks.com

An actor is represented as a stick figure and is not relationship to illustrate the conditions under
part of the system itself. Its notation is shown below: which this behaviour will be executed. For
example, some stores may allow for different
payment options like credit card, debit card,
or cash on delivery. These specific
functionalities are extension of the general
“pay for items.”
Example of Use Case Diagram: Software has to
Actor be developed for automating the railway reservation
Customers, users, external devices or any external system. The system should be designed to perform the
entity interacting with the system are treated as actors. following functionalities:
There can be two types of actors: primary and 1. Reservation Seat: Passengers should be able
secondary. Primary actors are the ones having a goal to reserve seats in the train by filling the form
requiring the assistance of the system. That is these and submitting to the clerk. If the seats are
actors initiate a use case. While the secondary actors available then the clerk makes the relevant
are the ones from which the system needs assistance entries and asks the passenger to pay the fare
that is they support the use case or receive something and the tickets are printed otherwise the
valuable from the use case. passenger is informed about the unavailability
System Boundary Box: A rectangle is drawn of the seats.

Neeraj
around the use cases, called the system boundary box, 2. Cancel Reservation: A passenger wishing to
to indicate the scope of system. Anything within the box cancel the reservation should be able to do that
represents functionality that is in scope and anything by filling a form for cancellation and
outside the box is not. submitting it to the clerk. Clerk will delete the
Relationships: There are two types of relationships entries and update the reservation status.

Publications
that exist in the use case diagram. They are as follows: 3. Update Train Information: Only the
Includes: The use case that is associated with administrator enters any changes related to the
actors can be very general. Include is a directed train information like change in the train name,
relationship between two use cases, implying number etc. in the system.
that the behaviour of the included use case is 4. Report Generation: The system should be

www.neerajbooks.com
inserted into the behaviour of the including use able to generate reservation chart, monthly
case. train report, etc.
The notation is a dashed arrow from the 5. Login: For security reasons all the users of
including to the included use case with the label the system have their id and a password with
of “<<include>>” on it. There are no the help of which they can enter the system.
parameters or return values. To specify the 6. View Reservation Status: Reservation status
location in a flow of events in which the base of the seat can be viewed by the user.
use case includes the behaviour of another, you 7. View Train Schedule: Provision should be
simply write include followed by the name of given to see information related to the train
use case you want to include. For example, schedules for the entire train network to the
the “pump gas” use case that is associated with user.
the customer includes three use cases: Choose To draw a use case diagram for the above
Gas Type, Fill Tank and Calculate Total. mentioned problem we have to first identify the use cases
Extends: In this form of interaction, a given and the actors that will participate and interact with the
use case extends the other. The relationship system.
indicates that the behaviour of the extension The use cases that are there are:
use case may be inserted in the extended use 1. Update train information
case under some conditions. The notation is a 2. Report generation
dashed arrow from the extension to the 3. Login
extended use case, with the label “extend”. The 4. View reservation status
notes or constraints may be associated with this 5. View train schedules

www.neerajbooks.com
www.neerajbooks.com

6. Reserve seats 2. Passenger


7. Cancellations. 3. Clerk.
The actors that participate are: The use case diagram for the above problem can
1. Administrator or Admin be drawn as follows:

Neeraj
Publications
www.neerajbooks.com
Class Diagram and association) and the operations and attributes of
A class diagram shows a set of classes, interfaces the classes. It can also be used for data modelling.
and collaborations and their relationships. These Packages: A package is a general purpose
diagrams are the most common diagrams found in mechanism for organizing elements into groups.
modelling object oriented systems. Class diagrams Structural things, behavioural things and even other
address the static design view of a system. Class grouping things may be placed in a package. Unlike
diagrams that include active classes address the static components (which exist at run time), package is purely
process view of a system. They are widely used to conceptual (meaning it exists only at development time).
describe the types of objects in a system and their Graphically, a package is rendered as a tabbed folder,
relationships. They model the class structure and usually including only its name and sometimes its
contents using the design elements like classes, packages contents.
and objects. It describe three different perspectives when Classes: The core element of the Class Diagram is
designing a system they are conceptual, specification the class. In object oriented system, classes are used to
and implementation which become evident as the represent entities within the system; entities that often
diagram is created and will solidify the design. Class relate to real world objects. A class is a description of a
diagrams show the classes of the system, their set of objects that share the same attributes, operations,
interrelationships (including inheritance, aggregation, relationships and semantics. A class implements one or

www.neerajbooks.com
www.neerajbooks.com

more interfaces. Graphically, a class is rendered as a Visibility of the class member (i.e. any method or
rectangle, usually composed of three things i.e. name, attribute) placed before the member’s name is specified
attributes and operations. using the following notations:
Below is an example of class: + Public
- Private
# Protected
~ Package
/ Derived
In object oriented modelling, it is generally
preferred to keep most attributes private as the accessor
methods allow to control the access to the data.
Name in the syntax is the attribute’s name. Type
refers to the data type which will help in storing the
As it can be seen from the above diagram that a data i.e., integer or string or any other data type. Default
class is divided into three sections that are: value is optional.
Top: Here the name of the class is shown. Operations: The operations listed in the class
Center: It contains the attributes of the class. diagram show the functions or tasks that can be
Bottom: It shows the operations that can be performed on the data of that class. For example, in the
above example of customer, we had add() and delete()

Neeraj
performed on the class.
In the system design of a system, a number of as the operations of that class. This means that we can
classes are identified and grouped together in a class add() a new customer in the database and can also
diagram which helps to determine the static relations delete() an existing customer from the data. Operations
between those objects. With detailed modelling, the can also be shown with the visibility:
classes of the conceptual design are often split into a The syntax is: Visibility name (parameters) : type

Publications
number of sub-classes. of value returned.
Attributes : An attribute is a property of a class. In Relationships
the above example, we have shown that customer has a Association: An association represents
name, an address, etc. as its attributes. It is generally relationship between two classes. It is
represented as a line with each end connected

www.neerajbooks.com
understood that when implementing the class,
functionality is provided to set and retrieve the to a class box. Higher order associations are
information stored in attributes. Methods to set and shown using a central diamond and the ends
retrieve attribute data are often called accessor methods are connected to this diamond. An association
and need not be shown in the model as they are usually can be named at the ends with role names or
inferred. indicators or multiplicity or other properties.
The syntax for attribute is: Below is an example of association
visibility name: type = defaultValue relationship:

Order

dateRecieved: Date Customer


Association Name: string
isReceived: Boolean
n 1
Number: String Address: string

Price: Money Credit rating()


Multiplicity
Dispatch() Many value Mandatory

www.neerajbooks.com
www.neerajbooks.com

Aggregation: It is an association that antisymmetric i.e. if A is part of B then B is


represents a part-whole or part of relationship not part of A.
in which objects representing the components Aggregation is drawn like association except a
of something is associated with an object small diamond indicates the assembly end of the
representing an entire assembly. The most relationship i.e. the hollow diamond is shown on the
significant property of aggregation is containing class end and the line that connects the
transitivity i.e. if A is part of B and B is part of contained class to the connecting class.
C, then A is part of C. Aggregation will not For example, a document consists of many
involve more than two classes. It is also paragraphs, each of which consists of many sentences.

Composition: Composition usually has a operations that are common to the sub-classes
strong life cycle dependency between instances are attached to the superclass and shared by
of the container class and instances of the all the subclasses. Sub-class contains only
contained class. If the container is destroyed, those features that are unique to that class only.

Neeraj
normally every instance that it contains is It is also known as the inheritance relationship.
destroyed as well. It is represented as a solid The notation for generalization is a triangle
diamond in the diagram. connecting the superclass to its sub-classes. The
Generalization: The generalization relation- superclass is connectded by a line to the apex of the
ship indicates that one of the two related classes triangle. The subclasses are connected by lines to a
is considered to be a specialized form of the horizontal bar attached to the base of the triangle.

Publications
other i.e. superclass is the generalization of the For example, a figure superclass can have 0
subclass. For example, Equipment is the dimensonal, 1 dimensional and 2 dimiensional as its
superclass of Pump and Tank. Attributes and sub-classes.

www.neerajbooks.com

Realization: A realization relationship is a behaviour that the other model element


relationship between two model elements, in specifies. It is shown by a dashed line with an
which one model element realizes the unfilled arrowhead towards the supplier. It is

www.neerajbooks.com
www.neerajbooks.com

a relationship between classes, interfaces, 1 Exactly one instance


components and packages that connects a 0..* or * Zero or more instances
client element with a supplier element. 1..* One or more instances
Dependency: A dependency exists between Example of Class Diagram: Class diagrams are
two elements if changes to one will affect the some of the most difficult UML diagrams to draw. When
other element. If for example, a class calls an designing classes consider what attributes and
operation in another class, then a dependency operations it will have. Then try to determine how
exists between the two. If the operation is instances of the classes will interact with each other.
changed then the dependent class will also have For example, the following diagram is an example
to change. There should be minimum number of an Order System of an application. So, it describes a
of dependencies existing in the system. It is particular aspect of the entire application.
shown as a dashed arrow in the diagram. For First of all Order and Customer are identified
example, if there are two classes Car and Wheel as the two elements of the system and they have
then the Wheel class is dependent on the Car a one to many relationship because a customer
class. can have multiple orders.
Multiplicity: Multiplicity specifies how many We would keep Order class is an abstract class
instances of one class relate to a single instance and it has two concrete classes (inheritance
of an associated class. It constrains the number relationship) SpecialOrder and NormalOrder.
of related objects. These are shown at the end The two inherited classes have all the

Neeraj
of association lines. The most common properties as the Order class. In addition they
multiplicity are: have additional functions like dispatch () and
0..1 No instances, or one instance receive ().

Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

analysis approach. Fichman and Kemerer address the


Q. 1. What is meant by Object Oriented question in these words :
Analysis? What tasks must occur for OOA? We conclude that the object-oriented analysis
approach .... represents a radical change over process-
Ans. OOA is designed by following set of basic
oriented methodologies such as structured analysis, but
principles. In order to build an analysis model, five basic only an incremental change over data-oriented
principles are applied: methodologies such as information engineering.
(1) The information domain is modelled; Process-oriented methodologies focus attention away
(2) Module function is described; from the inherent properties of objects during the
(3) Model behaviour is represented; modelling process and lead to a model of the problem
(4) The models are partitioned to expose greater domain that is orthogonal to the three essential principles
detail; and of object-orientation: encapsulation, classification of
(5) Early models represent the essence of the objects and inheritance.
problem, while later models provide implementation Structured analysis takes a distinct input-process-
details. These principles form the foundation for the output way of requirements. Data are considered
approach to OOA. separately from the processes that transform the data.
The aim of OOA is to define all classes (and the System behaviour, although important, tends to play a
relationships and behaviour associated with them) that secondary role in structured analysis. The structured
are relevant to the problem to be solved. To achieve analysis approach makes heavy use of functional
this, a number of tasks must occur: decomposition object-oriented analysis provides a
1. Basic user requirements must be communicated

Neeraj
rational process. It combines the system’s behaviour and
between the customer and the software engineer. data and regards them as integrated objects. It is an
2. Classes must be identified (i.e. attributes and iteration between analyzing the behaviour and
methods are defined). information of the system. It is based on natural objects
3. A class hierarchy must be established. found in the problem domain. The objects hold data
4. Object-to-object relationships (object and have behaviour in terms of which entire system
connections) should be represented.

Publications
behavior can be expressed.
5. Object behaviour must be modelled.
6. Tasks 1 through 5 are reapplied iteratively until Q. 3. What does UML stands for?
the model is complete. Ans. UML stands for unified modelling language.
Instead of examining a problem using the classic The UML is a standard language for writing software
input-processing-output (information flow) model or a blueprints. The UML may be used to visualize, specify,

www.neerajbooks.com
model derived exclusively from hierarchical information
structures, OOA introduces a number of new concepts.
These new concepts, though a bit unusual, are really
construct and document the artifacts of the software –
intensive system. The UML is a very expressive
language, addressing all the views needed to develop
quite natural. and then deploy such systems. Even though, it is
OOA–object-oriented analysis–is based upon expressive, the UML is not difficult to understand and
concepts that we first learned in kindergarten: objects to use. The UML is process independent, although,
and attributes, classes and members, wholes and parts.
optimally it should be used in a process that is use case
Why it has taken us so long to apply these concepts to
the analysis and specification of information systems is driven, architecture centric, iterative and incremental.
anyone’s guess–perhaps we’ve been too busy “following Q. 4. What are the application areas of UML?
the flow” during the heyday of structured analysis to Ans. The UML has been used effectively for such
consider the alternatives. domains as:
Q. 2. What is the objective of object-oriented 1. Enterprise Information Systems: UML is a
analysis? Compare it with structured analysis. broadly accepted modelling language for the
Ans. Object-oriented Analysis: The objective of development of software systems and applications. The
object-oriented analysis is to develop a series of models so called, “object oriented community” also attempts
that describe computer software as it works to satisfy a to use UML for enterprise modelling purposes. Here,
set of customer-defined requirements. OOA, like the the emphasis is placed on the usage of enterprise objects
conventional analysis methods builds a multipart or business objects from which complex enterprise
analysis model to satisfy this objective. systems are made. A collection of these objects and the
Conventional Vs OO Approaches: Object- interactions between them can represent a complex
oriented analysis is totally different from the structured business system. UML focuses on the business objects

www.neerajbooks.com
www.neerajbooks.com

mainly. These are called “enterprise building blocks” to rapidly address shortfalls and requirements. Currently
and include resources, processes, goals, rules and meta- the OSU-UML is actively working in the Chemical
models. Biological Radiological Nuclear and Explosive
2. Banking and Financial Services: Today banks (CBRNE) Defense, Command Control Communications
and financial institutions are continuously facing Computers Cyber Intelligence Surveillance and
challenges of various forms and degrees. Customer Reconnaissance (CISR), and Unmanned Arial Vehicles
acquisition and retention, regulatory pressures, pricing (UAV) Systems and Payloads areas.
pressures, tighter credit markets, global markets and the 6. Medical Electronics: The complexity of medical
need to deliver profits quarter after quarter, are some of device software is increasing. An MDD environment
the challenges banks and financial institutions are facing. based on UML helps enable visualization of textual
Coupled with the challenges, the demand to keep costs requirements and strengthens the design process. It
under control, maintain growth through factors like empowers teams to break down complex requirements
productivity, information availability, product and and communicate more effectively with the project team
service differentiation and new investment products. and government agencies. The semantics of the model
UML’s Banking and Financial Services consultants have help to manage change by maintaining consistent
partnered with banks and financial institutions information in multiple views. Quality and safety goals
nationwide to achieve their objectives. By partnering can be met using validation, performed early in the
with UML one can gain access to technology and design cycle to identify errors when they are the least
functional experts who specialize in asset and wealth costly to address. For medical device developers, a

Neeraj
management, front office, middle office, back office, model-driven approach integrates the different phases
cards and payments, investment banking and brokerage, of the product life cycle-helping improve a company’s
security services, consumer lending, etc. ability to deliver innovative medical device software
3. Telecommunications: For real-time modelling, while gaining a competitive edge.
UML-RT extends the UML by three concepts that is 7. Distributed Web Services: As the number of

Publications
capsules, ports and connectors. UML-RT does not offer available web services is steadily increasing, there is a
support for modelling priority layers. Hence, an growing interest for reusing basic web services in new,
extension to UML-RT is proposed that introduces one composite web services. A method is proposed that uses
or more layers of capsule, which are associated with a UML Activity models to design web service
specific priority in execution. Eith this extension UML- composition, and OMG's Model Driven Architecture

www.neerajbooks.com
RT is a candidate for modelling real-time systems in
telecommunication domain.
4. Transportation: Transportation is the movement
(MDA) to generate executable specifications in different
composition languages. The method utilizes standard
UML constructs with a minimal set of extensions for
of people, cattle, animals and goods from one location web services. An important step in the method is the
to another. Modes of transport include air, rail, road, transformation of WSDL descriptions into UML. This
water, cable, pipeline and space. The field can be divided information is used to complete the composition models.
into infrastructure, vehicles and operations. Transport Another key aspect of the method is its independence
is important since it enables trade between peoples, of the web service composition language. The user can
which in turn establishes civilizations. UML presents thus select his preferred composition language – and
this information graphically and symbolically which execution engine – for realizing the composite web
facilitate the review process and makes it easier to service.
modify after the construction of the software. Q. 5. What are the building blocks of UML?
5. Defence: The OSU-UML seeks to bridge the Ans. The building blocks of UML are:
gaps between Defence, Industry and Academia in a large 1. Things: These are the basic entities in the model.
number of areas, bringing them together and enablling They are the abstractions that are first class citizens in a
collaboration that highlights the best aspects of all three. model. It is of four types namely structural, behavioural,
OSU-UML will accomplish this task through robust grouping and annotational.
partnerships. With a number of partnerships and 2. Relationships: They tie things together. They
contracts already in place, one will strive to develop are of four types that is association, dependency,
more with effective processes that allow the capabilities generalization and realization.

www.neerajbooks.com
www.neerajbooks.com

3. Diagrams: It groups interesting collections of Q. 6. What is use case diagram?


things that is it is a graph of things and their relationships. Ans. A use case diagram shows a set of use cases
It is of nine types namely class diagram, object diagram, and actors and their relationships. Use case diagrams
use case diagram, collaboration diagram, sequence address the static use case view of a system. These
diagram, state chart diagram, component diagram, diagrams are especially important in organizing and
activity diagram and deployment diagram. modelling the behaviours of a system. Thus, use case
Its pictorial representation is shown below: diagram is a behavioural diagram whose purpose is to
provide a graphical representation of the functionality
of the software system. Hence, a use case diagram
captures the functional aspects of a system. It does not
show the interaction between the actors.
Q. 7. What are the benefits of use cases?
Ans. The benefits of use cases are:
1. It provides a good understanding to the user
of what is expected from the system and how
the system will interact with each other.
2. Detailing of every requirement is done here.
3. Test cases are being generated easily that are
useful for testing the system product.

Neeraj
4. More importance to the “task orientation” of
the system is being ensured through it.
5. Using object oriented design methodologies
it can easily be converted into the object
models.
6. Ensures better traceability throughout the

Publications
system development process.
7. By identifying the exception scenarios earlier
in development process, a good quality
software can be made.
8. User validation is easier.

www.neerajbooks.com Q. 8. What is class diagram?


Ans. Class diagrams are the backbone of almost
every object-oriented method including UML. A class
diagram shows a set of classes, interfaces and
collaborations and their relationships. These diagrams
are the most common diagrams found in modelling
object oriented systems. They describe the static
structure of a system. Classes represent an abstraction
of entities with common characteristics. Associations
represent the relationships between classes. Classes are
shown with rectangles divided into compartments. The
name of the class is placed in the first partition (centered,
bolded and capitalized), list of the attributes in the
second partition and operations are written into the third.
In the system design of a system, a number of classes
are identified and grouped together in a class diagram
which helps to determine the static relations between
those objects. With detailed modelling, the classes of
the conceptual design are often split into a number of
sub-classes.

www.neerajbooks.com
www.neerajbooks.com

DESIGN AND TESTING

Function Oriented Design


4
what strategy of design should be followed to
Function-oriented design has been practiced organize the modules.
informally since programming began. Programs were 2. Identifying components and their interaction:
decomposed into subroutines which were functional in Here, all the design notations will be discussed.
nature and with a centralized system state which is 3. Visualizing the solution: Here, how the solution
shared by these functions. This is shown in the following will be visualized that is function procedural
figure: layers will be discussed.
4. Characteristics of a good function oriented

Neeraj
design will be discussed.

CONSTRUCTING SOLUTION TO PROBLEM


The design activity begins when the SRS document
for the software to be developed is available. It has two

Publications
levels. At first level, the focus is on deciding which
modules are needed for the system, their specification
of these modules and how the modules should be
interconnected.
Function oriented design is an approach to software

www.neerajbooks.com
design where the design is decomposed into a set of
Function-oriented design conceals the details of an interacting units where each unit has a clearly defined
algorithm in a function but system state information is function. Thus, the system is designed for a functional
not hidden. Problems can be caused due to this because view-point. Solution of a problem can be given using
a function can change the state in a way which other the following three principles. They are:
functions do not expect. Changes to a function and the 1. Partitioning: When solving a small problem, it
way in which it uses the system state may cause can be solved all at once. For solving larger problems,
unanticipated changes in the behaviour of other functions. the problem is divided into smaller pieces so that each
A functional approach to design is successful when piece can be conquered separately. Therefore, the goal
the amount of system state information is minimized of the software design is to break the problem into
i.e. where the system is concerned with processing smaller pieces so that each piece could be solved
separately.
independent actions whose outcomes are not affected
Problem partitioning can be divided into two
by previous actions and information sharing is explicit.
categories:
Many transaction-processing systems and business (i) Vertical Partitioning: It is also known as
data-processing systems fall into this class. In essence, factoring. It suggests that control and work
they are concerned with record processing where the should be distributed from top-down in
processing of one record is not dependent on any programming structure. The top level module
previous processing. will perform the control function and will do
In this chapters, we will discuss the following: the actual processing work. Modules of the
1. Constructing solution to a problem: It will tell lower level are the workers that perform all
us how we can structure our problem that is the input, all the functions and outputs tasks.

www.neerajbooks.com
www.neerajbooks.com

(ii) Horizontal Partitioning: It defines separate branches of modular hierarchy for each major program
function. It defines three partitions. One for input, other for data transformation and the third one for
output. Partitioning it this way has several benefits. They are:
Software is easier to test.
Software is easier to maintain.
Software is easier to extend.

Neeraj
Propagation of fewer side effects.
One disadvantage of this approach is that it can complicate the overall control of program flow.

Publications
www.neerajbooks.com

2. Abstraction: Abstraction is a concept related to problem partitioning. When is used during design, the
design activity focuses on one part of the system at a time. Since the part being designed interacts with other parts
of the system, a clear understanding of the interaction is essential for properly designing the part. An abstraction of
a system or a part defines the overall behaviour of the system at an abstract level without giving the internal details.
While working with a part of the system, a designer needs to understand only the abstractions of the other parts with
which the part being designed interacts. The use of abstraction allows the designer to practice the divide and
conquer technique effectively by focusing on one part at a time, without worrying about the details of other parts.
3. Top-Down and Bottom-Up design
Bottom-Up design: A common approach is to identify modules that are required by many programs. This
is a style of design where we decide how to combine the modules to provide larger ones; to combine those
to provide even larger ones, and so on, until we arrive at a one big module which is the whole of the
desired program. This method works with the layers of abstraction. Since the design progressed from
bottom layer to upwards, this method is called bottom-up design. The diagrammatic representation is as
follows:

www.neerajbooks.com
www.neerajbooks.com

Top-Down design: An approach that starts by identifying the major modules of the system, decomposing
them into their lower level modules and iterating until the desired level of detail is achieved. It is a
stepwise refinement; starting from an abstract design and moving to a concrete level at each step of
refinement until a level where no more refinement is needed and the design can be implemented directly
is reached.

Neeraj
Publications
IDENTIFYING COMPONENTS Let us understand the data flow diagram with the
AND THEIR INTERACTION help of an example of student result management. The
During the design phase, there are two things that problem statement of the student result management is
are of interest that is the design of the system and the as follows:
process of designing. It is for the latter that the methods, “A university conducts a 4-semester M.Tech.(IT)

www.neerajbooks.com
components and their interaction are needed. They are program. The students are offered four theory papers
largely used during the process of design and are used and two Lab papers (practicals) during 1st, 2nd and 3rd
to represent the design or design decisions. For a semesters. The theory papers offered in these semesters
function oriented design, the design can be graphically are categorized as either ‘Core’ or ‘Elective’. Core
or mathematically represented as follows: papers don‘t have an alternative subjects whereas
1. Data Flow Diagram elective papers have two other alternative subjects. Thus
2. Data Dictionaries a student can study any subject out of three choices
3. Structure Chart available for an elective paper. In 1st, 2nd and 3rd
semesters 2 core and 2 elective papers are offered to
4. Pseudo code.
each student. In 4th semester the students have to give
They are described below: a seminar and submit a dissertation on a topic/subject
Data Flow Diagram (DFD): As information area of their interest.
moves through software, it is modified by a series of Every subject has some credit points assigned to it.
transformations. A data flow diagram is a graphical If the total marks of a student are >=50 in a subject, he/
representation that depicts the information flow and she is considered ‘Pass’ in that subject otherwise the
transforms that are applied as data move from input to student is considered ‘Fail’ in that subject. If a student
output. A data flow diagram provides a visual passes in the subject, he/she earns all the credit points
representation of the data flow. Users can see where assigned to that subject. It is required to develop a system
and when the data and information can be accessed at that will manage information about subjects offered in
various stages of its life cycle. various semesters, students enrolled in various
A DFD will tell about what data will be input and semesters, elective(s) opted by students, marks and
output to the system. It will also tell about where the credit points obtained by students in different semesters.
data is stored and where it comes from and goes to that The system will also generate printable mark sheets for
is it will tell about all the movement of data in the system. each student.”

www.neerajbooks.com
www.neerajbooks.com

The context diagram for the above problem is given below:

Source: www.itprofessionalsrocks.blogspot.com
The persons that are interacting with the student result management are administrator, marks entry operator,

Neeraj
data entry operator and coordinator.
The level-1 DFD gives a detailed description of the flow of data in the system which is given below:

Publications
www.neerajbooks.com

Source: www.itprofessionalsrocks.blogspot.com

www.neerajbooks.com
www.neerajbooks.com

The level 2 DFD’s gives a detailed flow of every function that is there in the system and can be represented as follows:

Neeraj
Source: www.itprofessionalsrocks.blogspot.com
Here is an example of data
dictionary. Consider the following

Publications
problem statement
“The business is a sweet factory
called ‘ABC’. The business buys raw
ingredients from several suppliers and
keeps a monthly record of the purchases.

www.neerajbooks.com ABC has several employees who


prepare the ingredients or make sweets
in three of the company’s departments.
The products are sold to a number of
retail stores, and the sales are recorded
in an inventory on a monthly basis. The
company would like to keep track of
purchases of raw ingredients and their
suppliers as well as employees and their
wages. The employees specialize in
different area of the sweet
manufacturing process and have
Source: www.itprofessionalsrocks.blogspot.com
different job descriptions. The company
Similarly the rest of the DFD’s can be drawn. sells their products to a number of
Data Dictionary: Data dictionary is a set of meta-data which different retailers in various cities. They
contains the definition and representation of data elements. It gives a would like to keep track of this
single point of reference of data repository of an organization. Data information. Company will also like to
dictionary lists all data elements but does not say anything about keep track of the value and fate of sales
relationships between data elements. The information that is stored in and purchases as well as who bought or
data dictionary includes name of the data item, aliases (other names for sold what to them. They would also like
items), description/Purpose, related data items, range of values and data to keep track of where employees live
Structure definition/form. with the aim of letting go of employees
who live too far away.”

www.neerajbooks.com
www.neerajbooks.com

Neeraj
Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

Structure Chart: It is the most commonly used method for system design. It is a chart which shows the
breakdown of the system to its lowest manageable levels. It is a top-down modular approach in which the root is the
entire system which is then broken into smaller modules highlighting each functionality which are further broken
till the lowest level is reached. Structure chart can be explained with the help of the following example:

Neeraj
Publications
www.neerajbooks.com
Here the main system is to process the customer A fixed syntax of keywords that provide for
transaction. Then the structure chart is broken down in all structure constructs data declarations and
several levels to give the detail how the transaction of a modularity characteristics.
customer is being processed. A free syntax for natural language that
Pseudo Code: “Pseudo” means imitation or false describes processing feature.
and “Code” means the instructions written in a Data declaration facility
programming language. Its notation can be used both Calling technique and definition of sub-
in the preliminary and detailed design phases. Using it,
routine.
the designer describes the system characteristics using
Advantages of Pseudo Code
short, concise, English language phrases that are
structured by the key words such as If-Then-Else, While- 1. Conversion of pseudo code to a programming
Do and End. Flow of control is described by the language is easier.
indentation and keywords whereas the processing 2. Easy to modify the pseudo code of program
actions are described by the English phrases. logic whenever modifications are to be made.
Pseudo code is also known as program design 3. Less time and effort consuming.
language or structure English. It should have the 4. It is easy to write as it is methods that has only
following characteristics: few rules to follow.

www.neerajbooks.com
www.neerajbooks.com

Disadvantages of Pseudo Code (4) Information hiding.


1. A graphic representation is not available. These are explained below:
2. No standard rules to follow in using a pseudo Coupling: It is the measure of degree of
code. independence between modules. Two modules with high
3. For beginners it’s difficult to write a pseudo coupling are strongly interconnected to each other that
code as compared to drawing a flow chart. is they are dependent on each other and the systems
VISUALIZING THE SOLUTION which have these modules are known as “highly coupled
The function oriented problem can be visualized systems” whereas two modules that are independent of
as the functional procedure layers. Here, we will tell at each other are “loosely coupled”. Modules that are
what level what tasks are being performed. The completely independent of each other are called as
functional procedure layers are as follows: “uncoupled”. They are shown diagrammatically below:
1. Functions are built in layers; additional notations
are used to specify details.
2. Level 0
Mention the function or procedure name.
What is its relationship to other system
components (e.g., part of which system, called
by which subroutine, etc.)

Neeraj
A brief description of the function’s purpose
is mentioned.
Author’s name and date is mentioned.
3. Level 1
Here, function parameters are being defined

Publications
(i.e. problem variables, types, purpose, etc.)
Global variables are declared (i.e. problem
variable, type, purpose, sharing information
etc.)
Loosely Coupled Highly Coupled
What routines are called by the functions is

www.neerajbooks.com
mentioned.
Mention the side effects.
Mention all the input/output assertions.
A good design will have low coupling. It is
measured by the number of interconnections between
the modules. It increases with the number of calls
4. Level 2
between modules increases, or the amount of shared
Local data structures (variables etc.)
Timing constraints data increases. High coupled systems will have high
Exceptional handling is done (i.e. conditions, error rate. Loose coupling on the other hand minimizes
responses, events) the interdependence amongst modules. This is achieved
Any other limitation is told. in the following ways:
5. Level 3 Controlling the number of parameters passed
Body is defined (i.e. structured chart, pseudo amongst modules.
code, decision tables, flow charts, etc.) Avoid passing undesired data to calling
CHARACTERISTICS OF A GOOD FUNCTION module.
ORIENTED DESIGN Maintain parent/child relationship between
Some of the characteristics of a good function calling and called module.
oriented design are: Pass data, not the control information.
(1) Cohesion Types of Coupling: There are six types of coupling.
(2) Coupling They are coupled in number of ways depending on two
(3) Function independence procedures A and B:

www.neerajbooks.com
www.neerajbooks.com

1. Data Coupling: The dependency between 4. External Coupling: It is a form of coupling in


module A and B is said to be data coupled if it is based which a module has a dependency to the other module,
on the fact that they communicate by only passing of external to the software being developed or to a
particular type of hardware. It is basically related to the
data and other than that they are independent. A good
communication to the external tools and devices.
strategy is to ensure that no module communication 5. Common Coupling: In this type of coupling,
contains “tramp data”. Module dependency can be the modules have a shared data. Global data areas are
minimized by ensuring only necessary data is being commonly found in programming languages. Making a
communicated between modules. change to the common data means that to go back to all
2. Stamp Coupling: When complete data structure the modules accessing that data and evaluating the effect
is passed from one module to another say from module of change. With this, it is difficult to determine which
module is responsible for having set of variable to a
A to B, stamp coupling occurs. Stamp coupling involves
particular value. How it works is shown below
tramp data that is if one procedure only needs a part of diagrammatically:
a data structure, calling module should pass just that
part and not the complete data structure.
3. Control Coupling: Module A and B are said to
be control coupled if they communicate by passing of
control information. It is accomplished by means of flags
that are set by one module and reacted upon by the

Neeraj
dependent module.

Publications
www.neerajbooks.com
6. Content Coupling: It occurs when module A changes data of module B or when control is passed from one
module to the middle of another. This is shown below:

Module B A

Go to Temp
B C
Module D
E
Go to temp D

Temp

www.neerajbooks.com
www.neerajbooks.com

Cohesion: It is a measure of the degree to which the elements of a module are functionally related. A strong
cohesive module implements functionality that is related to the solution and requires little or no interaction with the
other module. This is shown below:

Neeraj
Cohesion may be viewed as glue that binds the different tasks are combined together because there is a
modules together. The goal is to maximize the module specific order in which the tasks must be completed.
cohesion and minimize the module coupling. Since modules consist of instructions that accomplish
Types of Cohesion several tasks that are virtually unrelated the modules

Publications
There are seven types of cohesion that are described tend to be less maintainable.
between two operations X and Y of a procedure. They 5. Temporal Cohesion: X and Y both must perform
are: around the same time. Temporal cohesion is exhibited
1. Functional Cohesion: X and Y are part of single when it contains tasks that are related by the fact that all
tasks must be executed in the same time span. The set

www.neerajbooks.com
functional task. This is the reason for them to be
contained in the same procedure. This module of functions responsible for initialization, start up
transforms a single input datum into a single output activities or control flags associated with programs
exhibit temporal cohesion.
datum. For example, ‘calculate current GPA’ or
6. Logical Cohesion: X and Y perform logically
‘cumulative GPA’.
similar functions. Thus, logical cohesion occurs in
2. Sequential Cohesion: X outputs some data
modules where instructions that appear to be related
which is the input to Y and for this reason they are fall into the same logical class of functions. Duplication
combined in one procedure. For example, addition of can exist in the logical strength level.
marks of individual subject is treated as the input for 7. Coincidental Cohesion: X and Y are having no
calculating the percentage for preparing the result of other conceptual relationship except for shared code.
students. A component is made of parts that need to Therefore this type of cohesion occurs in modules that
exchange data from one source for different functional contain instructions that have little or no relationship to
purposes. They are together in a component for one another. That is instead of creating two components
communicational convenience. each for one part; only one component is made with
3. Communicational Cohesion: X and Y both two unrelated parts. It is avoided as far as possible.
operate on the same input data or contribute towards Functional Independence: The concept of
the same output data. functional independence is a direct outcome of
4. Procedural Cohesion: X and Y are both modularity and the concepts of abstraction and
structured in same way. Thus procedural cohesion occur information hiding. Refinement techniques enhance
in modules whose instructions in spite performing module independence.

www.neerajbooks.com
www.neerajbooks.com

Functional independence is achieved by This partitioning process can continue further till we
developing modules with “single minded” function and reach a stage where the components are small enough
an “aversion” to excessive interaction with other to be designed separately. This divide and conquer
modules. The software is designed such that each method is essential for handling large projects and all
module addresses a specific sub-function of design methodologies provide methods to partition the
requirements and has a simple interface when viewed problem effectively.
from other parts of the program structure. Such Q. 2. What is abstraction?
independence is important. Software with effective Ans. Abstraction is a concept related to problem
modularity (i.e., independent modules), is easier to partitioning. When it is used during design, the design
develop because function may be compartmentalized activity focuses on one part of the system at a time.
and interfaces are simplified. Independent modules are
Since the part being designed interacts with other parts
easier to maintain (and test) because secondary effects
caused by design/code modification are limited, error of the system, a clear understanding of the interaction
propagation is reduced, and reusable modules are is essential for properly designing the part. An
possible. Thus, functional independence is a key to good abstraction of a system or a part defines the overall
design, and design is the key to software quality. behaviour of the system at an abstract level without
Independence is measured using two qualitative- giving the internal details. While working with a part of
criteria cohension and coupling. Cohesion is a measure the system, a designer needs to understand only the
of the relative functional strength of a module. Coupling abstractions of the other parts with which the part being

Neeraj
is a measure of relative interdependence among the designed interacts. The use of abstraction allows the
modules.
designer to practice the divide and conquer technique
Information Hiding: The concept of modularity
leads every software designer to a fundamental question effectively by focusing on one part at a time, without
: “How do we decompose a software solution to obtain worrying about the details of other parts.
the best set of modules ?” The principle of information Q. 3. Explain DFD along with its use in software

Publications
hiding suggests that modules be “characterized by development?
design decisions that (each) hides from all others.” In Ans. Data Flow Diagram: As data goes through
other words, modules should be specified and designed software, it is modified by a series of transformations.
so that information (procedure and data) contained A Data Flow Diagram (DFD) is a graphical technique
within a module is inaccessible to other modules that

www.neerajbooks.com
that depicts information flow and the transforms that
have no need for such information.
are applied as data move from input to output. The basic
Hiding implies that effective modularity can be
achieved by defining a set of independent modules that form of a data flow diagram is shown in Figure (a). The
communicate with one-another only that information DFD is also known as a data flow graph or a bubble
that is necessary to achieve software function. chart.
Abstraction helps to define the procedural entities that The data flow diagram is used to represent a
comprise the software. Hinding defines and enforces system or software at any level of abstraction. DFDs
access constraints to both procedural detail within a may be partitioned into levels that represent increasing
module and any local data structure by the module. information flow and functional detail. Therefore, the
The use of information hiding as a design criterion DFDs provides a mechanism for functional modeling
for modular systems provides its greatest benefits when
as well as information flow modelling. In so doing, it
modifications are required during testing and later,
during software maintenance. Because most data and satisfies the second operational analysis principle (i.e.,
procedure are hidden from other parts of the software, creating a functional model).
inadvertent errors introduced during modification are A level 0 DFD, also called a fundamental system
less likely to affect other locations within the software. model or a context model, represents the entire software
element as a single bubble with input and output data
indicated by incoming and outgoing arrows,
Q. 1. What is partitioning? Explain briefly.
Ans. A large system cannot be handled as a whole, respectively. Additional processes (bubbles) and
and so for design it is partitioned into smaller systems. information flow paths are presented as the level 0.

www.neerajbooks.com
www.neerajbooks.com

Figure (a) : Information flow refinement

Neeraj
Publications
Figure (b) : Information flow model

A producer or consumer of information that resides outside the bounds

www.neerajbooks.com
of the system to be modelled

A transformer of information (a function) that resides within the bounds


of the system to be modelled.

A data object; the arrowhead indicates the direction of data flow

A repository of data that is to be stored for use by one or more processes;


may be as simple as a buffer or queue or as sophisticated as a relational
database
Figure (c) : Basic DFD notation

DFD is a partitioned to reveal more detail. For example, a level 1 DFD might contain five or six bubbles with
interconnecting arrows. Each of the processes represented at level 1 are sub-functions of the overall system.
The basic notation used in a DFD is shown in Figure (c). A rectangle is used to represent an external entity,
that is, a system element (e.g., hardware, a person, another program) or another system that produces information
for transformation by the software or receives information produced by the software. A circle represents a process
or transform that is applied to data (or control) and changes it in some way. An arrow represents one or more data
items or data objects. All arrows on a data flow diagram are labelled. The double line represents a data store–stored

www.neerajbooks.com
www.neerajbooks.com

information that is used by the software. The simplicity — supplementary information—other information
of DFD notation is one reason why structured analysis about data types, present values (if known),
techniques are the most widely used. restrictions or limitations, etc.
No explicit indication of the sequence of Once a data object or control item name and its
processing is supplied by the diagram. Each of the aliases are entered into the data dictionary consistency
bubbles may be refined or layered to depict more detail. in name can be enforced. That is, if an analysis team
A fundamental model for system P indicates the primary member decides to name derived data item xyz, but xyz
input is A and ultimate output is B. The model is refined already in the dictionary, the CASE tool supporting the
into transforms P1 to P7 information flow continuity is dictionary posts warning to indicate duplicate names.
maintained, that is, input and output to each refinement This improves the consistency of the analysis model
remain the same. This concept, sometimes called and helps to reduce errors.
balancing, is essential for the development of consistent “Where-used/how-used” information is recorded
models. automatically from the flow models. When a dictionary
The data-flow diagram is a valuable graphical tool entry is created, the CASE tool scans DFDs and CFDs
during software requirements analysis. However, its to determine which processes use the data or control
function should not be confused with the flowchart. A information and how it is used. It is one of the most
important benefits of the dictionary.
data-flow diagram depicts information flow without
The data dictionary defines information items
explicit representation of procedural logic (e.g.,
unambiguously. For large computer-based systems the
conditions or loops). It is not a flowchart.

Neeraj
data dictionary grows rapidly in size and complexity.
Q. 4. What do you mean by data dictionary?
In fact, it is extremely difficult to maintain a dictionary
Explain briefly.
manually. For this reason, CASE tools are used.
Ans. The Data Dictionary: The analysis model
Q. 5. List the steps for creating a Data Flow
includes representations of data objects, functions and Diagram?
control. In each representation, data objects and/or Ans. Creating a Data Flow Model: The Data Flow

Publications
control items play a role. An organized approach for Diagram (DFD) helps the software engineer to develop
representing the characteristics of each data object and models of the information domain and functional
control item is done by the data dictionary. domain at the same time. As the DFD is refined into
The data dictionary is a quasi-formal grammar greater levels of detail, the analyst performs an implicit
for describing the content of objects defined during functional decomposition of the system, thereby

www.neerajbooks.com
structured analysis. This important modelling notation
is defined in the following way:
The data dictionary is an organized listing of all
accomplishing the fourth operational analysis principle.
The DFD refinement also results in a corresponding
refinement of data as it moves through the processes
data elements that are pertinent to the system, with pre- that embody the application.
cise, rigorous definitions so that both user and system Guidelines that can help during derivation of a
analyst will have a common understanding of inputs, data-flow diagram are :
outputs, components of stores and (even) intermediate (1) The level 0 data-flow diagram should depict
calculations. the software/system as a single bubble;
Today, the data dictionary is almost always im- (2) Primary input and output should be carefully
plemented as part of a CASE “structured analysis and noted;
design tool.” Although, the format of dictionaries varies (3) Refinement should begin by isolating
from tool to tool, most have the following information: candidate processes, data objects and stores
— name—the primary name of the data or control to be represented at the next level;
item, the data store, or an external entity (4) All arrows and bubbles should be labeled
— alias—other names used for the first entry with meaningful names;
— where-used/how-used—a listing of the proc- (5) Information flow continuity must be
esses that use the data or control items and how maintained from level to level; and
it is used (e.g., input to the process, output from (6) One bubble at a time should be refined.
the process, as a store, as an external entity) Information flow continuity is maintained between
— content description—a notation for represent- levels 0 and 1. The processes represented at DFD level
ing content 1 can be further refined into lower levels.

www.neerajbooks.com
www.neerajbooks.com

The refinement of DFDs continues until each It is possible to write programs that will convert a
bubble performs a simple function, that is, until the given pseudo code language into a given programming
process represented by the bubble performs a function language.
that would be easily implemented as a program compo- Q. 7. What is cohesion?
nent. Cohension, that can used to assess the simplicity Ans. Cohension is natural extension of the
of a given function. information hiding concept. A cohesive module
Q. 6. What is a pseudo code? performs a single task within a software procedure,
Ans. Pseudo code is a detailed yet readable requiring little interaction with procedures being
description of what a computer program or algorithm performed in other parts of a program. Stated simply, a
must do, expressed in a formally-styled natural language cohesive module does just one thing.
Cohension can be shown as a “spectrum” as in
rather than in a programming language. Pseudo code is
Figure. We always strive for high cohension, although
sometimes used as a detailed step in the process of the mid-range of the spectrum is often acceptable. The
developing a program. It allows designers or lead scale of cohesion is non-linear. That is, low-end
programmers to express the design in great detail and cohesiveness is much “worse” than the middle range,
provides programmers a detailed template for the next which is nearly as “good” as high-end cohension. In
step of writing code in a specific programming language. practice, a designer need not be concerned with
Because pseudo code is detailed yet readable, it categorizing cohension in a specific module. Rather, the
can be inspected by the team of designers and overall concept should be understood and low levels of
cohension should be avoided when modules are

Neeraj
programmers as a way to ensure that actual
programming is likely to match the design specifications. designed.
A module that performs a set of tasks that relate
Finding errors in the pseudo code stage is less costly
to each-other loosely, if at all, is termed coincidentally
than finding them later in the development process. Once cohesive. A module that performs tasks that are related
the pseudo code is accepted, it is rewritten using the logically (e.g., a module that produces all output

Publications
vocabulary and syntax of a programming language. regardless of type) is logically cohesive. When a module
Pseudo code is sometimes used in conjunction with contains tasks that are related by the fact that all must
computer-aided software engineering-based be executed within the same span of time, the module
methodologies. exhibits temporal cohesion.

www.neerajbooks.com
* * * * * * * * * * * * * * * * * * * *

Fig. : Cohesion

Moderate levels of cohesion are relatively close cohension and recognize low cohesion so that software
to one-another in the degree of module independence. design can be modified to achieves greater functional
When processing elements of a module are related and independence.
must be executed in a specific order, procedural Q. 8. What is coupling?
cohesion exists. When all processing elements
Ans. Coupling is a measure of interconnection
concentrate on one area of a data structure,
communicational cohesion is present. High cohesion among modules in a program structure. Like cohesion,
coupling may be represented on a spectrum as shown
is characterized by a module that performs one distinct
in Figure (a). Coupling depends on the interface
procedural task.
It is unnecessary to determine the precise level of complexity between modules, the point at which entry
or reference is made to a module, and what data pass
cohesion. Rather it is important to strive for high
across the interface.

www.neerajbooks.com
www.neerajbooks.com

* * * * * * * * * * * * * * * * * * * *

Fig. (a) : Coupling

Neeraj Figure (b) : Types of coupling

Publications
In software design, we strive for lowest possible
coupling. Simple connectivity among modules results
in software that is easier to understand and less prone
is very common in most software designs and is shown
in Figure (b), where a “control flag” (a variable that
controls decisions in a sub-ordinate or superordinate

www.neerajbooks.com
to a “ripple effect” caused when error at one location
and propagate through a system.
module) is passed between modules d and e.
Relatively high levels of coupling occur when
Figure (a) shows examples of different types of modules are tied to an environment external to software.
module coupling. Modules a and d are sub-ordinate to Diagnosing problems in structures with considerable
different modules. Each is unrelated and therefore no common coupling is time-consuming and difficult.
direct coupling occurs. Module c is subordinate to However, this does not mean that the use of global data
module a and is accessed via a conventional argument is necessarily “bad.” It does mean that a software
list through which data are passed. As long as a simple designer must be global data is necessarily “bad.” It
argument list is present (i.e., simple data are passed; a does mean that a software designer must be aware of
one-to-one correspondence of items exists), low potential consequences of common coupling and take
coupling (data coupling on the spectrum) is exhibited special care to guard against them.
in this portion of structure. A variation of data coupling, The highest degree of coupling, content coupling,
called stamp coupling, is found when a portion of a data occurs when one module makes use of data or control
structure is passed via a module interface. This occurs information maintained within the boundary of another
between modules b and a. module. Secondarily, content coupling occurs when
At moderate levels coupling is characterized by branches are made into the middle of a module. This
passage of control between modules. Control coupling mode of coupling can and should be avoided.

www.neerajbooks.com
www.neerajbooks.com

Q. 9. What is Functional Independence? modularity (i.e., independent modules), is easier to


Ans. Functional Independence: The concept of develop because function may be compartmentalized
functional independence is a direct outcome of and interfaces are simplified. Independent modules are
modularity and the concepts of abstraction and easier to maintain (and test) because secondary effects
information hiding. Refinement techniques enhance caused by design/code modification are limited, error
module independence. propagation is reduced, and reusable modules are
Functional independence is achieved by possible. Thus, functional independence is a key to good
developing modules with “single minded” function and design, and design is the key to software quality.
an “aversion” to excessive interaction with other Independence is measured using two qualitative-
modules. The software is designed such that each criteria cohension and coupling. Cohesion is a measure
module addresses a specific sub-function of of the relative functional strength of a module. Coupling
requirements and has a simple interface when viewed is a measure of relative interdependence among the
from other parts of the program structure. Such modules.
independence is important. Software with effective

Neeraj
Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

Object Oriented Design


5
3. Identifying the objects and their attributes.
Object oreinted technique allows users to 4. Identifying the services that each object in
understand the overall environment which they are expected to provide.
attempting to model. Indentifying the components of 5. Establishing inter connections between the
the environment and detailing the relationship that exists objects in terms of services required and services
between them helps to achieve this aim. Object oriented rendered.
models are very useful for understanding problems,

Neeraj
communicating with application experts, modelling
enterprises, preparing documentation and designing
programs.
To describe the system, the OMT methodology uses
three kinds of models–Object Model, Dynamic model

Publications
and Functional model.
In this system, the object model describe the
structure of an object, their identity their relationships
to other objects, their attributes and their operations.
To design a system, the object model provides the

www.neerajbooks.com
essential framework into which the dynamic and
functional model can be placed.
In this chapter, we mainly describe the object
modelling technique which is the part of analysis
system. We also describe the relationship among these
models.

IDENTIFICATION AND SPECIFICATION Problem Understanding: The first step in the


PROBLEM DOMAIN STATIC OBJECTS analysis process is to understand the problem of the user.
Object oriented analysis provides us with a simple, The problem statement should be refined in terms of
powerful mechanism for identifying objects building computer system engineering that could suggest a
block of the software to be developed. The analysis is computer based solution. The problem statement should
basically concerned with the decomposition of a be stated, as far as possible, in a single grammatically
problem into its component parts and establishing a correct sentences. The problem statement provides the
logical model to describe the system functions. basis for drawing the requirements specification of both
The object oriented analysis approach consists of the user and the software.
the following steps: Requirements Specification: Once the problem is
1. Understanding the problem. clearly defined, the next step is to understand what the
2. Drawing the specification of requirements of the proposed system is required to do. It is important at this
user and the software. stage to generate a list of user requirements. A clear

www.neerajbooks.com
www.neerajbooks.com

understanding should exist between the user and the For example, a car can be described as an object
developer of what is required. Based on the user and it has sub-components of which engine is one. The
requirements, the specification for the software should engine can also be described as an object comprised of
be drawn. The developer should state clearly: other objects.
What outputs are required? Classes: A class describes group of objects with
What processes are involved to produce these some properties (data structure or attributes), common
outputs? behaviour (methods or operations) common relation-
What inputs are necessary? ships to other objects and common semantics.
What resources are required? For example, mango, apple and orange are member
These specification often serve as a reference to of the class fruit.
test the final product for its performance of the intended Object Diagrams: The object modelling concept
tasks. basically based on the objects and classes. For
Identification of Objects: Objects can often be describing the concept, we need a formalism for
identified in terms of the real world objects as well as expressing object model that is coherent precise and
the abstract objects. Therefore, the application may be easy to formulate.
analyzed by using one of the following approaches: There are two types of object diagrams:
(i) Data Flow Diagrams (DFD). (i) Class diagram.
(ii) Textual Analysis (TA). (ii) Instance diagram.
Data Flow Diagrams: The application can be

Neeraj
Class Diagram: To describe the classes in a
represented in the form of a data flow diagram indicating graphical notations, we use class diagrams. A class
how the data moves from one point to another is the diagram is a schema pattern, or template for describing
system. many possible instances of data.
Textual Analysis: This approach is based on the
textual description of the problem or proposed solution.

Publications
The description may be one or two sentences or one or
two paragraphs depending on the type and complexity
of the problem.
Identification of Services: Once the object in the
solution space have been identified, the next step is to

www.neerajbooks.com
identify a set of services that each object offer. Services
are identified by examining all the verbs and verb
phrases is the problem description statement.
Working out the Application Logic Objects:
Graphical notations are an essential part of any design Instance Diagram: The graphical representation
and development process and object oriented design is of object of a class can be denoted by instance diagrams.
no exception. We need notations to represent classes An instance diagram describes how a particular set of
objects, sub-classes and their inter-relationships. objects relates to each other.
Objects and Classes: The Object modelling is The OMT symbol for an instance is a rounded box.
based on these two concepts-objects and class. The The class name is parentheses is at the top of the object
objects correspond to real world entities and classes are
box is bold face.
the collection of the similar objects or entities.
Objects: An object is a concept, abstraction or a
real world thing with strict boundaries and meaning for
an applications.
The concept of an object provides two basic
purposes in the system:
The objects provides understanding of the real Links and Association: Links and associations are
worlds. the means for building the relationships among the
The objects provides a practical basis for objects and classes.
computer implementation.

www.neerajbooks.com
www.neerajbooks.com

Links: In the object modelling links provides a (ii) Designing Algorithms: Each operation from
relationship between the objects. These objects or the analysis model must be assigned an algorithm that
instance may be same or different in data structure and implements it clearly and efficiently, according to the
behaviour. optimization goals selected during system design.
For example, Ram works for IBM company. In this The designer of algorithms must:
example, “Works - for” is the link between “Ram” and Choose algorithms that minimize the cost of
“IBM Company”. We can use this example also, Ram inmplementing operations.
is employee of IBM Company. Here, employee is used Define a new internal classes and operation as
as a link between Ram and IBM Company. neccassry.
Select data structures appropriate to the
algorithms.
(iii) Design Optimization: We optimize the model
Associations: The object modelling describes as a which is made with the help of system design and
group of links with common structure and common analysis. During the design optimization, the designer
semantics. All the links among the object are the forms must:
of association among the same classes. Add redudant associations to minimize access
For example, Ram works for IBM Company here cost and maximize convenicence of accessing.
Ram is an object of person class and IBM Company is Rearrange the computation for greater
the object of Company class and here the relationship efficiency and rearrange the order of execution

Neeraj
called links. of appropriate algorithm.
(iv) Design of Associations: Association provides
access paths between objects. There are conceptual
entities useful for modelling and analysis. Association
subsume many implementation technique under a single
But ‘Person works for company’ in this example.

Publications
uniform notation during analysis but they can be
Person and company both are classes, thus, the implemented as painters with in objects or distinct
relationship between them is called association. objects depending on their access patterns.
Aggregation: The aggregation is an extention of (v) Object Representation: Classes can be defined
association mean aggregation is a strong form of Interms of other classes, but everything must be

www.neerajbooks.com
association in which an aggregate object is made of implemented in terms of built in primitive data types.
components. Components are part of the aggregate. Thus Supplied by the programming language. Some classes
aggregation is the “part-whole” or “a-part of” can be combined.
relationships. For eg., keyboard is a part of computer (vi) Physical Packaging: Programs are mode of
or we can say keys are part of keyboard. discreate physical units that can be edited, compiled,
IDENTIFICATION OF NECESSARY imported or otherwise manipulated. Object oriented
UTILITY OBJECTS languages have various degrees of packaging.
The object design phase determines the full Packaging involves the following issues:
definitions of the classes and associations used in the Hiding internal information from outside view.
implementation, as well as the interfaces the algorithms Coherence of entities.
of the methods used to inplement operations. The object Constructing physical modules.
design phase adds internal objects for implementation METHODOLOGY OF IDENTIFICATION
and optimize data structure and algorithms. OF OBJECTS
During the object design phase, the designer must There are several popular software engineering
perform the following steps for identification for utility approaches for developing the softwares. The current
objects: object oriented design methodologies are subjective and
(i) Grouping the Three Models: After completion informal. These methodologies suggest a few guidelines,
of analysis phase, we have the three models: Object leaving the exact application of the design procedure
Model, Dynamic Model and Functional Model but the largely to the discretion of the designer.
object is the main framework around which the design (i) A Generic Object Oriented Development
is constructed. Paradigm: Identification of objects and their attributes

www.neerajbooks.com
www.neerajbooks.com

is the first step in any object oriented design approach. Multiple Attributes: Usually objects have multiple
Our generic object oriented program development attributes and support multiple methods. It is very rare
paradigm consists of the following main steps: to find useful objects which store only a single data
1. Develop an informal solution strategy by element or support only a single method because an
studying the problem description. object having only a single data element or method is
2. Identify the different objects and functions usually implemented as the part of another object.
needed to implement the system by analyzing the Common Operations: A set of operations can be
extended problem description. defined for the potential objects. If these operations
3. Map the methods identified in step to appropriate apply to all occurrences of the object then we can define
objects. a class. An attribute or operation defined for a class
4. Identify the data associated with each of the must apply to each instances of the class. If some of the
identified objects. attributes or operations apply only to some specific
5. Determines the class hierarchies. instances of the class, then we need to have one or more
6. Identify other relationship existing among objects sub-classes for these special objects.
such as reference composition and association. CASE STUDIES
7. Determine how the client classes will use the The software to be designed will control a simulated
services of the server class i.e. specify the object Automated Teller Machine (ATM) having a magnetic
interfaces. stripe reader for reading an ATM card, a customer
8. Representation the design using a popular console (keyboard and display) for interaction with the

Neeraj
graphical relation. customer, a slot for depositing envelopes, a dispenser
9. Implement all objects. for cash (in multiples of $ 20), a printer for printing
10. All objects of the systems are integrated and customer receipts, and a key-operated switch to allow
the system is tested against its requirements. an operator to start or stop the machine. The ATM will
(ii) Object Identification: One of the most communicate with the bank’s computer over an
appropriate communication link. (The software on the

Publications
important steps in any object oriented design
methodology is the identification of objects infact the latter is not part of the requirements for this problem.)
quality of the final design depends to a great extent on The ATM will service one customer at a time. A
the appropriateness of the object identified. However, customer will be required to insert an ATM card and
enter a Personal Identification Number (PIN) – both of
no formal methodology exists for identification of

www.neerajbooks.com
which will be sent to the bank for validation as part of
objects. These can be classified into the following broad
each transaction. The customer will then be able to
classes:
perform one or more transactions. The card will be
Grammatical analysis of the problem
retained in the machine until the customer indicates that
description.
he/she desires no further transactions, at which point it
Derivation from data flow.
will be returned – except as noted below:
Derivation from the entity relationship diagram.
The ATM must be able to provide the following
The identification approaches based on derivation
services to the customer:
from the data flow diagram and entity relationship model
1. A customer must be able to make a cash
are still being evolved.
withdrawal from any suitable account linked to the card,
(iii) Booch’s Object Identification Method: in multiples of $ 20.00. Approval must be obtained from
Booch’s object identification requires a processing the bank before cash is dispensed.
narrative of the given problem to be first developed. 2. A customer must be able to make a deposit to
The processing narrative describes the problem and any account linked to the card, consisting of cash and/
discusses how it can be solved. The objects are identified or checks in an envelope. The customer will enter the
by noting down the nouns in the processing narrative. A amount of the deposit into the ATM, subject to manual
potential object found after lexical analysis is usually verification when the envelope is removed from the
considered legitimate only if it satisfies the following machine by an operator. Approval must be obtained from
criteria: the bank before physically accepting the envelope. A
Retained Information: Some information about customer must be able to make a transfer of money
the object should be remembered for the system to between any two accounts linked to the card.
function.

www.neerajbooks.com
www.neerajbooks.com

A customer must be able to make a balance inquiry The ATM will provide the customer with a printed
of any account linked to the card. A customer must be receipt for each successful transaction, showing the date,
able to abort a transaction in progress by pressing the time, machine location, type of transaction, account(s),
Cancel key instead of responding to a request from the amount and ending and available balance(s) of the
machine. affected account (“to” account for transfers).
The ATM will communicate each transaction to the The ATM will have a key-operated switch that will
bank and obtain verification that it was allowed by the allow an operator to start and stop the servicing of
bank. Ordinarily, a transaction will be considered
customers. After turning the switch to the “on” position,
complete by the bank once it has been approved. In the
the operator will be required to verify and enter the total
case of a deposit, a second message will be sent to the
bank indicating that the customer has deposited the cash on hand. The machine can only be turned off when
envelope. (If the customer fails to deposit the envelope it is not servicing a customer. When the switch is moved
within the time-out period, or presses cancel instead, to the “off” position, the machine will shut down, so
no second message will be sent to the bank and the that the operator may remove deposit envelopes and
deposit will not be credited to the customer.) reload the machine with cash, blank receipts, etc.
If the bank determines that the customer’s PIN is The ATM will also maintain an internal log of
invalid, the customer will be required to re-enter the transactions to facilitate resolving ambiguities arising
PIN before a transaction can proceed. If the customer from a hardware failure in the middle of a transaction.
is unable to successfully enter the PIN after three tries, Entries will be made in the log when the ATM is started

Neeraj
the card will be permanently retained by the machine, up and shut down, for each message sent to the Bank
and the customer will have to contact the bank to get it (along with the response back, if one is expected), for
back. If a transaction fails for any reason other than an the dispensing of cash, and for the receiving of an
invalid PIN, the ATM will display an explanation of the envelope. Log entries may contain card numbers and
problem, and will then ask the customer whether he/she dollar amounts, but for security will never contain a PIN.
wants to do another transaction.

Publications
Use Cases for Example ATM System

www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

Initial Functional Test Cases for Example ATM System: The following initial test cases can be identified
early in the design process as a vehicle for checking that the implementation is basically correct. No attempt has
been made at this point to do thorough testing, including all possible errors and boundary cases. That needs to come
later. These cases represent an initial check that the functionality specified by the use cases is present.
Some writers would argue for developing test cases like these in place of use cases. Here, they are presented as
a vehicle for “fleshing out” the use cases, not as a substitute for them.

Use Case Function Being Initial System Input Expected Output


Tested State
System System is started System is off Activate the “on” System requests initial
Startup when the switch is switch cash amount
turned “on”
System System accepts System is
Startup initial cash amount requesting cash Enter a legitimate System is on
amount amount
System Connection to the System has just Perform a System output should
Startup bank is established been turned on legitimate inquiry demonstrate that a
transaction connection has been

Neeraj
established to the bank
System System is shut- System is on Activate the “off” System is off
Shutdown down when the and not switch
switch is turned servicing a
“off” customer
System Connection to the System has just Verify from the bank

Publications
Shutdown bank is terminated been shutdown side that a connection to
when the system is the ATM no longer
shut down exists
Session System reads a System is on Insert a readable Card is accepted;

www.neerajbooks.com
customer’s ATM and not card System asks for entry of
card servicing a PIN
customer
Session System rejects an System is on Insert an Card is ejected;
unreadable card and not unreadable card System displays an
servicing a error screen;
customer System is ready to start
a new session
Session System accepts System is Enter a PIN System displays a menu
customer’s PIN asking for entry of transaction types
of PIN
Session System allows System is Perform a System asks whether
customer to displaying transaction customer wants another
perform a menu of transaction
transaction transaction
types
Session System allows System is Answer yes System displays a menu
multiple asking whether of transaction types
transactions in one customer wants
session another
transaction

www.neerajbooks.com
www.neerajbooks.com

Use Case Function Being Initial System Input Expected Output


Tested State
Session Session ends when System is asking Answer no System ejects card and is
customer chooses whether customer ready to start a new
not to do another wants another session
transaction transaction
Transaction Individual types of
transaction will be
tested below
Transaction System handles an A readable card Enter an incorrect The Invalid PIN Extension
invalid PIN has been entered PIN and then is performed
properly attempt a transaction
Withdrawal System asks Menu of Choose withdrawal System displays a menu of
customer to choose transaction types transaction account types
an account to is being
withdraw from displayed
Withdrawal System asks Menu of account Choose checking System displays a menu of

Neeraj
customer to choose types is being account possible withdrawal
a dollar amount to displayed amounts
withdraw
Withdrawal System performs a System is Choose an amount System dispenses this
legitimate displaying the that the system amount of cash;

Publications
withdrawal menu of currently has and System prints a correct
transaction withdrawal which is not greater receipt showing amount
properly amounts than the account and correct updated
balance balance; System records
transaction correctly in the

www.neerajbooks.com
log (showing both
message to the bank and
approval back)

Withdrawal System verifies that System has been Choose an amount System displays an
it has sufficient cash started up with greater than what the appropriate message and
on hand to fulfill the less than the system currently has asks customer to choose a
request maximum Choose an amount different amount
withdrawal that the system
amount in cash currently has
on hand;
System is
requesting a
withdrawal
amount

www.neerajbooks.com
www.neerajbooks.com

Use Case Function Being Initial System Input Expected Output


Tested State
Withdrawal System verifies that System is Choose an amount System displays an
customer’s balance requesting a that the system appropriate message
is sufficient to fulfil withdrawal currently has but and offers customer the
the request amount which is greater option of choosing to do
than the account another transaction or
balance not.
Withdrawal A withdrawal System is Press “Cancel” key System displays an
transaction can be displaying menu appropriate message
cancelled by the of account types and offers customer the
customer any time option of choosing to do
prior to choosing the another transaction or
dollar amount not.
Withdrawal A withdrawal System is Press “Cancel” key System displays an
transaction can be displaying menu appropriate message
cancelled by the of dollar and offers customer the
customer any time amounts option of choosing to do

Neeraj
prior to choosing the another transaction or
dollar amount not.
Deposit System asks Menu of Choose deposit System displays a menu
customer to choose transaction types transaction of account types
an account to deposit is being

Publications
to displayed
Deposit System asks Menu of account Choose checking System displays a
customer to enter a types is being account request for the customer
dollar amount to displayed to type a dollar amount

www.neerajbooks.com
deposit
Deposit System asks System is Enter a legitimate System requests that
customer to insert an displaying a dollar amount customer insert an
envelope request for the envelope
customer to type
a dollar amount
Deposit System performs a System is Insert an envelope System accepts
legitimate deposit requesting that envelope;
transaction properly customer insert System prints a correct
an envelope receipt showing amount
and correct updated
balance; System records
transaction correctly in
the log (showing
message to the bank,
approval back, and
acceptance of the
envelope)

www.neerajbooks.com
www.neerajbooks.com

Use Case Function Being Initial System Input Expected Output


Tested State
Deposit A deposit transaction System is Press “Cancel” key System displays an
can be cancelled by displaying menu appropriate message
the customer any time of account types and offers customer the
prior to inserting an option of choosing to
envelope do another transaction
or not.
Deposit A deposit transaction System is Press “Cancel” key System displays an
can be cancelled by requesting appropriate message
the customer any time customer to enter and offers customer the
prior to inserting an a dollar amount option of choosing to
envelope do another transaction
or not.
Deposit A deposit transaction System is Press “Cancel” key System displays an
can be cancelled by requesting appropriate message
the customer any time customer to and offers customer the
prior to inserting an insert an option of choosing to

Neeraj
envelope envelope do another transaction
or not.
Deposit A deposit transaction System is Wait for the request System displays an
is cancelled requesting to time out appropriate message
automatically if an customer to insert and offers customer the

Publications
envelope is not an envelope option of choosing to
inserted within a do another transaction
reasonable time or not.

Transfer System asks customer Menu of Choose Transfer System displays a

www.neerajbooks.com
to choose an account
to transfer from
transaction types
is being
displayed
transaction menu of account types
specifying transfer
from
Transfer System asks customer Menu of account Choose checking System displays a
to choose an account types to transfer account menu of account types
to transfer to from is being specifying transfer to
displayed
Transfer System asks customer Menu of account Choose savings System displays a
to enter a dollar types to transfer account request for the
amount to transfer to is being customer to type a
displayed dollar amount
Transfer System performs a System is Enter a legitimate System prints a correct
legitimate transfer displaying a dollar amount receipt showing
transaction properly request for the amount and correct
customer to type updated balance;
a dollar amount System records
transaction correctly in
the log (showing both
message to the bank
and approval back)

www.neerajbooks.com
www.neerajbooks.com

Use Case Function Being Initial System Input Expected Output


Tested State
Transfer A transfer transaction System is Press “Cancel” key System displays an
can be cancelled by the displaying menu appropriate message
customer any time prior of account types and offers customer
to entering dollar specifying the option of choosing
amount transfer from to do another
transaction or not.
Transfer A transfer transaction System is Press “Cancel” key System displays an
can be cancelled by the displaying menu appropriate message
customer any time prior of account types and offers customer
to entering dollar specifying the option of choosing
amount transfer to to do another
transaction or not.
Transfer A transfer transaction System is Press “Cancel” key System displays an
can be cancelled by the requesting appropriate message
customer any time prior customer to enter and offers customer
to entering dollar a dollar amount the option of choosing

Neeraj
amount to do another tran-
saction or not.
Inquiry System asks customer Menu of Choose Inquiry System displays a
to choose an account to transaction types transaction menu of account types
inquire about is being displayed

Publications
Inquiry System performs a System is Choose checking System prints a correct
legitimate inquiry displaying menu account receipt showing
transaction properly of account types correct balance;
System records

www.neerajbooks.com
transaction correctly
in the log (showing
both message to the
bank and approval
back)
Inquiry An inquiry transaction System is Press “Cancel” key System displays an
can be cancelled by the displaying menu appropriate message
customer any time prior of account types and offers customer
to choosing an account the option of choosing
to do another
transaction or not.
Invalid PIN Customer is asked to re- Enter an incorrect Customer is asked to
Extension enter PIN PIN; re-enter PIN
Attempt an inquiry
transaction on the
customer’s check-
ing account
Invalid PIN Correct re-entry of PIN Request to re- Enter correct PIN Original transaction
Extension is accepted enter PIN is being completes successfully
displayed

www.neerajbooks.com
www.neerajbooks.com

Use Case Function Being Initial System Input Expected Output


Tested State
Invalid PIN A correctly re-entered An incorrect PIN Perform another This transaction
Extension PIN is used for has been re- transaction completes successfully
subsequent tran- entered and as well
sactions transaction
completed
normally
Invalid PIN Incorrect re-entry of Request to re- Enter incorrect PIN An appropriate message
Extension PIN is not accepted enter PIN is being is displayed and re-entry
displayed of the PIN is again
requested
Invalid PIN Correct re-entry of Request to re- Enter incorrect PIN Original transaction
Extension PIN on the second try enter PIN is being the first time, then completes successfully
is accepted displayed correct PIN the
second time
Invalid PIN Correct re-entry of Request to re- Enter incorrect PIN Original transaction

Neeraj
Extension PIN on the third try is enter PIN is being the first time and completes successfully
accepted displayed second times, then
correct PIN the
third time
Invalid PIN Three incorrect re- Request to re- Enter incorrect PIN An appropriate message

Publications
Extension entries of PIN result in enter PIN is being three times is displayed;
retaining card and displayed Card is retained by
aborting transaction machine;
Session is terminated

www.neerajbooks.com
Analysis Classes: An initial reading of the use cases suggests that the following will be part of the system:
A controller object representing the ATM itself (managing the boundary objects listed below.)
Boundary objects representing the individual component parts of the ATM:
Operator panel.
Card reader.
Customer console, consisting of a display and keyboard.
Network connection to the bank.
Cash dispenser.
Envelope acceptor.
Receipt printer.
Controller objects corresponding to use cases. (Note: class ATM can handle the Startup and Shutdown use
cases itself, so these do not give rise to separate objects here.)
Session.
Transaction (abstract generalization, res-ponsible for common features, with concrete specializations
responsible for type-specific portions).
An entity object representing the information encoded on the ATM card inserted by customer.
An entity object representing the log of transactions maintained by the machine.
This leads to the following diagram of analysis classes:

www.neerajbooks.com
www.neerajbooks.com

Neeraj
State Charts for Example ATM System: Three
of the objects we have identified have behaviour that is
sufficiently complex to warrant developing a State Chart
for them. (These are the objects that were identified as
the major controller objects.)
The object representing the machine itself

Publications
(responsible for the System Startup and
Shutdown use cases).
Objects representing a customer session (one
per session) (responsible for the Session use

www.neerajbooks.com
case).
Objects representing an individual transaction
(one per transaction) (responsible for the
Transaction use case, use cases for the specific
types of transaction and Invalid PIN extension).

www.neerajbooks.com
www.neerajbooks.com

Probably the best way to start using these pages is each class. The CRC cards could be created by
to begin with the requirements and work through the “walking through” each use case, assigning the
entire analysis, high-level design and detailed design responsibility for each task to some class.
process. There is a sequence diagram for each use case,
1. Begin with the Requirements and User showing how the use case is realized by
Interface Document: The first task that must be interaction of the major objects.
performed in any project is clearly understanding the A class diagram shows how the various classes
requirements. This series of pages starts with a statement are related to one another. It also shows several
of the overall requirements for the software, without additional classes that were “discovered” during
attempting to discuss the process of actually arriving at the process of creating the sequence diagrams
them. For a problem of this size, identifying the – i.e. classes needed to actually build the system,
requirements is fairly straightforward. In a real system, though not evident in the original analysis. On
however, identifying the requirements will generally be this diagram, the class icon is linked to a detailed
a non-trivial task. That, however, is not the focus of this design for that class.
set of pages. 4. Detailed design is done by using a detailed UML
2. Then view the Use Cases and Further diagram for each class, showing its attributes and
Analysis: Analysis is begun by identifying the use cases operations. As noted above, although, I have not
that follow from the requirements, and detailing a flow included the actual implementation in Java code, I have
of events for each. Further analysis identifies the key included the Javadoc documentation for the classes to

Neeraj
classes that are suggested by the use cases, and considers
“flesh out” the information in the UML diagrams.
how each use case can be carried out by an interaction
5. A demonstration executable version of the the
between objects belonging to these classes:
system, in the form of a Java Applet. This version is
The Use Case document has a use case
limited, because the Java mechanisms to protect against
diagram and a series of flows of events, one for
malicious code limit access to the file system on the
each use case. Each use case also has a link to a

Publications
Sequence Diagram (part of the Design phase) host computer. For this reason, it is not possible to use
which shows how it is realized; these links can the “Open”, “Save”, or “Save As” features of the
be followed while studying the design phase to demonstration – attempting to do so will result in an
see how the analysis phase flows into the design error dialog.
phase. 6. No actual code or complete executable version

www.neerajbooks.com
The Further Analysis document deals with both of this system is provided. The ATM Example System
the “big picture” and the details of the various does provide both of these; but since I use the
use cases. The former is provided by an Analysis implementation of this system as a programming project,
Class Diagram, with each class having a link to putting the code online would make the project just a
its CRC card; the latter by a discussion of how bit too simple!)
the key objects objects would need to interact 7. A page of maintenance ideas suggests changes
in order to implement the use case. that might be made to improve the system. These
These two documents represent two different ways changes would necessarily involve modifying many of
of viewing the overall system, which continue into the the sample documents, not just modifying code.
next phase. The use case document presents a use-case
centric view of the system, focussing on the specific
functions it provides. The further analysis document Q. 1. What do you mean by “Role Names”?
presents a class centric view of the system, focussing Ans. A role is one end of an association. A binary
on how will be built. association has two roles, each of which may have a
3. This example uses CRC Cards and Sequence role name. A role name is a name that uniquely identifies
Diagrams for high level Design: There are certainly one end of an association.
other tools that might be used – e.g. the ATM Example For e.g.
referred to above makes use of Collaboration Diagrams
and State Charts as well.
The responsibilities of each class that arise from
the use cases are recorded on a CRC card for

www.neerajbooks.com
www.neerajbooks.com

This example shows how person and company


participate in association “works for”. A person assumes
the role of “Employee” with respect to a company. A
company assumes the role of “Employees” with respect
to a person.
Role names are neccessary for asssociations
between two objects of the same class. For example, Q. 2. Object classes are given below. Draw a
“Manager” and “Worker’ distinguish the two employee object diagram you can use association names,
participating in the managers association in person class.attributes name.
Object classes, files system, file, directory, file name, ASCII file, executable file, directory file, disk
drive, etc.
Ans.

Neeraj
Publications
www.neerajbooks.com
Q. 3. Prepare an object diagram for the dining Q. 4. What is relationship and difference
philosopher’s problem. There are 5 philosophers between OOA (Object Oriented Analysis) and OOD
and 5 forks around a circular table. Each (Object Oriented Design)?
philosopher has access to 2 forks on either side. Each Ans. Pure object oriented development requires that
fork is shared by 2 philosophers. Each fork may be object oriented techniques be used during the analysis,
either on the table or in use by one philosopher. A design and implementation of the system. However,
philosopher must have 2 forks to eat. much of the focus of the object oriented approach to
Ans. Object Diagram to philosopher’s Problem software development has been OOA and OOD.
The fundamental differences between OOA & OOD
is that, the OOA deals with the problem domain, while
OOD deals with the solution domain.
The similarity of OOA and OOD is basic contracts
i.e. object and classes. The objectives of path OOA and
OOD is to model some domain frequently the OOA and
OOD methodologies and the representations look quite
similar.

www.neerajbooks.com
www.neerajbooks.com

because these data structures are well-documented in


textbooks and are taught in computer science courses.
The study of design patterns will have a similar (but
more profound) effect by allowing designers to say
“composite pattern” or “observer pattern” in a particular
design context, without having to describe all classes,
relationships, and collaborations which make up the
pattern. Patterns raise the level of abstraction when
discussing and documenting software designs.
Q. 7. How do I document a design pattern?
Q. 5. What is a software design pattern? Ans. A pattern description must address the
Ans. A design pattern is a solution to a general following major points:
software problem within a particular context. Pattern Name and Classification: A short,
Context: A recurring set of situations where the meaningful name for the pattern, usually only
pattern applies. one or two words. Names provide a vocabulary
Problem: A system of forces (goals and for patterns, and they have implied semantics –
constraints) that occur repeatedly in this context. choose names carefully. Following the GoF
Solution: A description of communicating book, we can also group patterns into higher

Neeraj
objects and classes (collaboration) that can be level classifications such as creational,
applied to resolve those forces. structural, and behavioural patterns.
Design patterns capture solutions that have evolved Problem: A general description of the problem
over time as developers strive for greater flexibility in context and the goals and constraints that occur
their software. Whereas class libraries are reusable repeatedly in that context. A concrete
motivational scenario can be used to help

Publications
source code and components are reusable packaged
objects, patterns are generic, reusable design describe the problem. The problem description
descriptions that are customized to solve a specific should provide guidance to assist others in
problem. The study of design patterns provides a recognizing situations where the pattern can be
common vocabulary for communication and applied.

www.neerajbooks.com
documentation, and it provides a framework for Solution: The classes and/or objects that
evolution and improvement of existing patterns. participate in the design pattern, their structure
Q. 6. Why is the study of patterns important? (e.g., in terms of a UML class diagram), their
Ans. As initial software designs are implemented responsibilities and their collaborations. The
and deployed, programmers often discover solution provides an abstract description that
improvements which make the designs more adaptable can be applied in many different situations.
to change. Design patterns capture solutions that have Sample Code in an object-oriented language can
evolved over time as developers strive for greater be used to illustrate a concrete realization of
flexibility in their software, and they document the the pattern.
solutions in a way which facilitates their reuse in other, Consequences: A discussion of the results and
possibly unrelated systems. Design patterns allow us to tradeoffs of applying the pattern. Variations and
reuse the knowledge of experienced software designers. language-dependent alternatives should also be
Moreover, the study of design patterns provides a addressed.
common vocabulary for communication and Known Uses: Examples of the pattern in real
documentation and it provides a framework for systems. Look for applications of the pattern in
evolution and improvement of existing patterns. As an language libraries and frameworks, published
analogy, consider that during a discussion among system descriptions, text books, etc. Not every
programmers, the words “stack” and “tree” can be used good solution represents a pattern. A general
freely without explanation. Software developers rule of thumb is that a candidate pattern (also
understand fundamental data structures such as a “stack” called a “proto-pattern”) should be discovered

www.neerajbooks.com
www.neerajbooks.com

in a minimum of three existing systems before The solution offered by the GoF would look something
it can rightfully be called a pattern. like the following when coded in Java.
The following quote by Robert Martin highlights public class Singleton
the importance of providing pattern descriptions: “The {
revolutionary concept of the GoF book is not the fact private static Singleton instance = null;
that there are patterns; it is the way in which those public static Singleton getInstance()
patterns are documented. ... Prior to the GoF book, the {
only good way to learn patterns was to discover them in if (instance == null)
design documentation, or (more probably) code.” instance = new Singleton();
Q. 8. What is an example of a design pattern? return instance;
Ans. Following the lead of the “Gang of Four” }
(GoF), design pattern descriptions usually contain
multiple sections including: protected Singleton() { ... }
Intent // possibly another constructor form
Motivation
public void someMethod() { ... }
Applicability
Structure //... other methods
Participants }

Neeraj
Collaborations The programmer would access the single instance
Consequences of this class by writing something similar to
Implementation
Sample Code Singleton.getInstance().someMethod()
Known Uses or similar to
Related Patterns.

Publications
A complete discussion of even a small pattern is Singleton s = Singleton.getInstance();
beyond the scope of a simple FAQ entry, but it is possible s.method1();
to get the idea by examining an abbreviated discussion ...
of one of the simplest and most easily understood s.method2();

www.neerajbooks.com
patterns. Consider the singleton pattern, whose intent Q. 9. What are the differences between analysis
reads as follows: patterns and design patterns?
Intent: Ensure that a class has one instance, and Ans. Analysis pattern are for domain architecture,
provide a global point of access to it. and design pattern are for implementation mechanism
Almost every programmer has encountered this for some aspect of the domain architecture. In brief,
problem and formulated an approach for solving it in a analysis pattern are more high level and more (end-user)
general way – some solutions are better than others. functional oriented.

www.neerajbooks.com
www.neerajbooks.com

Testing Techniques
6
errors exist in the software product. In this process, we
A testing technique specifies the strategy used in execute a program with a set of given inputs and record
testing to select input test cases and analyze test results. the outputs. These are then matched with the expected
Different techniques reveal different quality aspects of outputs, if the actual output and the expected output
a software system, and there are two major categories match with each other then the software product is said
of testing techniques, functional and structural. to behave in the expected manner otherwise some error

Neeraj
Functional Testing: The software programme or exist in the program which need to be located and
system under test is viewed as a “black box”. The corrected. It is an important but expensive process. If
selection of test cases for functional testing is based on we launch a software product without testing then the
the requirement or design specification of the software cost will potentially be much higher than the cost of
entity under test. Examples of expected results testing the software, especially in systems in which

Publications
sometimes are called test oracles, include requirement/ human safety is involved. Thus, testing the software plays
design specifications, hand calculated values and an important role. Even if the software product
simulated results. Functional testing emphasizes on the undergoes the testing process.
external behaviour of the software entity. One popular equation of software testing is:
Software Testing = Software Verification +

www.neerajbooks.com
Structural Testing: The software entity is viewed
as a “white box”. The selection of test cases is based on Software Validation.
the implementation of the software entity. The goal of As per IEEE definition:
selecting such test cases is to cause the execution of Software Verification: “It is the process of
specific spots in the software entity, such as specific evaluating a system or component to determine whether
statements, programme branches or paths. The expected the product of a given development phase satisfy the
results are evaluated on a set of coverage criteria. conditions imposed at the start of that phase.”
Examples of coverage criteria include path coverage, This means that it is a process of confirming that
branch coverage, and data-flow coverage. Structural software meets its specification.
testing emphasizes on the internal structure of the Software Validation: “It is the process of
software entity. evaluating a system or component during or at the end
of development process to determine whether it satisfies
the specified requirements. It involves executing the
SOFTWARE TESTING actual software. It is computer based testing process.”
Software testing is the process of testing the This means that it is a process of conforming that
software product. Thus, testing is the process of software meets the customer’s requirements.
executing a program with intent to find errors. This Some terminologies that will be studied in this
means while we are testing a software product we are chapter are:
locating the errors in the software product. Thus, testing Error, Mistake, Bug, Fault and Failure:
will not show the absence of errors but will show that People make error. A good synonym is mistake.

www.neerajbooks.com
www.neerajbooks.com

This may be syntax error or misunderstanding Test, Test Case and Test Suite: Testing is
of the specifications. Sometimes, there are concerned with errors, faults, failures and
logical errors. When mistakes are made while incidents. A test is the act of exercising
coding then these mistakes are called bugs. software with test cases. A test has two goals-
Errors tend to propagate from one level to to find failures or to demonstrate correct
another. Requirement errors are magnified in execution.
design phase and amplified still more in the Test case describes an input description and an
coding. expected output description. It has an identity and is
An error may lead to one or more fault. A missing associated with the program behaviour. During testing
or incorrect statement in a program resulting from an the preconditions are set and the required inputs are
error is a fault. It is a representation of error, where given to the program. Execute the program. Compare
representation is the mode of expression, narrative text, the observed output with the expected output of the
etc. Defect is a good synonym for fault. program. If the expected and observed outputs are
Failure occurs when a fault in the program gets different then there is a failure which should be recorded
executed. properly in the test case with the cause of the error. If
So, Error (or mistake or bug)  Fault (or Defect) both are same then the program behaved in the expected
 Failure manner. The template for a test case is as follows:
Test Case ID:

Neeraj
Section- 1 Section- 2
(Before Execution) (After Execution)
Purpose: Execution History:
Pre condition: (if any) Result:
Inputs: If fails, any possible reason (Optional):

Publications
Expected Outputs: Any other observation:
Post conditions: Any suggestion:
Written by: Run by:
Date: Date:

www.neerajbooks.com
Test suite is a collection of test cases that is used
for validating bug fixes within a logical or physical area
of a product.
this level is dependent on time. Simply specifying a
reliability number (such as 0.98) is not meaningful until
a time period is specified. A proper specification could
Alpha Testing, Beta Testing and Acceptance be that the reliability for a ten hour operation should be
Testing: Acceptance testing is done when the 0.981. Reliability can also be defined in terms of Mean
software is to be developed for a specific Time To Failure (MTTF), which specifies the average
customer. A series of tests are conducted to time between the occurrences of two failures. If a
enable the customer to validate all reliability function is given, the MTTF can be obtained
requirements. The discovered errors will be from the function.
fixed and better quality software will be The goal of all Verification and Validation (V&V)
delivered to the customer. Alpha and beta activities is to make software more reliable. In software,
testing are done for a product for anonymous unreliability is caused by the presence of faults. The
customer. Alpha testing is done by the customer fewer the faults in a software, the less likely is that a
at the developer’s site whereas beta testing is failure will occur during execution. This is unlike other
done by customers at their sites. engineering disciplines where failures are often caused
Software Reliability is the probability that due to “wear and tear”; faults are the only cause of
software will not undergo a failure for a specified time unreliability. Most of the V&V activities can be
under specified conditions. Reliability is essentially the classified as static or dynamic. Static methods are where
level of confidence one can place in the software and the behaviour of the system is not observed by executing

www.neerajbooks.com
www.neerajbooks.com

the system. Examples of static methods are reviews, 1. Unit Testing: In this type of testing, different
program proving and code reading. In all these cases modules are tested against the specifications produced
the system to be verified is not executed. In dynamic during design for the modules. Unit testing is essentially
methods, the behaviour of the system is observed by for verification of the code produced during the coding
executing the system. The prime example of this method phase and hence the goal is to test the internal logic of
is testing. That is why testing is sometimes called the modules.
dynamic testing. Both types of methods take different 2. Integrated Testing: In this type of testing, many
approaches for improving software reliability. tested modules are combined into sub-systems which
During the testing process, only failures are are then tested. The goal here is to see if the modules
observed, by which the presence of faults is deduced. can be integrated properly, the emphasis being on testing
The actual faults are identified by separate activities, interfaces between modules. This testing activity can
commonly referred to as “debugging”. This one of the be considered as testing the design and hence the
reasons why testing is an expensive method for emphasis on testing module interactions.
identification and removal of faults, as compared to 3. System Testing: The reference document for this
static methods which directly observe faults. The process is the requirements document and the goal is to
specifications of a system often specify many properties, see if the software meets its requirements. This is
although, some are considered more important than essentially a validation exercise and in many cases is
others. If a failure that violates a less important property,

Neeraj
the only validation activity.
it is considered more severe than a failure that violates
Functional Testing: It is also known as Black Box
a less important property. To capture this concept of
testing. The term black box refers to the software which
severity of failures, often error-classifications is used,
is treated as a black box. Here testing is based on the
in which errors or faults are classified according to the
functionality of the software program. Thus, functional
type and severity of failures they cause.

Publications
testing refers to testing, which involves observation of
Testing is the major quality control measure
the output for certain input values. The code is not
employed during software development. Its basic
considered in functional testing. The internal structure
function is to detect errors in the software. This phase
of the program is ignored. Functionality of black box is
has to uncover errors during the coding, but also errors
understood completely in terms of inputs and outputs

www.neerajbooks.com
introduced during the previous phases. The goal of
as shown below:
testing is to uncover requirement, design and coding
errors in the programs. The starting point is off-course
the unit testing, but gradually the modules are integrated
into sub-systems and are then subjected to the integration
testing. After the system is ready, the system testing is
performed. The whole of the system is tested against
the system requirements. Finally, the acceptance testing There are a number of strategies that can be used
is performed to demonstrate to the clients, on the real to design test cases for performing black box testing to
life data of the client. For testing to be successful, proper find out the errors in the program.
selection of test cases is essential. There are two different 1. Boundary Value Analysis: It is a black box
approaches for selecting test cases–functional testing testing technique that believes that more errors will
and structural testing. propagate at the boundaries. Here boundary condition
Levels of Testing: The basic levels of testing are means that an input value may be on the boundary or
unit testing, integration testing, system and acceptance just above or below the boundary and a nominal value.
testing. These different levels of testing attempt to detect That is {min, min+, nom, max-, max}. Suppose we have
different types of faults. The relation of the faults an input variable x with a range of 1 to 100 then the
introduced in different phases and the different levels boundary values for this variable will be 1, 2, 50, 99
of testing are: and 100. The domain is shown below:

www.neerajbooks.com
www.neerajbooks.com

(a) Boolean and logical variables are a problem


for BVA.
(b) BVA assumes variables are independent which
is not possible always.
(c) Test cases obtained in BVA are rudimentary.
Example: A program for determination of the
nature of roots of a quadratic equation is considered
with the input variables a, b and c and the values ranging
from 0 to 100. The program will output that the equation
has real roots, imaginary roots, equal roots or it is not a
quadratic equation. We have to design the test cases for
the above problem using Boundary Value Analysis.
It is based on a critical assumption that is known as Solution to the problem stated above is as follows:
‘Single fault assumption theory’. According to this Quadratic equation will be of type:
assumption, the test cases are derived on the basis that ax2 + bx + c = 0
failures do not occur due simultaneous occurrence of Roots are real if (b2 – 4ac) > 0
two or more faults. So the test cases are derived by Roots are imaginary if (b2 – 4ac) < 0
keeping all the variables constant except one for which Roots are equal if (b2 – 4ac) = 0

Neeraj
the fault is taken in care. Equation is not quadratic if a = 0
If there are n variables in a program then all the As we can see we have three variables a, b and c,
variables will be at their nominal value except for the i.e. n = 3
one variable which will have the values of boundaries. Therefore the number of test cases BVA will have
The number of test cases that Boundary Value Analysis is (4n + 1) = 4*3 + 1= 12+1=13 test cases.

Publications
will have for n variables is (4n + 1) test cases.
Limitations of Boundary Value Analysis (BVA)
The BVA test cases are:
Test Case A B C Expected Output

www.neerajbooks.com
1 0 50 50 Not Quadratic
2 1 50 50 Real Roots
3 50 50 50 Imaginary Roots
4 99 50 50 Imaginary Roots
5 100 50 50 Imaginary Roots
6 50 0 50 Imaginary Roots
7 50 1 50 Imaginary Roots
8 50 99 50 Imaginary Roots
9 50 100 50 Equal Roots
10 50 50 0 Real Roots
11 50 50 1 Real Roots
12 50 50 99 Imaginary Roots
13 50 50 100 Imaginary Roots

2. Robustness Testing: It is the extension of the value. This is also single fault assumption theory. Thus
boundary value analysis. Here we consider not only the the values that are considered for testing are {min-, min,
boundary values but also values slightly greater than min+, nom, max-, max, max+}. The domain for the
the maximum value and slightly less than the minimum problem is shown below:

www.neerajbooks.com
www.neerajbooks.com

2. With it we can focus on exceptional handling


because we try to cross legitimate boundaries.
Example: A program for determination of the
nature of roots of a quadratic equation is considered
with the input variables a, b and c and the values ranging
from 0 to 100. The program will output that the equation
has real roots, imaginary roots, equal roots or it is not a
quadratic equation. We have to design the test cases for
the above problem using Robustness Testing.
Solution to the problem stated above is as follows:
Quadratic equation will be of type:
ax2 + bx + c = 0
Roots are real if (b2 – 4ac) > 0
For a program with n- variables, the number of test Roots are imaginary if (b2 – 4ac) < 0
cases that robustness testing will have is (6n + 1) test Roots are equal if (b2 – 4ac) = 0
cases. In robustness testing we will go outside the Equation is not quadratic if a = 0
legitimate boundary of the input domain. This type of As we can see we have three variables a, b and c,
testing is quite common in electric and electronic i.e. n = 3
circuits. Therefore, the number of test cases BVA will have

Neeraj
Advantages of Robustness Testing: 1. It is easy is (6n + 1) = 6*3 + 1= 18+1=19 test cases.
to develop test case because it has no recognition of
data or logical dependencies.

The robustness test cases are:

Publications
Test Case A B C Expected Output
1 –1 50 50 Invalid Input
2 0 50 50 Not Quadratic
3 1 50 50 Real Roots

www.neerajbooks.com
4 50 50 50 Imaginary Roots
5 99 50 50 Imaginary Roots
6 100 50 50 Imaginary Roots
7 101 50 50 Invalid Input
8 50 –1 50 Invalid Input
9 50 0 50 Imaginary Roots
10 50 1 50 Imaginary Roots
11 50 99 50 Imaginary Roots
12 50 100 50 Equal Roots
13 50 101 50 Invalid Input
14 50 50 –1 Invalid Input
15 50 50 0 Real Roots
16 50 50 1 Real Roots
17 50 50 99 Imaginary Roots
18 50 50 100 Imaginary Roots
19 50 50 101 Invalid Input

www.neerajbooks.com
www.neerajbooks.com

3. Worst-Case Testing: In this testing technique A program with n- variables the number of test cases
the single fault assumption theory is rejected and more worst case testing will have will have 5n test cases.
than one variable has an extreme value. It requires more Example: A program for determination of the
effort. Here we remain within the legitimate boundary nature of roots of a quadratic equation is considered
of our range. We take the Cartesian product of the sets with the input variables a, b and c and the values ranging
{min, min+, nom, max-, max}. We assume multiple fault from 0 to 100. The program will output that the equation
assumption, i.e. more than one variable has an extreme has real roots, imaginary roots, equal roots or it is not a
value and the domain of our problem is shown below: quadratic equation. We have to design the test cases for
the above problem using worst case testing.
Solution to the problem stated above is as follows:
Quadratic equation will be of type:
ax2 + bx + c = 0
Roots are real if (b2 – 4ac) > 0
Roots are imaginary if (b2 – 4ac) < 0
Roots are equal if (b2 – 4ac) = 0
Equation is not quadratic if a = 0
As we can see we have three variables a, b and c,
i.e. n = 3
Therefore, the number of test cases BVA will have

Neeraj
is 5n = 125 test cases.

The worst case test cases are:


Test Case A B C Expected Output

Publications
1 0 0 0 Not Quadratic
2 0 0 1 Not Quadratic
3 0 0 50 Not Quadratic
4 0 0 99 Not Quadratic
5
6 www.neerajbooks.com
0
0
0
1
100
0
Not Quadratic
Not Quadratic
7 0 1 1 Not Quadratic
8 0 1 50 Not Quadratic
9 0 1 99 Not Quadratic
10 0 1 100 Not Quadratic
11 0 50 0 Not Quadratic
12 0 50 1 Not Quadratic
13 0 50 50 Not Quadratic
14 0 50 99 Not Quadratic
15 0 50 100 Not Quadratic
16 0 99 0 Not Quadratic
17 0 99 1 Not Quadratic
18 0 99 50 Not Quadratic
19 0 99 99 Not Quadratic
20 0 99 100 Not Quadratic
21 0 100 0 Not Quadratic

www.neerajbooks.com
www.neerajbooks.com

Test Case A B C Expected Output


22 0 100 1 Not Quadratic
23 0 100 50 Not Quadratic
24 0 100 99 Not Quadratic
25 0 100 100 Not Quadratic
26 1 0 0 Equal Roots
27 1 0 1 Imaginary Roots
28 1 0 50 Imaginary Roots
29 1 0 99 Imaginary Roots
30 1 0 100 Imaginary Roots
31 1 1 0 Real Roots
32 1 1 1 Imaginary Roots
33 1 1 50 Imaginary Roots
34 1 1 99 Imaginary Roots
35 1 1 100 Imaginary Roots
36 1 50 0 Real Roots

Neeraj
37 1 50 1 Real Roots
38 1 50 50 Real Roots
39 1 50 99 Real Roots
40 1 50 100 Real Roots

Publications
41 1 99 0 Real Roots
42 1 99 1 Real Roots
43 1 99 50 Real Roots
44 1 99 99 Real Roots

www.neerajbooks.com
45 1 99 100 Real Roots
46 1 100 0 Real Roots
47 1 100 1 Real Roots
48 1 100 50 Real Roots
49 1 100 99 Real Roots
50 1 100 100 Real Roots
51 50 0 0 Equal Roots
52 50 0 1 Imaginary Roots
53 50 0 50 Imaginary Roots
54 50 0 99 Imaginary Roots
55 50 0 100 Imaginary Roots
56 50 1 0 Real Roots
57 50 1 1 Imaginary Roots
58 50 1 50 Imaginary Roots
59 50 1 99 Imaginary Roots
60 50 1 100 Imaginary Roots
61 50 50 0 Real Roots

www.neerajbooks.com
www.neerajbooks.com

Test Case A B C Expected Output


62 50 50 1 Real Roots
63 50 50 50 Imaginary Roots
64 50 50 99 Imaginary Roots
65 50 50 100 Imaginary Roots
66 50 99 0 Real Roots
67 50 99 1 Real Roots
68 50 99 50 Imaginary Roots
69 50 99 99 Imaginary Roots
70 50 99 100 Imaginary Roots
71 50 100 0 Real Roots
72 50 100 1 Real Roots
73 50 100 50 Equal Roots
74 50 100 99 Imaginary Roots
75 50 100 100 Imaginary roots
76 99 0 0 Equal Roots

Neeraj
77 99 0 1 Imaginary Roots
78 99 0 50 Imaginary Roots
79 99 0 99 Imaginary Roots
80 99 0 100 Imaginary Roots

Publications
81 99 1 0 Imaginary Roots
82 99 1 1 Imaginary Roots
83 99 1 50 Imaginary Roots
84 99 1 99 Imaginary Roots

www.neerajbooks.com
85 99 1 100 Imaginary Roots
86 99 50 0 Real Roots
87 99 50 1 Real Roots
88 99 50 50 Imaginary Roots
89 99 50 99 Imaginary Roots
90 99 50 100 Imaginary Roots
91 99 99 0 Real Roots
92 99 99 1 Real Roots
93 99 99 50 Imaginary Roots
94 99 99 99 Imaginary Roots
95 99 99 100 Imaginary Roots
96 99 100 0 Real Roots
97 99 100 1 Real Roots
98 99 100 50 Imaginary Roots
99 99 100 99 Imaginary Roots
100 99 100 100 Imaginary Roots
101 100 0 0 Equal Roots

www.neerajbooks.com
www.neerajbooks.com

Test Case A B C Expected Output


102 100 0 1 Imaginary Roots
103 100 0 50 Imaginary Roots
104 100 0 99 Imaginary Roots
105 100 0 100 Imaginary Roots
106 100 1 0 Real Roots
107 100 1 1 Imaginary Roots
108 100 1 50 Imaginary Roots
109 100 1 99 Imaginary Roots
110 100 1 100 Imaginary Roots
111 100 50 0 Real Roots
112 100 50 1 Real Roots
113 100 50 50 Imaginary Roots
114 100 50 99 Imaginary Roots
115 100 50 100 Imaginary Roots
116 100 99 0 Real Roots

Neeraj
117 100 99 1 Real Roots
118 100 99 50 Imaginary Roots
119 100 99 99 Imaginary Roots
120 100 99 100 Imaginary Roots

Publications
121 100 100 0 Real Roots
122 100 100 1 Real Roots
123 100 100 50 Imaginary Roots
124 100 100 99 Imaginary Roots

www.neerajbooks.com
125 100 100 100 Imaginary Roots

4. Equivalence Class Testing: In this method, Two steps are required in implementing this
input domain of a program is partitioned into a finite method. These are as follows:
number of equivalence classes such that one can (a) The equivalence classes are identified by
reasonably assume, but not be absolutely sure, that the taking each input condition and partitioning
test of a representative value of each class is equivalent them into valid and invalid classes. For
to a test of any other value. That is, if one test case in a example if a variable has an input domain of
class detects an error, all other test cases in the class 1<variable<100, then the classes that will be
would be expected to find same error. Furthermore, if formed are one valid class 1<variable<100 and
this single representative test case did not detect any two invalid classes those are variable<1 and
error then it is assumed that no other test case of this variable>100.
class can detect error. In this method both the valid and (b) Generate the test case using all the valid and
the invalid input domain is considered. The idea of this invalid equivalence classes identified in the
testing is to identify one element from each equivalence above step. This ensures that no two invalid
class which should be chosen wisely so that the potential classes mask each other.
redundancy among the test cases can be reduced. The domain of our problem is shown below:

www.neerajbooks.com
www.neerajbooks.com

Do not forget to have equivalence classes for invalid Solution to the problem stated above is as follows:
inputs as they are the best source of bugs. In fact different Quadratic equation will be of type:
types of invalid inputs should be tested in order to get ax2 + bx + c = 0
more errors. Hence, we should design equivalence Roots are real if (b2 – 4ac) > 0
classes based on input and output domains. Roots are imaginary if (b2 – 4ac) < 0
Example: A program for determination of the Roots are equal if (b2 – 4ac) = 0
nature of roots of a quadratic equation is considered Equation is not quadratic if a = 0
Thus the output domain equivalence class test cases

Neeraj
with the input variables a, b and c and the values ranging
can be identified as follows:
from 0 to 100. The program will output that the equation
O1= {<a, b, c>: Not a quadratic equation if a = 0}
has real roots, imaginary roots, equal roots or it is not a
O2= {<a, b, c>: Real roots if (b2 – 4ac) > 0}
quadratic equation. We have to design the test cases for
O3= {<a, b, c>: Imaginary roots if (b2 – 4ac) < 0}
the above problem using Equivalence class testing.
O4= {<a, b, c>: Equal roots if (b2 – 4ac) = 0}

Publications
The Output Domain test cases are as follows:
Test Case a b c Expected Output
1 0 50 50 Not a Quadratic Equation
2 1 50 50 Real Roots
3
4 www.neerajbooks.com
50
50
50
100
50
50
Imaginary Roots
Equal Roots

The other set of test cases is based on input domain. I6= {b: b<0}
I1= {a: a=0} I7= {b: b>100}
I2= {a: a<0} I8= {c: 0<=c<=100}
I3= {a: 1<=a<=100} I9= {c: c<0}
I4= {a: a>100} I10= {c: c>100}
I5= {b: 0<=b<=100}
Input Domain test cases are:
Test Case a b c Expected Output
1 0 50 50 Not a quadratic equation
2 –1 50 50 Invalid Input
3 50 50 50 Imaginary Roots
4 101 50 50 Invalid Input
5 50 50 50 Imaginary Input
6 50 –1 50 Invalid Input

www.neerajbooks.com
www.neerajbooks.com

Test Case a b c Expected Output


7 50 50 101 Invalid Input
8 50 50 50 Imaginary Input
9 50 50 –1 Invalid Input
10 50 50 101 Invalid Input

Here, test cases 5 and 8 are redundant but if choose under varying sets conditions. We would like to show
any other value other than the nominal value then these that how these may be applied to the testing and how
test cases will not be redundant. Hence, we will have a tester adopts the principles to the situation.
total of 10 + 4 = 14 test cases in this example of A decision table has four portions, namely:
equivalence class testing. (a) Stub Portion
5. Decision Table Based Testing: Decision tables (b) Entry Portion
are a precise and compact way to model complicated
(c) Condition portion, and
logic. They are useful for describing the situations in
which a number of combinations of actions are taken (d) Action portion.
Rules
Condition Stub Condition Entry

Neeraj
Action Stub Action Entry

A column in the entry portion is a rule. Rules will is called as limited entry decision table. If conditions
indicate what action has to be performed depending on have several rules then the tables are called extended
the condition indicated in the condition portion of the entry decision table.
rule. Decision table in which all conditions are binary

Publications
Some of the basic term is shown below:

Condition Entry
Stub c1 True False

www.neerajbooks.com
c2
c3 True
True
False True
False
False True
True
False
False
-
Action a1 X X X
Stub a2 X X X
a3 X X
a4 X X X

In the above, table when conditions c1, c2 and c3 Each column of the decision table represents a test
are all true then actions a1 and a2 occur. When conditions case. That is:
c1 and c2 are true and c3 is false actions a1 and a3 will Number of Test Cases = Number of Rules
occur and so on. For a limited entry decision table if there are n-
To identify test cases with decision table certain variables then there will be 2n rules or test cases.
steps are to be followed: Advantages of Decision Tables
Step1: For a module identify the input conditions (a) This type of testing works iteratively. The table
(input or cause) and the actions (output or effect). that is drawn in the first iteration acts as a
Sometimes conditions end up referring to equivalence stepping stone to derive new decision tables,
of inputs and actions refers to major functional if the first table is unsatisfactory.
processing portions of the item that is being tested. (b) It follows completeness property. This property
Step 2: Rules are interpreted as test cases. promise a form of complete testing.

www.neerajbooks.com
www.neerajbooks.com

(c) They are declarative. There is no particular (c) Calculations involving subsets of input
order for conditions and actions to occur. variables.
Disadvantages of Decision Tables Example: A program to classify a triangle is taken
They do not scale up well. There is a lot of in consideration. Its input is a triple of positive integers
redundancy which has to be removed. (say x, y, z) and the range of these inputs is from 0 to
Applications of Decision Tables 100. The program output will be scalene, isosceles,
(a) Prominent if-then-else logic equilateral or not a triangle. Design the test cases using
(b) Logical relationships among input variables decision tables based testing.
Solution to the problem stated above is as follows:
The decision table for the triangle problem is shown below:

c1: x, y, z are sides of a triangle? N Y


c2: x=y? - Y N
c3: x=z? - Y N Y N
c4: y=z? - Y N Y N Y N Y N
a1: Not a triangle X
a2: Scalene X
a3: Isosceles X X X

Neeraj
a4: Equilateral X
a5: Impossible X X X
The modified decision table is given below:
Conditions
c 1: x< y + z? F T T T T T T T T T T

Publications
c 2: y < x + z? - F T T T T T T T T T
c 3: z < x + y? - - F T T T T T T T T
c 4: x = y? - - - T T T T F F F F
c 5: x = z? - - - T T F F T T F F

www.neerajbooks.com
c 6: y = z? - - - T F T F T F T F
a 1: Not a triangle X X X
a 2: Scalene X
a 3: Isosceles X X X
a 4: Equilateral X
a 5: Impossible X X X
The test cases for the above decision table are:
Test Case x y z Expected Output
1 4 1 2 Not a triangle
2 1 4 2 Not a triangle
3 1 2 4 Not a triangle
4 5 5 5 Equilateral
5 ? ? ? Impossible
6 ? ? ? Impossible
7 2 2 3 Isosceles
8 ? ? ? Impossible
9 2 3 2 Isosceles
10 3 2 2 Isosceles
11 3 4 5 Scalene

www.neerajbooks.com
www.neerajbooks.com

6. Cause-Effect Graphing Technique: It is a technique that helps in selecting a high yield set of test cases.
It has a beneficial effect in pointing out incompleteness and ambiguities in the specifications.
A ‘cause’ represents a distinct input condition that brings an internal change in the system whereas an ‘effect’
shows an output condition that is a state resulting from the combination of causes. The steps to derive the test cases
are as follows:
(a) Identify the cause and effect for the problem.
(b) Draw a Boolean graph that is the cause effect graph.
(c) Convert the graph into limited entry decision table.
(d) The columns in the decision table are converted into test cases.
The basic notations used in the graph are:
NOT
Identity
c1 e1 c1 e1

c1 OR AND
c1

e1 e1
c2

Neeraj
V
c2
c3

Here, each node has a value of 0 or 1. 0 represents issued. Draw the cause effect graph for above

Publications
the absence of state and 1 represents the present state. problem.
The Identity function states that if c1 is 0 the e1 is 0 Solution to the problem stated above is as follows:
otherwise both are 1. The NOT function states that if c1 Step1: Identify the cause and the effect.
is 0 then e1 is 1 otherwise vice versa. The OR function The causes are:
states that if c1 or c2 or c3 is 1 then e1 is 1 otherwise it is c1: Character in column 1 is A

www.neerajbooks.com
0 and the AND function states that if c1 and c2 are 1 c2: Character in column 1 is B
then e1 is 1 otherwise its 0. c3: Character in column 2 is a digit
Example: The characters in column 1 must be an The effects are:
A or B. the character in column 2 must be a digit. In this e1: update made
situation the file update is done. If the character in e2: message x is issued
column 1 is incorrect then message x is issued. If the e3: message y is issued
character in column 2 is incorrect then message y is Step 2: Draw its cause effect graph

e1
c1
V

e2
c2

e3
c3

www.neerajbooks.com
www.neerajbooks.com

Structural Testing: It is also known as white box Its effectiveness decreases as the size of the software
testing. White box testing is a way of testing the external under test increases. This type of testing involves:
functionality of the code by examining and testing the (a) Generate a set of paths that will cover every
program code that realizes the external functionality. It branch in the program.
lets us examine the internal structure of the program (b) Finding a set of test cases that will execute
that is the code is visible in white box testing. The test every path in the set of program paths obtained
cases are derived by examining the program’s logic above.
without paying attention to the specifications. There are Path generation (Step a) can be performed through
two kinds of white box testing. They are: the static analysis of the program control flow and can
Dynamic White Box Testing: It means testing a be automated.
Flow Graph: The control flow of a program can
running program by looking into the program, examining
be analysed using the graphical representation known
the code and watching it as it runs.
as Flow Graph. The flow graph is a directed graph in
Static White Box Testing: It means to test a which nodes are the entire statements or fragments of
program without running it that is examining and statements and edges represent the flow of control. If a
reviewing it before running. There are many techniques and b are two nodes and there is an edge between them
of white box testing. They are as follows: then it can be said that statement or fragment of statement
1. Path Testing: It is the name given to a group of corresponding to node b can immediately be executed
test techniques which selects a set of test paths through after statements of node a. It can be generated from the
the program. It requires the complete knowledge of the code of any program. The basic constructs of flow graph
program structure in order to perform unit testing on it. are:

Neeraj
Publications
Sequence If-then-else

DD path Graph: After flow graph generation a


While Loop Repeat-until loop Switch Statement

may be from interval [0,100]. The program is given

www.neerajbooks.com
DD path graph is drawn from the flow graph. It is the below:
decision to decision path graph that is here the #include <stdio.h>
concentration is on decision nodes only. The nodes that #include <conio.h>
are in sequence are combined in one node only. Hence, #include <math.h>
DD path graph is a directed graph in which nodes are 1 int main()
sequences of statements and edges represent control 2 {
flow between nodes. 3 int a, b, c, validInput=0, d;
Independent Paths: The DD path graph drawn in 4 double D;
the previous step is used to find the independent paths. 5 printf (“Enter the ‘a’ value: ”);
It is a through the DD path graph that introduces at least 6 scanf(“%d”, &a);
one new set of processing statements or new conditions. 7 printf (“Enter the ‘b’ value: ”);
Therefore, an independent path will have at least one 8 scanf(“%d”, &b);
node that is different and has not been traversed in each 9 printf (“Enter the ‘c’ value: ”);
defined path. 10 scanf(“%d”, &c);
Independent paths are used to ensure: 11 if ((a>=0) && (a<=100) && (b>=0) &&
(a) Every statement in the program has been (b<=100) && (c>=0) && (c<=100))
executed at least once. {
(b) Every branch has a true and a false condition. 12 validInput = 1;
Example 13 if (a == 0)
Consider the program for the determination of the {
nature of roots of a quadratic equation. Its input is a 14 validInput = -1;
triple of positive integers (say a, b and c) and values 15 }

www.neerajbooks.com
www.neerajbooks.com

16 } 30 }
17 if (validInput == 1) { 31 else if ( validInput == -1) {
18 d = b*b – 4*a*c; 32 printf (“Not a quadratic equation”);
19 if ( d== 0){ 33 }
20 printf (“Equal roots and are r1 = r2 = %f\n”, – 34 else {
b/(2*(float)a)); 35 printf (“Invalid Input”);
21 } 36 }
22 else if ( d > 0 ) { 37 getche();
23 D=sqrt (d); 38 return 1;
24 printf (“Real roots and are r1=%f and 39 }
r2=%f\n”, (-b-D) / (2*a), (-b + D) / (2*a)); The output will be one out of the following:
25 } 1. Not a quadratic equation
26 else { 2. Real roots
27 D= sqrt(-d) / (2*a); 3. Imaginary roots
28 printf (“Imaginary roots and are r1 = (%f, %f) 4. Equal roots
and r2 = (%f, %f)\n”, -b / (2*a), D, - 5. Invalid input.
b / (2*a), -D); We have to draw the flow graph and DD path graph
29 } and also find the independent paths from DD path graph.
The solution to the above problem is:

Neeraj
The flow graph is given below:

Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

DD Path Graph is given below:

Neeraj
Publications
www.neerajbooks.com
The mapping table for DD path graph is:
Flow Graph nodes DD Path graph Remarks
corresponding
nodes
1 to 10 A Sequential nodes
11 B Decision node
12 C Intermediate node
13 D Decision node
14,15 E Sequential nodes
16 F Two edges are combined here
17 G Two edges are combined and decision node
18 H Intermediate node
19 I Decision node
20, 21 J Sequential nodes
22 K Decision node

www.neerajbooks.com
www.neerajbooks.com

Flow Graph nodes DD Path graph Remarks


corresponding
nodes
23 to 25 L Sequential nodes
26 to 29 M Sequential nodes
30 N Three edges are combined
31 O Decision node
32, 33 P Sequential nodes
34 to 36 Q Sequential nodes
37 R Three edges are combined
38, 39 S Sequential nodes with exit node.
Independent paths are: There will be five independent paths for the above
(i) ABGOQRS flow graph as the Cyclomatic complexity is 5. The
(ii) ABGOPRS independent paths are:
(iii) ABCDFGOQRS 1. a c f
(iv) ABCDEFGOPRS 2. a b e f

Neeraj
(v) ABGHIJNRS 3. a d c f
(vi) ABGHIKLNRS 4. a b e a c f or a b e a b e f
(vii) ABGHIKMNRS. 5. a b e b e f
2. Cyclomatic Complexity: It is also known as Properties of Cyclomatic Complexity
structural complexity because it gives the internal view 1. V(G) >= 1
of the code. With the help of this technique it is easy to 2. V(G) is the maximum number of independent

Publications
find the number of independent paths in the graph. It paths in graph G.
tells about the upper bound for the number of tests that 3. Inserting and deleting functional statements to
must be conducted to ensure all statements have been G does not affect V(G)
executed at least once and every condition node is 4. G has only one path if V(G) =1

www.neerajbooks.com
checked on its true and false side. 5. Inserting a new row in G increases V(G) by
McCabe’s Cyclomatic metric V(G) of a graph G unity
with n vertices, e edges and P connected components is
6. V(G) depends only on decision structure of G.
V(G) = e – n + 2P.
There are two alternate methods to calculate the
For example, consider the following graph and
Cyclomatic complexity. They are:
using that graph we will calculate the Cyclomatic
1. Cyclomatic complexity V(G) of a graph is equal
complexity and find the independent paths.
to the number of decision (predicate) nodes plus one
The Cyclomatic complexity can be calculated for
that is V(G) =  + 1.
the graph given below as:
V(G) = e – n + 2P Here,  is the number of predicate nodes contained
Here e = 9, n = 6 and P=1 in the flow graph G. A predicate node is the one which
Therefore, V(G) = 9 – 6 + 2*1= 9 – 6 + 2 = 5 have two outgoing edges i.e. one for true condition and
other for false. If there are more than two outgoing edges
then the graph is to be changed such that each decision
node have two outgoing edges and if this is not possible
then this formula won’t be applicable.
2. Cyclomatic complexity is equal to the number
of regions of the flow graph.
Example: Consider the following flow graph and
calculate the Cyclomatic complexity by all three
methods.

www.neerajbooks.com
www.neerajbooks.com

1. V(G) = e – n + 2P
= 13 – 10 + 2= 5
2. V(G) =  + 1= 4 + 1= 5
3. V(G) = number of regions = 5
3. Graph Matrices: In graph matrix based testing,
we convert our flow graph into a square matrix with
one row and one column for every node in a graph. The
size of the matrix is equal to the number of nodes in the
flow graph. The objective is to trace all links of the
graph at least once. The aim is to find the Cyclomatic
complexity V(G) and the independent paths. If the size
of the graph increases then it is difficult to do path tracing
manually.
In the graph matrix there is a place to put every
possible direct connection between any node and any
other node. A connection from node i to node j does not
tell that there is a connection between node j and node
i. If there are several links between any two nodes then
The solution to the above problem is: they are represented with a ‘+’ sign in the graph matrix.

Neeraj
Cyclomatic complexity can be calculated as For example:
follows:

Publications
1 2

www.neerajbooks.com 3

It is a tabular representation of a flow graph. If we Example: Consider the following flow graph and
assign weight to each entry then such a matrix with draw the graph and connection matrices. Also find out
weights is called connection matrix. If there is a the Cyclomatic complexity and two link paths from a
connection then weight 1 is assigned otherwise 0 is node to any other node.
assigned for no connection. The connection matrix is
also used to find the Cyclomatic complexity. To calculate
the Cyclomatic complexity from the connection matrix 1
we will sum each row and subtract 1 from each row.
Then add the column of result and add 1 to the sum of
column of result. This will give the V(G). 3
Each entry in the graph matrix represents a relation
between the pair. Squaring a matrix will give a new
matrix that expresses the relation between each pair of 5 4
nodes through one intermediate node with the
assumption that the node is transitive. Square matrix
represents all paths of two links long. The kth power of 2
matrix represents all paths of k links long.

www.neerajbooks.com
www.neerajbooks.com

The solution to the above problem is: (b) Usage node: Node n  G(P) is a usage node
The graph and connection matrices are: of the variable v  V written as USE(v, n) if
1 2 3 4 5 and only if the value of variable v is used at
a 1 the statement fragment corresponding to node
2 n.
(c) Definition use( du-path): A definition use
d b 3
path with respect to a variable v is a path in
c f 4 PATHS(P) such that for some v ? V there are
g e h 5 define and usage nodes DEF (v, m) and USE(v,
Graph Matrix (A) n) such that m and n are the initial and final
nodes of the path.
1 2 3 4 5 Connections
(d) Definition clear(dc- path): A definition clear
1 1–1 = 0 path with respect to a variable v is a definition
1 2 use path in PATHS(P) with initial and final
nodes DEF(v, m) and USE(v, n) such that no
3 2–1= 1
1 1 other node in the path is a defining node of v.
1 1 4 2–1= 1 The objective of this testing is to find all the du- paths
1 1 1 5 3–1= 2 and then identify all those du- paths that are not dc-
paths.
Connection Matrix 4+1= 5

Neeraj
The steps that are followed are given below:
To find two link paths, generate a square of graph (a) Draw the program flow graph.
matrix [A] is required. (b) Find the DD path Graph.
1 2 3 4 5 (c) Prepare a table for define/use status of all
1 ad ab variables.
2 (d) Find all du paths

Publications
3 bc bf (e) Identify du-paths that are not dc paths.
4 fg fe fh Example: Consider the program for the determination
5 ed + hg he eb h2 of the nature of roots of a quadratic equation. Its input
is a triple of positive integers (say a, b and c) and values
[A2] may be from interval [0,100]. The program is given

www.neerajbooks.com
4. Data Flow Testing: It is another form of below:
structural testing. Here concentrate on the usage of #include <stdio.h>
variables and the focus points are: #include <conio.h>
(a) Statements where variables receive values. #include <math.h>
(b) Statements where these values are used or 1 int main()
referenced. 2 {
Flow graphs are used as a basis for data flow testing. 3 int a, b, c, validInput = 0, d;
Since the variable is defined and referenced throughout 4 double D;
the program there are a few define/reference anomalies: 5 printf (“Enter the ‘a’ value: ”);
(a) A variable is defined but not used. 6 scanf(“%d”, &a);
(b) A variable is used but not defined. 7 printf (“Enter the ‘b’ value: ”);
(c) A variable is defined twice before its use. 8 scanf(“%d”, &b);
Some definitions are required to be defined for data 9 printf (“Enter the ‘c’ value: ”);
flow testing. These definitions refer to the program P 10 scanf(“%d”, &c);
that has a graph G(P) and a set of variables V. The G(P) 11 if ((a>=0) && (a<=100) && (b>=0) &&
has a single entry and a exit node. The set of all paths (b<=100) && (c>=0) && (c<=100))
in P is PATHS(P). {
(a) Defining node: Node n  G(P) is a defining 12 validInput = 1;
node of the variable v  V written as DEF(v, n) 13 if (a == 0)
if and only if the value of variable v is defined {
at the statement fragment corresponding to 14 validInput = -1;
node n.

www.neerajbooks.com
www.neerajbooks.com

15 } 30 }
16 } 31 else if ( validInput == -1) {
17 if (validInput == 1) { 32 printf (“Not a quadratic equation”);
18 d = b*b - 4*a*c; 33 }
19 if ( d== 0){ 34 else {
20 printf (“Equal roots and are r1 = r2 = %f\n”, - 35 printf (“Invalid Input”);
b/(2*(float)a)); 36 }
21 } 37 getche();
22 else if ( d > 0 ) { 38 return 1;
23 D=sqrt (d); 39 }
24 printf (“Real roots and are r1=%f and The output will be one out of the following:
r2=%f\n”, (-b-D) / (2*a), (-b + D) / (2*a)); 1. Not a quadratic Equation
25 } 2. Real roots
26 else { 3. Imaginary roots
27 D= sqrt(-d) / (2*a); 4. Equal roots
28 printf (“Imaginary roots and are r1 = (%f, %f) 5. Invalid input
and r2 = (%f, %f)\n”, -b / (2*a), D, - Find all du paths and identify those du-paths that are
b / (2*a), -D); definition clear.
29 }

Neeraj
The solution to the above problem is:
The flow graph is given below:

Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

DD Path Graph is given below:

Neeraj
Publications
www.neerajbooks.com
Define/Use nodes for all variables are given below:
Variable Defined at node Used at node
a 6 11, 13, 18, 20, 24, 27, 28
b 8 11, 18, 20, 24, 28
c 10 11, 18
d 18 19, 22, 23, 27
D 23, 27 24, 28
Valid Input 3, 12, 14 17, 31
The du-paths are identified and are named by their beginning and ending nodes and even checked whether
definition clear or not.
Variable Path (beginning, end) nodes Definition clear?
a 6,11 Yes
6,13 Yes
6,18 Yes

www.neerajbooks.com
www.neerajbooks.com

Variable Path (beginning, end) nodes Definition clear?


6, 20 Yes
6, 24 Yes
6, 27 Yes
6, 28 Yes
b 8, 11 Yes
8, 18 Yes
8, 20 Yes
8, 24 Yes
8, 28 Yes
c 10, 11 Yes
10, 18 Yes
d 18, 19 Yes
18, 22 Yes

Neeraj
18, 23 Yes
18, 27 Yes
D 23, 24 Yes
23, 28 Pathe not possible
27, 24 Path not possible

Publications
27, 28 Yes
Valid input 3, 17 No
3, 31 No

www.neerajbooks.com
12, 17 No
12, 31 No
14, 17 Yes
14, 31 Yes

Total du-paths are 26 out of which 4 paths are not The changed statements are called the mutants.
dentition clear path and two are impossible paths. We They are produced by applying the mutant operator. An
should generate test cases for all 26 du-paths and if not operator is essentially a grammatical rule that changes
possible then at least generate 4 test cases for 4 du-paths a single expression to another. If more than one mutant
that are not definition clear paths. operator are applied then the result set of mutants will
5. Mutation Testing: Mutation testing is a fault be large, all of which must be killed by the test cases.
based testing. In this technique the changes are made in These mutants are run with an input data from a given
certain statements in the source code and it is checked test set. If the mutant produces a different result than
if the test code is able to find any errors. It is used to the original program than the mutant is said to be killed
access the quality of the test case, i.e. whether they can otherwise the mutant is said to be a live mutant. A mutant
reveal certain types of faults. is live if it is same as the original program, i.e. the
For example, SDLC is viewed as a root finding functionally identical to the original program or the test
procedure. That is, a designer submits an initial guess which data is inadequate to kill the mutant.
is then iteratively tested for validity until a correct solution One difficulty associated with whether a mutant will
is obtained. This is the principle of meta-induction. be killed is the problem of reaching the location; if a

www.neerajbooks.com
www.neerajbooks.com

mutant is not executed it cannot be killed. Thus, special output for certain input values. The code is never
test cases are to be designed to reach a mutant. considered in functional testing. The internal structure
The manner by which a test suite is evaluated of the program is ignored. Working of black box is
through mutation testing is as follows: understood completely in terms of inputs and outputs
For a specific test suite and a specific set of mutants, as shown below:
there will be three types of mutants in the code, killed
or dead, live or equivalent. The sum of number of live,
killed and equivalent mutants will be the total number
of mutants created. The score associated with a test suite
T and mutants M is simply
#killed * 100%
Q. 3. Write a short note on White Box Testing?
# total - # equivalent Ans. White-Box Testing–White-box testing, also
This equation allows us to determine the likelihood called glass-box testing, is a test case design method
that for a particular mutation adequate test suite will that uses the control structure of the procedural design
catch real faults based on how well the suite killed to derive test cases. Using white-box testing methods,
mutants. the software engineer can derive test cases that:
(1) guarantee that all independent paths within a
module have been exercised at least once;
Q. 1. What are the objectives of Software Testing?

Neeraj
(2) exercise all logical decisions on their true and
Ans. Glen Myers states a number of rules that can
false sides;
serve well as testing objectives :
(3) execute all loops at their boundaries and within
1. Testing is a process of executing a program with
their operational bounds; and
the intent of finding an error.
(4) exercise internal data structures to assure their
2. A good test case is one that has a high probability
validity.

Publications
of finding an as-yet undiscovered error. These tests are necessary in view of:
3. A successful test is one that uncovers an as-yet Logic errors and incorrect assumptions are
undiscovered error. inversely proportional to the probability that a program
The above objectives imply a dramatic change in path will be executed. Errors tend to creep into our work
view-point. They move counter to the commonly held when we design and implement function, conditions, or

www.neerajbooks.com
view that a successful test in one in which no efforts are control that are out of the mainstream.
found. Our objective is to design tests that systematically We often believe that a logical path is not likely to
uncover different classes of errors and do so with a be executed when, in fact, it may be executed on a
minimum amount of time and effort. regular basis. The logical flow of a program is
Successful testing will uncover errors in the sometimes counterintuitive, meaning that our uncon-
software. As a secondary benefit, testing demonstrates scious assumptions about flow of control and data may
that software functions appear to be working according leads us to make design errors that are uncovered only
to specification and that performance requirements once path testing commences.
appear to have been met. Also, data collected testing Typographical errors are random. When a program
provides a good indication of software reliability and is translated into programming language source code,
some indication of software quality as a whole. it is likely that some typing errors will occur. Many will
However, testing cannot show the absence of be uncovered by syntax checking mechanisms, but other
defects, it can only show that software errors are present. will go undetected until testing begins. It is as likely
It is important to keep this gloomy statement in mind as that a type will exist on an obscure logical path as on a
testing is being conducted. mainstream path.
Q. 2. Write a short note on Black Box Testing? Each of these reasons is a good reason for
Ans. It is also called Functional testing. The black conducting white-box tests. Black-box testing, no matter
box refers to the software which is treated as a black how thorough, may miss the such errors. As Beizer has
box. Here, testing is entirely based on the functionality stated : “Bugs lurk in corners and congregate at
of the software program. Thus, functional testing is boundaries.” White-box testing is far more likely to
related to testing, which involves observation of the uncover them.

www.neerajbooks.com
www.neerajbooks.com

Q. 4. What is equivalence partitioning? conditions, BVA derives test cases from the output
Ans. Equivalence partitioning–Equivalence domain as well.
partitioning is a black-box testing method that divides Guidelines for BVA are same in many respects as
the input domain of a program into classes of data from provided for equivalence partitioning:
which test cases can be derived. An ideal test case single- 1. If an input condition specifics a range bounded
handedly uncovers a class of errors (e.g., incorrect by values a and b, test cases should be designed
processing of all character data) that might otherwise with values a and b, just below a and b,
required many cases to be executed before the general respectively.
error is observed. Equivalence partitioning tries to define 2. If an input condition specifies a number of
a test case that uncovers classes of errors, thereby values, test cases should be developed that
reducing the totals numbers of test cases that must be exercise that minimum and maximum numbers.
developed. Values just above and below minimum and
Test case design for equivalence partitioning is maximum are also tested.
based on an evaluation of equivalent classes for an input 3. Conditions (1) and (2) are applied to output
condition. If a set of objects can be linked by conditions also. Thus, if a temperature versus.
relationships that are symmetric, transitive and pressure table is required as output from a
reflexive, an equivalence class is present. An engineering analysis program. Test cases
equivalence class represents a set of valid or invalid should be designed to create an output report
states for input conditions. Typically, an input condition that produces the maximum (and minimum)

Neeraj
is either a specific numeric value, a range of values, a allowable number of table entries.
set of related values, or a Boolean condition. 4. If internal program data structures have
Equivalence classes may be defined according to the specified boundaries (e.g., an array has a
following guidelines: defined limit of 100 entries), be certain to
1. If an input condition specifies a range, one valid design a test case to exercise the data structure
and two invalid equivalence classes are defined. at its boundary.

Publications
2. If an input condition requires a specific value, Most software engineers intuitively perform BVA
one valid and two invalid equivalence classes are to some degree. With above the guidelines, boundary
defined. testing becomes more complete, and there is higher
3. If an input condition specifies a member of a set, likelihood for error detection.
Q. 6. Explain the use of basis Path Testing. What

www.neerajbooks.com
one valid and invalid equivalence class are defined.
4. If an input condition is Boolean, one valid and is Cyclomatic Complexity?
one invalid class are defined. Ans. Basis Path Testing–Basis path testing is a
Applying the guidelines for the derivation of white-box testing technique first proposed by Tom
equivalence classes, test cases for each input domain McCabe. The basis path method enables the test case
data item could be developed and executed. Test cases designer to derive a logical complexity measure of a
are selected so that the largest number of attributes of procedural design and use this measure as a guide for
an equivalence class are exercised at once. defining a basis set of execution paths. Test cases derived
Q. 5. Write a short note on Boundary Value to exercise the basis set are guaranteed to execute every
Analysis? statement in the program at least once during testing.
Ans. Boundary Value Analysis—For reasons that Cyclomatic Complexity–Cyclomatic complexity
are not entirely clear, a greater number of errors tend to is a software metric that provides a quantitative measure
occur at the boundaries of the input domain than in the of the logical complexity of a program. When this metric
“center.” It is for this reasons that Boundary Value is used in the context of the basis path testing method,
Analysis (BVA) has been developed as a testing the value computed for cyclomatic complexity defines
technique. Boundary values analysis leads to a section the number of independent paths in the basis set of a
of test cases that exercise bounding values. program and provides an upper bound for the number
Boundary value analysis is a test case design of tests that must be conducted to ensure that all
technique that complements equivalence partitioning. statements have been executed at least once.
Rather than selecting any element of an equivalence Here, independent path is any path through the
class, BVA leads to the section of test cases at the program that introduces at least one new set of
“edges” of the class. And instead focusing only on input processing statements or a new condition.

www.neerajbooks.com
www.neerajbooks.com

Q. 7. What is Data Flow Testing? of all branches of a program. However, branch is not
Ans. Data Flow Testing–The data flow testing guaranteed to be covered by DU testing only in rare
method chooses test paths of a program according to situations such as if-then-else constructs in which the
the locations of definitions and uses of variables in the then part has no definition of any variable and else part
program. There are number of data flow testing does not exist. In this situation, the else branch of the
above if statement is not necessarily covered by DU
strategies.
testing.
The data flow testing approach can be explained Data flow testing strategies are useful for selecting
with example. Each statement in a program be assigned test paths of a program containing nested if and loop
a unique statement number. Each function does not statements.
modify its parameters or global variables. For a Since the statements in a program are related to
statement with N as its statement number, each-other according to the definitions and uses of
DEF (N) = {X | statement variables, the data flow testing approach is effective for
N contains a definition of X} error protection. However, the problems of measuring
USE (N) = {X | statement test coverage and selecting test paths for data flow
N contains a use of X} testing are more difficult than the corresponding
If statement N is an if or loop statement, its DEF problems for condition testing.
set is empty and its USE set is based on the condition of Q. 8. What do you mean by Loop Testing?
statement N. The definition of variable X at statement Ans. Loop Testing–Loops are the cornerstone for
N is said to be live at statement N if there exists a path the vast majority of all algorithms implemented in

Neeraj
software. Loop testing is a white-box testing technique
from statement N to statement N that does not contain
that deals exclusively with the validity of loop
any other definition of X. constructs. For different classes of loops can be defined:
A definition-use chain (or DU chain) of variable simple loops, concatenated loops, nested loops, and
X is of the form [X, N, N] , where N and N are statement unstructured loops.
numbers, X is in DEF (N) and USE (N), and the (a) Simple loops–The following set of tests should

Publications
definition of X in statement N is live at statement N. be applied to simple loops, where n is the maximum
One simple data flow testing strategy is to require number of allowable passes through the loop.
that every DU chain be covered at least once. This 1. Skip the loop entirely.
strategy is called the DU testing strategy. It has been 2. Only one pass through the loop.
shown that DU testing does not guarantee the coverage 3. Two passes through the loop.

www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

4. m passes through the loop where m < n. minimum values and other nested loops to
5. n – 1, n, n + 1 passes through the loop. “typical” values.
(b) Nested loops–If we were to extend the test 4. Continue until all loops have been tested.
approach for simple loops to nested loops, the number (c) Concatenated loops–Concatenated loops can
of possible tests would grow geometrically as the level be tested using the approach defined for simple loops if
of nesting increases. This would result in an impractical each of the loops is independent of the other. However,
number of tests. if two loops are concatenated and the loop counter for
1. Start at the innermost loop. Set all other loops loop 1 is used as the initial value for loop 2, then the
to minimum values. loops are not independent. When the loops are not
2. Conduct simple loop tests for the innermost independent the approach applied to nested loops is
loop while holding the outer loops at their recommended.
minimum iteration parameter (e.g., loop (d) Unstructured loops–Whenever possible, this
counter) values. Add other tests for out-of- class of loops should be redesigned to reflect the use of
range or excluded values. the structured programming constructs.
3. Work outward, conducting tests for the next
loop, but keeping all other outer loops at

Neeraj
Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

Development and Execution of Test Cases


7
Formatted dump or symbolic debugging, tools
Software testing accounts for the largest percentage allowing inspection of program variables on
of technical effort in the software process. The objective error or at chosen points.
of software testing is to uncover errors. To fulfil this Automated functional GUI testing tools are
objective, a series of test steps-unit, integration, used to repeat system-level tests through the
validation and system tests-are planned and executed. GUI.

Neeraj
Unit and integration tests concentrates on functional Benchmarks, allowing run-time performance
verification of a component and incorporation of comparisons to be made.
components into a program structure whereas validation Performance analysis (or profiling tools) that
testing demonstrates traceability to software can help to highlight hot spots and resource
requirements and system testing validates software once usage.

Publications
it is incorporated into the larger system. In a software In this chapter, we will study about the debugging
development project, errors can be injected at any stage process, testing tools and different types of test cases
during the development. We have already discussed the and test plans.
ways of locating the errors in the software product. Here,

www.neerajbooks.com
we will discuss the method of locating and correcting
the errors that are found in the software product. This
process is known as debugging which is viewed as an
DEBUGGING
The goal of testing is to identify the errors in the
program. The testing process tells that there is an error
art. Beginning with the symptomatic indication of a whereas a program’s failure guarantees the presence of
problem, the debugging activity must track down the an error. After this the cause and place of error is being
cause of an error. Of the many resources available during found. This process is called debugging. Hence,
debugging the most valuable is the counsel of other debugging is the process of locating and correcting the
members of software engineering staff. errors. Debugging is not testing but always occurs as a
Program testing and fault detection can be aided consequence of testing. The outcome of the debugging
significantly by testing tools and debuggers. Testing/ process can be any one of the following:
debug tools include features such as: (i) The cause will be found, corrected and
Program monitors, permitting full or partial removed, or
monitoring of program code including (ii) The cause will not be found.
instruction set simulator, permitting complete While performing debugging guidelines that are to
instruction level monitoring and trace be followed are:
facilities, program animation, permitting step- 1. Debugging is a process of solving a problem.
by-step execution and conditional breakpoint The cause of the error should be understood
at source level or in machine code and code before the debugging process starts.
coverage reports.

www.neerajbooks.com
www.neerajbooks.com

2. Experimentation should not be done while 1. Identify the errors.


debugging because they may add new errors 2. Design error report.
instead of removing the previous ones. 3. Analyze the errors.
3. If there is an error in one segment of a program 4. Debugging tools are used.
then there will be error in other parts of the 5. Fix the errors.
program also, so the program should be 6. Retest the software.
examined properly. After the errors are fixed, the software is tested
4. Regression testing must be performed to ensure again using regression testing in order to find out that
that the new code added in the program to the new code inserted to correct a bug does not introduce
remove errors is correct. new errors. The debugging process starts with the
Debugging Process: During debugging errors are execution of a test case which when on failure will lead
encountered that range from less damaging to to locate the cause of failure. Once the error is found
catastrophic. the cause of the error is found and corrected. This is
To debug an error found in the system following shown below with the help of a diagram:
steps should be performed:

Neeraj
Publications
www.neerajbooks.com
Debugging checks the correctness and the performance of software to do fault detection.
Difference between software testing and debugging can be shown as follows:
S. No. Software Testing Debugging

1. It is the process of executing the It is an activity of locating and correcting errors.


program with the intent of finding faults.
2. It is a phase of Software Development It is a consequence of testing.
Life Cycle (SDLC).
3. Once code is written testing starts. It begins with the execution of test cases.
4. It comprises of verification and It attempts to match symptom with cause thereby
validation of software. leading to error correction.
5. It uses unit, integration and It checks the correctness and performance of the
system level testing. software.

www.neerajbooks.com
www.neerajbooks.com

Debugging Approaches: Following are the 5. Induction and Deduction Approach:


approaches for debugging the Software Under Test (SUT): Inductive Approach: The inductive approach
1. Brute Force Method: This method is most comes from the formulation of a single working
common and least efficient for isolating the hypothesis based on the data, on the analysis
cause of a software error. We apply this method of existing data and on especially collected
when all other fail. In this method, a printout data to prove or disprove the working
of all registers and relevant memory locations hypothesis. It can be performed by following
is obtained and studied. All dumps should be steps:
well documented and retained for possible use (a) Locate the Pertinent Data: It is the
on subsequent problems. enumeration of all the information i.e. what
2. Trial and Error: This is a slow and a wasteful the program did correct or incorrect that led
approach. In this approach, the debugger looks the system to have an error. Additional valuable
at the error symptoms and makes a judgement clues are provided by similar, but different, test
to where the error will be located in the cases that do not cause the symptoms to appear.
program and jumps into and roam around in (b) Organize the Data: Here, structuring of the
the program with one or more debugging data is done to observe the patterns.
techniques. (c) Devise a Hypothesis: Here, the relationship
3. Backtracking: This approach is used to among the clues and devise using the patterns
examine the error symptoms to see where they that are observed in the previous step that cause
are noticed first. Then we back track the error is studied. Devise a theory amongst the

Neeraj
program till the point where no symptoms are multiple theories that are possible and obtained
seen. Generally, this program will tell the by devising and executing additional test cases.
location of the errors that occur in the program. (d) Prove the Hypothesis: This is the most
4. Insert Watch Points: Watch points or output important step before fixing the error that
statements could be inserted at different places occurred in the program. It is vital to prove

Publications
in the program. In this approach, when we the reasonableness of the hypothesis before
insert the output statements we can trace a lot proceeding. The hypothesis is proved by
of errors easily as if one watch point executes comparing it to the actual data making sure
without any problem then there is no error in that the hypothesis completely explains the
the program before that watch point. This will existence of the clues. If it does not either the

www.neerajbooks.com
thus eliminate the problems involved with hypothesis is invalid, or the hypothesis is
adding adhoc-debugging statements to the incomplete or multiple errors are present.
program manually. It’s shown diagrammatically below:

www.neerajbooks.com
www.neerajbooks.com

Deductive Approach: This process begins with (c) Refine the Remaining Hypothesis: The
enumerating all causes or hypothesis which is possible. possible cause at this point may be correct, but
Then one by one particular causes are ruled out until a it is unlikely to be specific enough to pinpoint
single one remains for validation. The steps are as the error. In this step, the available clues are
follows: refined to something more specific.
(a) Enumerate The Possible Causes or (e) Prove the Remaining Hypothesis: This is the
Hypothesis: In this step, we develop a list of most important step before fixing the error that
all causes of the error. They need not be occurred in the program. It is vital to prove
complete explanations. the reasonableness of the hypothesis before
(b) Use the Data to Eliminate Possible Causes: proceeding. The hypothesis is proved by
By a careful analysis of the data, particularly comparing it to the actual data making sure
by looking for contradictions, one attempts to that the hypothesis completely explains the
eliminate all but one of the causes. If all causes existence of the clues. If it does not either the
are eliminated then additional data will be hypothesis is invalid, or the hypothesis is
needed to devise new theories. If more than incomplete or multiple errors are present.
one cause remains then the most probable one This is shown diagrammatically below:
is selected.

Neeraj
Publications
Debugging Tools: Each of the debugging approach Software testing tools are frequently used to ensure

www.neerajbooks.com
can be supplemented with debugging tools. For it, we consistency, thoroughness and efficiency in testing
can apply a wide variety of debugging tools such as software products and to fulfil the requirements of
debugging compilers, dynamic debugging aids, planned testing activities. There are different types of
automatic test case generators, memory dumps and cross tools available and some of them are:
reference maps. 1. Static analysers, which examines program
TESTING TOOLS AND ENVIRONMENTS systematically and automatically.
To improve the quality and quantity of testing the 2. Code inspectors, who inspect the program to
program should be made as pleasant as possible for the ensure that they adhere to minimum quality
standards.
tester. This means that tools should be concise, powerful
3. Standard enforcers, they impose simple rules
and natural as possible.
on the developer.
Since testing is of two types:
4. Coverage analysers, they measure the extent
(i) Static testing of the coverage.
(ii) Dynamic testing. 5. Output comparators, it will tell whether the
So the two broad categories of software testing tools output of the program is appropriate or not.
are: 6. Test file or data generators, they are used to
(i) Static tools set up test inputs.
(ii) Dynamic tools. 7. Test harness, they are used to simplify test
Static testing tools seek to support the static testing operations.
process whereas dynamic testing tools support the 8. Test archiving systems, they are used to
dynamic testing process. provide documentation about the program.

www.neerajbooks.com
www.neerajbooks.com

The categories of testing tools are: (iv) Test Coverage Measurement: In terms of the
Static Testing Tools: Static testing tools are those structure of the program test effectiveness is
that are used to perform analysis of the programs without determined.
executing them. (v) Test Planning: Tests are being planned so they
They may include the following: are both efficient and effective at forcing
Static Analysers: It operates from a precomputed discovery of errors.
database of descriptive information derived from the They may include the following:
source text of the program. It is used to prove the Coverage Analyser: It is an execution verifier that
allegations which are claim about the analysed programs is most common and important tool for testing. CI
that can be demonstrated by systematic examination of coverage the most common strategy for testing involves
all the cases. These are language dependent and need declaring a minimum level of coverage that is expressed
high initial tool investment costs. in percentage of the elemental segments that are
Code Inspectors: A job of enforcing standards in exercised in aggregate during the testing process.
a uniform way for many programs is done by code It is difficult to perform coverage analysis when
there is too little space or when non real-time operation
inspector. These can be single or multiple statement
is equivalent to real-time operation.
rules. It is also possible to build code inspector
Output Comparators: They are used in dynamic
assistance programs that force the inspector to do a good
testing both single and multiple module varieties to
job by linking to the process through an interactive
check that predicted and actual outputs are equivalent.

Neeraj
environment. It is also done during regression testing. Its objective is
Standard Enforces: It is similar to code inspector to find the differences between two files; the old and
except that the rules here a bit simpler. It looks only at the new output from the program.
the single statements instead of looking at the entire Test Files Generators: It creates a file of
program as done by the static analyser. Since only single information that is used as the program and does so

Publications
statements are involved the standards enforced tend to based on commands given by the user and or from data
be cosmetic ones because they enhance the readability descriptions program’s data definition section.
of the programs. Test Data Generators: It is present for which no
Other Tools: The related tools are used to catch general solution exists. On the other hand, there is a
bugs indirectly through listings of the program that practical need for methods to generate test data that meet

www.neerajbooks.com
highlight the mistakes. a particular objective, normally to execute a previously
Dynamic Testing Tools: They support the dynamic unexercised segment in the program.
testing process. Besides individual tools that accomplish Test Harness Systems: It is the one that is bound
these functions, a few integrated systems group the around the test object and that permits easy modification
functions under a single implementation. and control of test inputs and outputs and provide for
A test consists of single invocation of the test object online measurement of CI coverage. Some of them are
and all the execution that ensures till the point when batch oriented, but the high degree of interaction
available in a full-interactive system makes it seem very
test object returns control to the point where invocation
attractive in practical use.
was made. Subsidiary modules can be real or even
Test-archiving Systems: Its goal is to keep track
simulated by testing stubs.
of series of tests and to act as the basis for documenting
A series of tests are required to test a single or a that the tests that have been done and that no defects
set of modules. Test support tools must perform the were found during the process.
following functions: TYPES OF TEST CASES AND TEST PLANS
(i) Input Setting: Selection of test data that the Testing is concerned with errors, faults, failures and
test object will read when called. incidents. A test is the act of exercising software with
(ii) Stub Processing: When the stub is called it test cases. A test has two goals-to find failures or to
handles outputs and selects inputs. demonstrate correct execution.
(iii) Results Display: Values produced by test Test case describes an input description and an
objects are provided so that they can be expected output description. It has an identity and is
validated. associated with the program behaviour. During testing

www.neerajbooks.com
www.neerajbooks.com

the preconditions are set and the required inputs are different then there is a failure which should be recorded
given to the program. Execute the program. Compare properly in the test case with the cause of the error. If
the observed output with the expected output of the both are same then the program behaved in the expected
program. If the expected and observed outputs are manner. The template for a test case is as follows:
Test Case ID:
Section- 1 Section- 2
(Before Execution) (After Execution)
Purpose: Execution History:
Pre-condition: (if any) Result:
Inputs: If fails, any possible reason (Optional):
Expected Outputs: Any other observation:
Post conditions: Any suggestion:
Written by: Run by:
Date: Date:

The different types of test cases are as follows: Non-Functional Test Case: Test cases related to
1. Integration Test Case User friendliness like font, image, colour, how easy to

Neeraj
2. Functional Test case navigate etc, performance related, security related comes
3. Non-Functional Test cases (which include under here.
security, performance and usability) User Acceptance Test Case: These test cases are
4. User Acceptance Test cases (end to end crucial and very important to client side people, because
scenario). these test case talks about their business and approach
Validation Test Case: Here, all the above stated

Publications
of the application to complete a particular client task
techniques of test cases fall under validation test cases which is also called as End-End-Business scenario test
itself; there is no separate test case for validation, when
case. Here we won’t be doing testing related to UI,
we execute all the above test cases we can conclude we
Functional or Non-Functional, we talk about business
have done the entire validation too.
and scenario which the application is made for.

www.neerajbooks.com
Verification Test Cases: After writing the entire test
A Software Test Plan is a document describing the
cases, there will be some dedicated people who review
testing scope and activities. It is the basis for formally
these test cases to check whether these test cases written
according to the requirements or not, in such a case it is testing any software product in a project.
called verification test case and when we are executing Depending on the product and the responsibility
those test cases it is called validation test cases. of the organization to which the test plan applies, a test
In a simple way expected results are verification plan may include one or more of the following:
and actual results are validation. Design Verification or Compliance Test: To
Integration Test Case: Here, we execute test cases be performed during the development or
which just tells about the connectivity from one module approval stages of the product, typically on a
to other module and integrating one application to other small sample of units.
application and how the application moves from parent Manufacturing or Production Test: To be
node to child node and vice versa. performed during preparation or assembly of
Functional Test Case: Here, we execute test cases the product in an ongoing manner for purposes
which tell about the functionality of the application and of performance verification and quality
talks about the desired output to be seen. Internally we control.
have different type of test cases when we write here Acceptance or Commissioning Test: To be
like range, output values, BVA, ECP and so on. We give performed at the time of delivery or installation
input and expect some output according to the SRS. of the product.
Here we check individual module completely by Service and Repair Test: To be performed as
checking each and every tab, text box and buttons and required over the service life of the product.
so on.

www.neerajbooks.com
www.neerajbooks.com

Regression Test: To be performed on an identify training that is necessary to provide those skills,
existing operational product, to verify that if not already acquired.
existing functionality didn’t get broken when Responsibilities: It will list the responsibilities of
other aspects of the environment are changed. each team or role or an individual.
According to the IEEE standards the test plan Risks: It will list all the risks that have been
should contain the following: identified in the software product. It will also specify
Test Plan Identifier: It provides a unique identifier the mitigation plan and the contingency plan for each
for the document. risk that has been identified.
Introduction: It provides an overview of the test Assumptions and Dependencies: It will list the
plan. It also specify the goals/objectives and any assumptions that have been made during the preparation
constraints. of this plan. It will also list the dependences that are
References: It lists the related documents, with present in the software or the product.
links to them if available, including the project plan and Approvals: It will specify the names and roles of
configuration management plan. all the persons who must approve the plan that has been
made for the software product. If the document is printed
Test Items: It lists the test items (software/products)
then it should provide space for signatures and dates.
and their versions.
There can be following types of test plans:
Features to be tested: It lists the features of the
1. Master Test Plan: A single high-level test plan
software product to be tested and provide references to
for a project/product that unifies all other test

Neeraj
the requirements and or design specifications of the
plans.
features to be tested. 2. Testing Level Specific Test Plans: Plans for
Features not to be tested: It lists the features of each level of testing:
the software product which will not be tested and specify Unit Test Plan: Here, only one module or a
the reasons why these features won’t be tested. unit is considered.
Approach: It will mention the overall approach to Integration Test Plan: Here, the interaction

Publications
testing and specify the testing levels, testing types and between one or more modules is considered.
the testing methods. System Test Plan: Here, the entire system is
Item pass/fail criteria: It will specify the criteria in consideration.
that will be used to determine whether each test item Acceptance Test Plan: Here, the test plans

www.neerajbooks.com
i.e. software or product has passed or failed the testing are taken in consideration from the point of
process. customers for whom the software product is
Suspension Criteria and Resumption being made.
Requirements: It will specify the criteria to be used to 3. Testing Level Specific Test Plans: Plans are
suspend the testing activity. It also specifies the testing major types of testing like Performance Test
activities which must be redone when testing is resumed. Plan and Security Test Plan.
Test Deliverables: It will list the rest of the
deliverables, and links to them if available including
Q. 1. What is Debugging? Explain Debugging
test plan, test cases, test scripts, defect or enhancement
Process?
logs and test reports. Ans. Debbuging occurs as a consequence of
Test Environment: It will specify the properties successful testing. That is, when a test case uncover an
of test environment i.e. hardware, software, communi- error, debugging is the process that results in the removal
cations etc. It will also list any testing or related tools. of the error. Although, debugging can and should be an
Estimate: It will provide a summary of test orderly process, it is still very much an art. A software
estimates i.e. cost or effort and or provide a link to the engineer, evaluating the results of a test, is often
detailed estimation. confronted with a “symptomatic” indication of a
Schedule: It will provide a summary of the software problem. That is, the external manifestation
schedule, specifying key test milestones and or provide of the error and the internal cause of the error may have
a link to the detailed schedule. no obvious relationship to one-another. The poorly
Staffing and Training Needs: It will specify the understood mental process that connects a symptom to
staffing needs by role and required skills. It will also a cause is debugging.

www.neerajbooks.com
www.neerajbooks.com

Debugging

The Debugging Process: Debugging is not testing, (iv) The symptom may be caused by human error

Neeraj
but it always happens as a consequence of testing. As that is not easily traced.
shown in above figure the debugging process begins (v) The symptom may be a result of timing problem,
with the execution of a test case. Results are assessed rather than processing problems.
and a lack of corresponding data is a symptom of an (vi) It may be difficult to accurately reproduce input
underlying cause as yet hidden. The debugging process conditions (e.g.,a real-time application in which
tries to match symptom with cause thereby leading to

Publications
input ordering is in-determinate).
error correction.
(vii) The symptom may be intermittent. This is
The debugging process will always have one of two
particularly common in embedded systems that
outcomes: couple hardware and software inextricably.
(i) The cause will be found, corrected and removed, (viii) The symptom may be due to causes that are

www.neerajbooks.com
or distributed across a number of tasks running on
(ii) the cause will not be found. In the latter case, different processors.
the person performing debugging may suspect
During debugging, errors are found that range from
a cause, design a test case to help validate his or
mildly annoying (e.g., an incorrect output format) to
her suspicion and work towards error correction
in an interactive fashion. catastrophic (e.g., the system fails, causing serious
Q. 2. Why is Debugging difficult? Also mention economic or physical damage). As the consequences of
the characteristics of bugs that are encountered in an error increase, the amount of pressure to find the
the Testing Process? cause also increases. Often, pressure forces a software
developer to fix one error and at the same time introduce
Ans. Debugging is considered difficult. But human
psychology has more to do with it than does software two more.
technology. A few characteristics of bugs provide some Q. 3. Mention the different approaches of
clues: Debugging?
(i) The symptom and the cause may be Ans. Debugging Approaches: The objectives of
geographically remote. That is, the symptom debugging is to find and correct the cause of a software
may appear in one part of a program, while the error. The objective is realized by a combination of
cause may actually be located at a site that is far systematic evaluation, intuition, and luck. Bradley
removed. Highly coupled program structures describes the debugging approach in these words:
create this situation. Debugging is a straight forward application of the
(ii) The symptom may disappear (temporarily less) scientific method that has been developed over 2,500
when another error is corrected. years. The basis of debugging is to locate the problem’s
(iii) The symptom may actually be caused by non- source by binary partitioning, through working
errors (e.g., round-off inaccuracies). hypotheses that predict new values to be examined.

www.neerajbooks.com
www.neerajbooks.com

In general, there are three categories of debugging potential backward paths may become unmanagebly
approaches: large.
1. Brute force 3. The third approach to debugging: cause
2. Backtracking elimination– is manifested by induction or deduction
3. Cause elimination. and introduces the concept of binary partitioning. Data
1. The brute force debugging is probably the most related to the error occurrence are organized to isolate
potential causes. A “cause hypothesis” is devised and
common and least efficient method for isolating the
the data are used to prove or disprove the hypothesis.
cause of a software error. It is used, when all else fails. Alternatively, a list of all possible causes is developed
Using a “let the computer find the error” philosophy, and tests are conducted to eliminate each. If initial tests
memory dumps are taken, run-time traces are invoked, indicate that a particular cause hypothesis shows
and the program is loaded with WRITE statements. promise, the data are refined in an attempt to isolate the
Although, the mass of information produced may bug.
ultimately lead to success, it more frequently leads to Each of the above debugging approaches can be
wasted effort and time. supplemented with debugging aids (“tracers”),
2. Backtracking is a fairly common debugging automatic test case generators, memory dumps and cross
approach used successfully in small programs. references maps are used. However, tools are not a
Beginning at the site where a symptom has been substitute for careful evaluation based on a complete
uncovered, the source code is traced backward software design document and clear source code.
(manually) until the site of the cause is found. However, Also, we can take help of other people in finding
as the number of source lines increases, the number of the bugs.

Neeraj
Q. 4. Give the template for Test Case?
Ans. The template of the Test Case is as follows:
Test Case ID:
Section- 1 Section- 2

Publications
(Before Execution) (After Execution)
Purpose: Execution History:
Pre condition: (if any) Result:
Inputs: If fails, any possible reason (Optional):

www.neerajbooks.com
Expected Outputs: Any other observation:
Post conditions: Any suggestion:
Written by: Run by:
Date: Date:

Q. 5. Give the template for Test Plan? 3.7. Documentation Test


Ans. The template for test plan is as follows: 3.8. Beta Test
1. Introduction 3.9. User Acceptance Test
1.1. Test Plan Objectives 4. Environment Requirements
2. Scope 4.1. Data Entry workstations
2.1. Data Entry 4.2 Main Frame
2.2. Reports File Transfer 5. Test Schedule
2.3. File Transfer 6. Control Procedures
2.4. Security 6.1 Reviews
3. Test Strategy 6.2 Bug Review meetings
3.1. System Test 6.3 Change Request
3.2. Performance Test 6.4 Defect Reporting
3.3. Security Test 7. Functions to Be Tested
3.4. Automated Test 8. Resources and Responsibilities
3.5. Stress and Volume Test 8.1. Resources
3.6. Recovery Test 8.2. Responsibilities

www.neerajbooks.com
www.neerajbooks.com

9. Deliverables 13.2. Technical


10. Suspension/Exit Criteria 13.3. Management
11. Resumption Criteria 13.4. Personnel
12. Dependencies 13.5 Requirements
12.1 Personnel Dependencies 14. Tools
12.2 Software Dependencies 15. Documentation
12.3 Hardware Dependencies 16. Approvals
12.3 Test Data & Database Q. 6. What is the difference between Static
13. Risks Testing and Dynamic Testing?
13.1. Schedule Ans. The difference between them is as follows:
Static Testing V/S Dynamic Testing
S. No. Static Testing Dynamic Testing
1. It does not require the actual execution It involves testing the software by actually
of software. executing it.
2. It is more cost effective. It is less cost effective.
3. It may achieve 100% statement It achieves less than 50% statement coverage
coverage in relatively short time. because it finds bugs only in part of codes

Neeraj
that are actually executed.
4. It usually takes shorter time. It may involve running several test cases,
each of which may take longer time than compilation.
5. It may uncover a variety of bugs. It uncovers limited types of bugs that are

Publications
explorable through execution.
6. It can be done before compilation. It can take place after executables are ready.

Q. 7. What are the different types of Testing i.e. they do not test the actual execution of the software.
Tools? They include the following:

www.neerajbooks.com
Ans. Different types of tools are: (a) Flow Analyzers: They ensure consistency in
1. Static analyzers, which examines program data flow from input to output.
systematically and automatically. (b) Path Tests: They find unused code and code
2. Code inspectors, who inspect the program to with contradictions.
ensure that they adhere to minimum quality (c) Coverage Analyzers: It ensures that all logic
standards. paths are tested.
3. Standard enforcers, they impose simple rules (d) Interface Analysers: It examines the effects
on the developer. of passing variables and data between modules.
4. Coverage analyzers, they measure the extent Q. 9. What are Dynamic Test Tools?
of the coverage. Ans. These tools test the software system with ‘live’
5. Output comparators, it will tell whether the data. They include the following:
output of the program is appropriate or not. (a) Test Drivers: It inputs data into a module-
6. Test file or data generators, they are used to under-test.
set up test inputs. (b) Test Beds: It simultaneously displays source
7. Test harness, they are used to simplify test code along with the program under execution.
operations. (c) Emulators: The response facilities are used
8. Test archiving systems, they are used to to emulate parts of the system not yet
provide documentation about the program. developed.
Q. 8. What are the Static Test Tools? (d) Mutation Analyzers: The errors are
Ans. These tools do not involve actual input and deliberately ‘fed’ into the code in order to test
output rather they take a symbolic approach to testing fault tolerance of the system.

www.neerajbooks.com
www.neerajbooks.com

SOFTWARE ENGINEERING CONCEPTS

Software Development Models


8

Software is not merely a collection of computer PROGRAM VERSUS SOFTWARE


programs. There is a distinction between a program and Software is not just programs, it includes programs,
a programming system product. A program is generally documentation of any facet of the program and the
complete in itself and is generally used only by the procedures used to set up and operate the software
author of the program. There is usually little system. We can study the components of the software
documentation or other aids which can help other people systems in the Fig.1.1.
use the program. Since the author is the user, the

Neeraj
presence of bugs is not a major concern; if the program
crashes, the author will fix the program and start using
it again. These programs are not designed with such
big issues as portability, reliability and usability in mind.
However, a programming system product is used
largely by people other than the developers of the

Publications
system. The users may be from different backgrounds,
so a proper user interface is provided. There is sufficient Fig. 1.1. Components of Software
documentation to help these diverse users use the Software = Program + Documentation +
system. Programs are thoroughly tested before put into Operating Procedures
operation use, because users do not have the luxury of Any program is a subset of software and it becomes
fixing bugs that may be detected. Since the product may software only if documentation and operating procedure

www.neerajbooks.com
be used in a variety of environments, perhaps on a manuals are prepared. A combination of source code
variety of hardware, portability is a key issue. and object code is known as program.
Documentation includes various types of manuals which are given below:
Formal Specification
Analysis / Context-Diagram
Specification
Data Flow
Diagrams

Flow Charts
Design
Entity Relationship
Diagrams
Documentation manuals
Source Code Listings

Implementation Cross-reference Listings


Test Data

Testing Test Results

www.neerajbooks.com
www.neerajbooks.com

Operating procedures explains instructions to set up and use the software system and instructions on how to
react to system failure. We can study the list of operating procedures manuals/documents as follows:
System Overview
User Manuals Beginner’s Guide Tutorial

Reference Guide

Operating Procedure
Installation Guide

Operational Manuals System


Administration Guide
Software Process: The way in which we produce time we spend developing better ways to work tomorrow
software is known as the software process. This varies is not available for today’s project. But, software
from organization to organization. Beside hiring smart organizations should not give up, but should take
and knowledge developers and buying the latest motivation from long term benefits that many
development tools we also need to use effective software organizations have enjoyed from sustained software

Neeraj
development processes, so that developers can process improvement initiatives.
systematically use the best technical and managerial Software Characteristics: The software has a very
practices to successfully complete their projects in the special characteristic and its nature is quite different
highly competitive software business. To improve the from other products. Various important characteristics
quality, productivity, predictability of their software of software are:
development and maintenance, organizations are 1. Software does not Wear Out: In reliability

Publications
following software process improvement. Many studies for hardware products, there is a well known
organizations are unable to achieve significant bath tub curve. The shape of this curve is like bath tub
improvements in the way they conduct their projects. It and so it is known as bath tub curve.
is due to the following reasons:

www.neerajbooks.com
1. Lack of time: Schedules are impractical which
leave insufficient time to do the significant project work.
Customers and senior managers demand higher quality
software in minimum possible time. Hence, there is
always lack of time.
2. Insufficient Knowledge: Many software
developers are not aware of industry best practices.
Software developers generally do not spend time reading
the literature to find out about the best known ways of
software development.
3. Wrong Motivations: At times, organizations
launch process improvement initiatives for the wrong
reasons. The basic motivation for software pros
improvement should be to avoid some of the current
difficulties faced on the project. People should be There are three phases for the life of the hardware
motivated to meet their commitments, improving product. Initial phase is burn-in phase; during this stage
customer satisfaction and delivering excellent products failure intensity is high. The second phase is the useful
that meet customer expectations. life phase and is called useful life of a product; failure
4. Lack of Commitment: Sometime, due to lack intensity is approximately constant during this stage.
of true commitment, the software process improvement Third phase is called the wear out phase where failure
fails. The investment we make in process improvement intensity will increase due to wearing out of components.
will not work on current productivity; it is because the The curve for software is:

www.neerajbooks.com
www.neerajbooks.com

Only-Memory (ROM): of the product. The


product can be aircraft, automobile, signalling
system, security systems, etc. It is also known
as intelligent software.
(iv) Business Software: It is the largest application
area. The software designed to process
business applications is known as business
software for example, payroll, file monitoring
system, employee management, account
management, management information
system, enterprise resource planning, etc.
2. Software is not Manufactured: The life of the (v) Personal Computer Software: The software
software is from concept exploration to the retirement used in personal computers is Personal
of the software product. It takes one time effort to Computer Software (PCS). For example, word
develop the software and is maintained continuously to processors, computer graphics, multimedia and
keep it operational. animating tools, database management,
3. Reusability of Components: If we have to compute games, etc.
manufacture a computer we may purchase picture tube (vi) Artificial Intelligence Software: It uses non-
from one vendor, cabinet from other, design card from numerical algorithms to solve complex
problems that are not amenable to computation

Neeraj
third and other electronic component from fourth
vendor. We will assemble every party and test the or straight forward analysis. For example,
product thoroughly to produce a good quality computer. expert systems, signal processing software, etc.
In software, every project is a new project. We have to (vii) Web Based Software: The software related
start from the scratch to design a unit of the software to web application is web based software. For
product. It requires huge effort to develop the software example, CGI, HTML, JAVA, Perl, DHTML

Publications
which further increases the cost of the software product. etc.
Effort has been made to design standard components (viii) Engineering and Scientific Software:
that may be used in new projects. Software reusability Scientific and engineering application software
has introduced another area and is known as component comes under this category. Huge computing is
based software engineering. normally required to process data. For

www.neerajbooks.com
4. Software is Flexible: A program can be example, CAD/CAM package, Engineering
developed to do almost anything. Sometimes, this Pro, Circuit analyser etc.
characteristic is the best and helps to accommodate any DEFINITION OF SOFTWARE ENGINEERING
kind of change. We feel that software is flexible. Software: Software is a critical important
Software Applications: Software has become infrastructure component. It is a key enabler for
integral part of each organization. Software applications militarily, economically, scientifically and culturally but
are grouped into eight areas which are as follows: usually very expensive and of poor quality.
(i) System Software: Under this category Software is often divided into two categories:
infrastructure software comes like compilers, 1. Systems Software: Includes the operating
operating systems, editors, drivers etc. It is a system and all the utilities that enable the computer to
collection of programs to give service to other function.
programs. 2. Applications Software: Includes programs that
(ii) Real Time Software: This software is used to do real work for users. For example, word processors,
monitor, control and analyze real world events spreadsheets and database management systems fall
as they take place. For example, the software under the category of applications software.
may be used for weather forecasting. Such At the first conference on software engineering in
software will collect and process the status of 1968, Fritz Bauer defined software engineering as “The
temperature, humidity and other environmental establishment and use of sound engineering principles
parameters to forecast the weather. in order to obtain economically developed software that
(iii) Embedded Software: It controls the various is reliable and works efficiently on real machines.”
functions of the product and is placed in Read- Stephen Schach defined it as “A discipline whose aim

www.neerajbooks.com
www.neerajbooks.com

is the production of quality software, software that is Objectives of Software Engineering: Following
delivered on time, within budget and that satisfies the are the objectives of software engineering:
requirements”. It was meant to provoke thought Understanding user conceptual models and
regarding perceived “software crisis”. development of better specifications.
Software Crisis: The term is used to describe the Improvement in design languages and reusable
impact of rapid increases in computer power and the code.
complexity of the problems that could be tackled. It Participatory design and interactive debugging.
refers to the difficulty of writing correct, understandable Specification of interface and mockup to
and verifiable computer programs. Software crisis is confirm specifications.
characterized by inability to develop the desired Software engineering aims at clarification and
Software Project because of the following problems: fluidity of development.
Projects running over-budget. This is software engineering separated out as
Projects running over-time. facilitation: the requirements are given and the
Software is inefficient. material is given (the limits and possibilities
Software is of low quality. of computation as elucidated by computer
Software does not meet requirements. science) – software engineering is left between
Project is unmanageable/code difficult to as the systematic activity to join these together.
maintain. The best it can do, then, is more fluidly
The roots of the software crisis are complexity, construct what we think we want, and more
expectations and change. To avoid software crisis,

Neeraj
clearly show what we have actually built. Think
software engineering principles and process are applied of software engineering as a very broad kind
strictly. of tool. Its purpose is to be a tool that goes
Many software failure have been seen in past. Some easily where you point it and shows you clearly
of them are: where it is pointing – it lets you make what
(i) The Y2K problem: It was the most crucial you want, and shows you what you are making.

Publications
problem of the century. Earlier we used to write
But this is just the essence of software; it is
only last two digits of the year. The 4 digit date
what software does anyway. Software
format, like 1987 was shortened to 2 digit
engineering aims at clarity and fluidity because
format like 87. The developers could not
these are what software essentially and
visualize the problem of year 2000. Millions
distinctively is about. A bit is precisely 0 or 1,

www.neerajbooks.com
of rupees have been spent to handle this
and easily changeable between them. Software
problem.
is clarity and fluidity.
(ii) The ‘star wars’ program of USA produced
This is a derivation of the aim of software
‘Patriot missile’ and was used first time in Gulf
war but these missiles failed to hit the target. engineering from the other side – the material,
So a review team was constituted to find out not the requirements. It tries to keep us close
the reason of failure and result was a software to what software is.
bug. SDLC MODELS
Software Engineering: Software engineering is the The goal of software engineering is to provide
application of a systematic, disciplined, quantifiable models and processes that lead to the production of well-
approach to the development, operation and documented maintainable software in a manner that is
maintenance of software and study of the application predictable. When developing a software product,
of engineering to software. software development organizations, follow some
It is also defined as the systematic approach to the processes. In immature organization the process is not
analysis, design, assessment, implementation test, and written down whereas in a mature organization the
maintenance and re-engineering of software. process is in written and is actively managed. The
The objective of software engineering is to solve process is based on the life cycle model which is the
the problems of cost, timeliness, maintenance and key component of any software development process.
quality by producing good quality, maintainable The particular life cycle model can significantly affect
software, on time, within budget. For this objective to overall life cycle costs associated with a software
be achieved, one should take care of the quality of the product. Life cycle starts from conceptual explanation
product and the process used to develop the product. and ends at the retirement of the software.

www.neerajbooks.com
www.neerajbooks.com

In IEEE standard glossary of software engineering


terminology, the software life cycle is:
“The period of time that starts when a software
product is conceived and ends when the product is no
longer available for use. The software life cycle typically
includes requirement phase, design phase, implementation
phase, test phase, installation and check out phase,
operation and maintenance phase and sometimes
retirement phase.”
It is also called as Software Development Life
Cycle. This approach may work properly on small
Varieties of life cycle models have been proposed programming say for 100 or 200 lines long. There is no
and are based on tasks involved in developing and space for design or any aspect of development process
maintaining software. Some of them are as follows: to be carried out in a structure or detailed way. Cost for
1. Build and Fix Model: At times product is development using this approach is very high and even
constructed without specifications or any attempt at maintenance is an issue without the specification or
design. Instead the developer simply builds a product design documents.
that is corrected as many times as necessary to satisfy 2. The Waterfall Model: It is a sequential model.
the client. It is an adhoc approach and not defined This model has five phases. They are:
properly. It is a two phase model. First phase is to write

Neeraj
Requirement analysis and specification
code and the second phase is to fix the errors that are Design
encountered in the first phase or adding of new Implementation and unit testing
functionalities. This process is repeated many times till Integration and system testing
the product is not satisfactory. This is shown below with Operation and maintenance.
the help of a diagram:

Publications
The phases always occur in this order and do not overlap. Each phase must be completed before the next phase
begins. It is called as “Waterfall Model” since its diagrammatic representation is like a cascade of waterfalls.
The diagrammatic representation is shown below:

www.neerajbooks.com
Requi rement Analysis
and Specification

Design

Implementation and
Uni t Testing

Integration and
System Testing

Operation and
Maintenance

Waterfall Model

www.neerajbooks.com
www.neerajbooks.com

The phases of waterfall model are described below: to keep the software operational after release is very
1. Requirement Analysis and Specification: The significant. Maintenance of software includes error
goal of this phase is to understand the exact requirements correction, enhancement of capabilities, deletion of
of the customer and document them properly. Its obsolete capabilities and optimization. The purpose of
objective is to document all functions, performance and this phase is to preserve the value of software over time.
interfacing requirements for the software and is executed Advantages of Waterfall Model are:
together with the customer. It describes “what” of the (a) Well defined phases with well defined output.
system and not the “how” that is a large document, (b) It recognizes the sequence of software
written in natural language, contains the description of engineering activities that shall result in a
what the system will do without describing how it will software product.
be done. This document is called the software Problems of Waterfall Model are:
requirement specification document. Thus, SRS for the (a) Difficult to define all the requirements at the
product is prepared in this phase. beginning of the project.
2. Design Phase: The main goal of this phase is to (b) Not suitable for accommodating any changes.
transform the requirements specification into a structure (c) Working model is not seen until late in the
that is suitable for implementation in some programming project’s life.
language. Here, definition of the overall software

Neeraj
(d) Does not scale up well for large projects.
architecture is given and the high level and detailed
(e) Real projects are rarely sequential.
design work is performed. The documentation of this
3. Prototyping Model: A problem with waterfall
work is known as Software Design Description (SDD)
model that is the working model is not visible until late
document.
in the project’s life thus delaying the discovery of serious
3. Implementation and Unit Testing Phase: The

Publications
error is being overcome here. This is done by creating a
design is implemented in this phase. The implementation
working prototype of the software instead of actually
or coding phase begins on the completion of SDD
developing the actual software. This working model is
because all the information needed is contained in the
developed according to the current working
SDD. Here, small modules are tested first in isolation

www.neerajbooks.com
requirements. The developers use this prototype to refine
from the rest of the software product. Problems related
the requirements and prepare the final requirement
to how to test a single module in isolation without
specification document. The prototype once created is
anything to call it are solved in this phase and modules
are tested after writing some overhead code. handed to the customer for reviewing. This will help to
4. Integration and System Testing Phase: It is an correct the requirements and remove uncertainties from
important phase. Effective testing will yield a higher the software product. This is done iteratively for the
quality software product which will have more satisfied clarity of the software.
users, lower maintenance costs and more accurate and The prototype may be a usable program but it is
reliable results. It is an expensive activity as it consumes not suitable for the final software product because of
almost half of the cost required to develop a software its poor performance, maintainability or overall quality.
product. Integration testing is performed to check It is a throw away prototype. Hence, developing of
whether the interactions between module are correct or prototype involves greater cost but overall cost will be
not. System testing involves the testing of entire system, less than the one in the waterfall model.
whereas software is the part of the system. The developers should develop the prototype as
5. Operation and Maintenance Phase: Software early as possible to speed up the software development
maintenance is a task that every development group has process. A prototype is made just to know the actual
to face, when the software is delivered to the customer’s requirements of the customer for the software. Once
site, installed and is operational. Time and effort required the requirements are gathered and documented in the

www.neerajbooks.com
www.neerajbooks.com

SRS the prototype is thrown away and the waterfall computers and therefore are unable to envisage
model approach is followed to develop the software. the features they need.
(b) The proposed system is expected to have
This model produces a good quality software but it
considerable user interface.
requires active participation of the customer which is (c) The development environment supports the
not possible always. quick creation of a prototype.
The diagrammatic representation of this model is (d) The proposed system has complex algorithms
shown in the following figure: or outputs that need to be refined.
Disadvantages of the Model are:
Requirements (a) Users on seeing working prototype expect to
see the actual system soon.
(b) If the prototype is not good enough the users
Quick Design get disappointed with the prototype and loose
interest in the system being developed.
Refinement of (c) Prototypes are made in hurry, often without
Implement requirements as per
suggestions evaluating all options, or understanding the full
implication of the technical choices made.
4. Iterative Enhancement Model: It has the
Customer Evaluation same phases as the waterfall model with few restrictions.

Neeraj
Not ac cepted by customer
The phases occur in the same order as in waterfall but
Accepte d by custome r
in several cycles. A usable product is released at the
Design end of each cycle with each release providing additional
functionality. During the first requirement analysis phase
as many requirements as possible are specified and a

Publications
Imple mentation and Unit SRS document is prepared. Then these requirements
Testing are being prioritized. Specific requirements are being
implemented in one or more cycles of design,
Integration and S ystem implementation and test based on defined priorities. This
model delivers an operational quality product at each

www.neerajbooks.com
Testing

release, but one that satisfies only a subset of the


Operation and customer’s requirements. The complete product is
Maintenanc e divided into releases and the product is delivered release
by release to the customer. With this model first release
is available within few weeks whereas with waterfall
Advantages of Prototype Model are: and prototype model it takes months or years to receive
(a) Users are unable to specify their requirements a product. The diagrammatic representation of this
or have no previous edge or experience of model is shown below:

Requirements Design Implementation Inte ration and Operation


and Unit Testing System Testing (Install)
Release 1

Design Implementation Integration and Operation


and Unit Testing System Testing (Install)

Release 2
Design Implementation Integration and Operation
and Unit Testing System Testing (Install)

Iterative Enhancement Model Release 3

www.neerajbooks.com
www.neerajbooks.com

Advantages of Iterative Enhancement Model the sense that it does not require a useable product at
are: the end of each cycle. Here, requirements are
(a) Early delivery of parts of the functionality for implemented by category rather than priority.
use. For example, in a simple database application, one
(b) Feedback from the ‘live’ usage of the delivered cycle might implement Graphical User Interface (GUI);
enhancements. This feedback can be used to another file manipulation; another queries and another
prevent similar issues in later releases. updates. All four cycles must complete before there is
(c) Staggered cash flows both for the user working product available.
organization and software organization. Evolutionary development and iterative
(d) High priority features are incorporated in early enhancement are somewhat interchangeable.
releases. Evolutionary development should be used when it is
(e) Re-prioritization is possible in the course of not necessary to provide a minimal version of the system
the project. quickly.
(f) Essential features can be released with smaller It is used for projects using new technology that is
teams. not well understood. It is used for complex projects
Disadvantages of the Model are: where all functionality must be delivered at one time,
(a) Development cost gets higher. but the requirements are unstable or not well understood
(b) Time period for delivery of the entire product at the beginning.
is high. 6. Spiral Model: The problem with software
(c) Planning the delivery enhancements is critical process models is that they do not deal sufficiently with
to the success. the uncertainty, which is there in the software projects.

Neeraj
(d) First few releases need to be designed for Projects have failed because project risks are being
compatibility with subsequent releases. ignored. Barry Boehm recognized this and incorporated
5. Evolutionary Development Model: It it into a life cycle model. This model was known as
resembles iterative enhancement model. It has the same spiral model and was presented in 1986.
phase as for waterfall model but here in a cyclical The Diagrammatic representation of the Spiral
fashion. It differs from iterative enhancement model int Model is shown below:

Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

The radial direction of the model represents the individual or groups of persons. If the developed plan
cumulative cost. Increased cost is indicated by each path fails the spiral gets terminated otherwise it terminates
around the spiral. The progress made in completing each with the initiation of new or modified software.
cycle is represented by the angular dimension. Each loop Advantages of Spiral Model:
of the spiral from X-axis clockwise through 360° (a) Risk analysis is the integral part of the life cycle
represents one phase. One phase is split into four phases. and is performed in every spiral leading to
They are: increased confidence in the software.
1. Planning: It determines objectives, alter- (b) The model is flexible and can be tailored for a
natives and constraints. Here, planning is done, variety of situations.
risks are analysed, prototypes are built and (c) It incorporates software quality objectives into
customers evaluate the prototype. software development.
2. Risk Analysis: It evaluates alternatives and Disadvantages of Spiral Model:
identifies and resolves the risks involved. In (a) Lack of explicit process guidance in
this phase a more refined prototype is built,
determining objectives, constrains and
requirements are documented and validated
alternatives.
and customers are involved in assessing the
(b) Proving more flexibility than required for many
prototype.
applications.
3. Development: In this phase, risks are known.
Here, product development and testing of 7. Rapid Application Development Model: This

Neeraj
product is done. model was proposed by IBM in 1980 through the book
4. Assessment: In this phase, customer of James Martin entitled “Rapid Application
evaluation is done. Development”. In this model, the involvement of user
Identification of problems and classification of is essential from the starting till end that is from
these into different risk levels is the main focus of this requirement phase till the delivery of product.

Publications
model. An important feature of the spiral model is that The process is started with building a prototype
each phase is completed with a review by the people which is given to the user for evaluation. User gives the
concerned with the project. It includes review conducted feedback and the prototype is refined accordingly. This
for all the products developed till that point and also process continues till the requirements of the product
the plans for the next cycle. These plans may include a have been finalized. Once the requirements are finalized

www.neerajbooks.com
partition of the product in smaller portions for
development or components that are implemented by
the SRS and design documents are prepared with the
association of users.
There are Four Phases of this Model they are shown below:

The phases of RAD model are:


1. Requirements Planning Phase: Using any one of the elicitation techniques requirements are being gathered
with the active involvement of the user for understanding the project.
2. User Description: Joint teams developers and users are constituted to prepare, understand and review the
requirements. Automated tools are being used to capture information from other users. Here, a prototype
is developed, evaluated and modified, till everyone agrees that the prototype fulfills the user’s needs.
3. Construction Phase: This phase combines the detailed design, coding and testing phase of waterfall
model. Here, the developers refine the prototype to create the production version of the system. The user
manual and docu-mentation required to maintain the system is developed in this phase.

www.neerajbooks.com
www.neerajbooks.com

4. Cut Over phase: This phase incorporates (b) Design and coding standards are difficult to
acceptance testing by users, installation of the implement and often ignored.
system and user training. (c) Systems developed using RAD method tends
Advantages of RAD Life Cycle Model are:
to be inefficient and weak in housekeeping
(a) Reduces the amount of time taken to develop
database applications that have extensive user functions of the application.
interface. Selection of a Life Cycle Model: The selection of
(b) User participation in testing and development a suitable model is based on the following characteristics
of the software. (i) Requirements
(c) RAD facilitates communication, so developers (ii) Development team
can build better applications faster. (iii) Users
Disadvantages of RAD Life Cycle Model are:
(a) Difficult to achieve consistency within and (iv) Project type and associated risk.
between applications developed by different Requirements: Requirements are very important
teams. for the selection of an appropriate model.
The Selection of the Model is based on the following:

Requirements Waterfall Prototype Iterative Evolutionary Spiral RAD


enhancement development

Neeraj
Requirements are Yes No No No No Yes
easily understood and
defined
Requirements are No Yes No No Yes No
changed often?

Publications
Can requirements be Yes No Yes Yes No Yes
defined early in the
life cycle?
Are requirements No Yes Yes Yes Yes No

www.neerajbooks.com
indicating a complex
system to be built?
Development Team: The status of it is in term of availability, effectiveness, knowledge intelligence, etc., is
very important for the success of the project. Appropriate Life Cycle Model is choosen from the following:

Development team Waterfall Prototype Iterative Evolutionary Spiral RAD


enhancement development
Less experience on No Yes No No Yes No
similar projects
Domain knowledge is Yes No Yes Yes Yes No
less
Experience on tools is Yes No No No Yes No
less
Is training required? No No Yes Yes No Yes
Involvement of Users: Involvement of users increases the understandability of the project. Hence, user
participation is available plays a very significant role in the selection of an appropriate life cycle model. It is shown
below:

www.neerajbooks.com
www.neerajbooks.com

Involvement of Users Waterfall Prototype Iterative Evolutionary Spiral RAD


enhancement de velopment
User involvement in No Yes No No No Yes
all phases
User participation is Yes No Yes Yes Yes No
limited
Users have no No Yes Yes Yes Yes No
previous experience of
participation in similar
projects
Users are experts of No Yes Yes Yes No Yes
problem domain
Type of Project And Associated Risk: Very few models incorporate risk assessment. Project type is also
important for selection of a model. It is shown below:
Project type and risk Waterfall Prototype Ite rative Evolutionary Spiral RAD
enhancement development
Project is the No No Yes Yes No Yes

Neeraj
enhancement of the
existing system
Funding is stable for Yes Yes No No No Yes
the project
High reliability No No Yes Yes Yes No

Publications
requirements
Project schedule is No Yes Yes Yes Yes Yes
tight
Use of reusable No Yes No No Yes Yes

www.neerajbooks.com
components
Are resources scarce? No Yes No No Yes No

communication of information (networks) and the


Q. 1. What do you mean by Software? creation and control of other programs (software tools
Ans. Software is: and environments).
(1) instructions (computer programs) that when Software delivers what many believe will be the
executed provide desired function and performance, most important product of the 21st century–information.
(2) data structures that enable the programs to Software transforms personal data (e.g. an individual’s
adequately manipulate information, and financial transactions) so that the data can be more useful
(3) documents that describe the operation and use and it also provides the means for acquiring information
of the programs. Software has a dual role. It is product in all its forms.
and at the same time, the means for delivering a product. Q. 2. Define Software Engineering?
As a product, it delivers the computing potential of Ans. Software engineering and encompasses
computer hardware. Whether it resides within a cellular technologies that populate the software process –
phone or operates inside a mainframe computer, technical methods and automated tools.
software is an information transformer–producing Software engineering is performed by creative,
information that can be simple or complex. As the means knowledgeable people who should work within a
used to deliver the product, software is the basis for the defined and mature software process. Software
control of the computer (operating systems), the engineering is the establishment and use of sound

www.neerajbooks.com
www.neerajbooks.com

engineering principles to obtain economically software


that is reliable and works efficiently on real machines.
The IEEE has developed a more comprehensive
definition than above definition by Bayer. It states that
Software Engineering is :
The application of a systematic, disciplined,
quantifiable approach to the development, operation,
and maintenance of software; that is, the application of
engineering to software.
Q. 3. Mention the Software characteristics?
Ans. To have an understanding of software and
software engineering, it is important to know the
characteristics of software that make it different from Figure 1 : Failure curve for hardware
other things that human beings build. When hardware
is built, the human creative process (analysis, design, Software is not affected to the environmental
construction, testing) is ultimately translated into a problems that cause hardware to wear out. In theory,
therefore, the failure rate curve for software should take
physical form.

Neeraj
the form shown in following Figure 2. Undiscovered
Software is a logical rather than a physical system defects may cause high failure rates early in the life of a
element. Therefore, software has characteristics that are program. However, these are corrected and the curve
different from those of hardware : flattens as shown. The curve is a simplification of actual
1. Software is developed or engineered, it is not failure models for software. However, the meaning is
clear–software doesn’t wear out. But it does deteriorate!

Publications
manufactured. Although some similarities exist
between software development and hardware
manufacture, the two activities are entirely different. In
both high quality is achieved through good design, but

www.neerajbooks.com
the manufacturing phase for hardware can introduce
quality problems that are non-existent for software. Both
activities depend on people, but the relationship between
people applied and work accomplished is entirely
different. Software costs are concentrated in
engineering. This means that software projects cannot
be managed as if they were manufacturing projects.
2. Software doesn’t “wear out.”. Figure 1 depicts Figure 2 : Failure curve for software (Simplified)
failure rate as a function of time for hardware. The
relationship, often called the “bathtub curve,” indicates
that hardware exhibits relatively high failure rates early
in its life (these failures are often attributes to design or
manufacturing defects); defects are corrected and the
failure rate drops to a steady-state level. As time passes
however, the failure rate rises again as hardware
components suffer from the cumulative affects of dust,
vibration, abuse, temperature extremes and other
Figure 3 : Failure curve for software (Simplified)
maladies. The hardware thus begins to wear out.

www.neerajbooks.com
www.neerajbooks.com

This contradiction can best be explained by component that transforms information as required by
considering Figure 3. During its life, software undergoes the application, a control/output component that
change (maintenance). It is possible that some new responds to the external environment, and a monitoring
defects are introduced, causing the failure rate curve to component that coordinates all other components so that
spike as shown in Figure. 3 real-time response (typically ranging from 1 millisecond
Before the curve can return to the original steady- to 1 minute) can be maintained.
state failure rate, another change is requested, causing Business Software: Business information
the curve to spike again. Slowly, the minimum failure processing is the largest single software application area.
rate level begins to rise – the software is deteriorating Discrete “systems” (e.g., payroll, accounts receivable/
due to change. payable, inventory, etc) have evolved into Management
Also wear illustrates the difference between
Information System (MIS) software that accesses one
hardware and software. When a hardware component
or more large databases containing business information.
wears out, it is replaced by a spare part. There are no
Business software applications also use interactive and
software spare parts. Therefore, software maintenance
client/server computing (e.g., point-of-sale transaction
is more complexity than hardware maintenance.
3. Most software is custom-built, rather than processing).
being assembled from existing components: Software Engineering and Scientific Software:
designers cannot assemble software. There are no Engineering and scientific software are characterized
catalogs of software components. Off-the-shelf software by “number crunching” algorithms. Applications range

Neeraj
is a complete unit, not components that can be from astronomy to oceanology, from chemical analysis
reassembled into new programs. to spacecraft dynamics, and from particle acceleration
Q. 4. Explain the Software Application Areas? to autocad. However, new applications are moving away
Ans. Software Application Areas: Software can from conventional numerical algorithms. Computer-
be used in any situation with defined set of procedural aided design, system simulation and other interactive

Publications
steps (i.e., an algorithm except expert systems and applications have begun to take on real-time and even
artificial neural network software). Information content system software characteristics.
and determinacy are factors that decide the nature of a Embedded Software: Intelligent products are now
software application. Content refers to the meaning and common in almost every consumer and industrial

www.neerajbooks.com
form of incoming and outgoing information. market. Embedded software resides in read-only
Information determinacy refers to the predictability memory and is used to control products and systems
of the order and timing of information. It is not easy to for the consumer and industrial markets. Embedded
define categories for software applications. As software software can perform very limited and esoteric functions
complexity grows, the dividing line disappears. The (e.g., key pad control for a microwave oven) or provide
following software areas indicated the scope of potential significant function and control capability (e.g., digital
applications: functions in a TV set etc).
System Software: System software is a group of Personal Computer Software: The personal
programs written to service other programs. Some computer software market is fastest growing market.
system software (e.g., compilers, editors and file Word processing, spreadsheets, computer graphics,
management utilities) processes complex, but multimedia, entertainment, database management,
determinate, information structures. Other systems personal and business financial applications,
applications (e.g., operating system components, and Internet access are only a few of hundreds of
drivers, communications processors) process largely applications.
indeterminate data. Artificial Intelligence Software: Artificial
Real-time Software: Programs that monitor/ intelligence (AI) software makes use of non-numerical
analyze/control real world events as they take place are algorithms to solve complex problems that are not
called real-time software. Real-time software has a data amendable to computation or straightforward analysis.
gathering component that collects and formats An active AI area is expert systems also called
information from an external environment, an analysis knowledge-based systems. Other applications areas for

www.neerajbooks.com
www.neerajbooks.com

AI software are pattern recognition (image and voice), definition, technical development, solution integration
theorem proving, and game playing. In recent years, a coexist simultaneously at some level of detail. Given
new branch of AI software, called artificial neural the recursive nature Figure (b) the four stages apply
networks, is in vogue. A neural network simulates the equally to the analysis of a complete application and
structure of brain processes (the functions of the the generation of a small segment of code.
biological neuron) and may ultimately lead to a new Raccoon suggests a “Chaos model” that describes
class of software than can recognize complex patterns “software development (as) a continuum from the user
and learn from past experience. There are many other to the developer to the technology.”
software application areas. New applications are being
found virtually everyday.
Q. 5. What is software engineering paradigm?
Ans. To solve actual problems in an industry setting,
a software engineer or a team of engineers must
incorporate a development strategy that encompasses
the process methods and tools layers. This strategy is
often referred to as a process model or a software
engineering paradigm. A process model of software
engineering is chosen based on the nature of the project

Neeraj
and application, the methods and tools to be used and
the controls and deliverables that are required.
All software development can be characterized as
a problem solving loop in which four distinct stages are
encountered; status quo, problem definition, technical Figure (a) : The phases of a problems solving loop

development, and solution integration. Status quo

Publications
“represents the current state of affairs” problem
definition identifies the specific problem to be solved;
technical development solves the problem through the
application of some technology, and solution integration

www.neerajbooks.com
delivers the results (e.g., documents, programs, data,
new business function, new products to those who
requested the solution the first place. The generic
software engineering phases and steps map into these
stages.
The problem solving loop applies to software
engineering work at many different levels of resolution.
It can be used at the macro level when the entire
application is considered; at a middle level when
program components are being engineered and even at Figure (b) : The phases within phases of the problem-solving
the line of code level. Therefore, a fractal representation loop
can be used to provide an idealized view of process. In Q. 6. What do you mean by waterfall model?
Figure (b), each stage in the problem solving loop Ans. The waterfall model is also called Linear
contains an identical problem solving loop, which Sequential Model or ‘classic life-cycle.’
contains still another problem solving loop (this It suggests a systematic, sequential approach to
continues to some rational boundary; for software, a software development that starts right from system level
line of code). and goes through analysis, design, coding, testing and
This simplified view leads to very important idea : maintenance. Modelled after the conventional
Regardless of the process model that is chosen for a engineering cycle, the linear sequential model covers
software project, all the stages–status quo, problem the following activities :

www.neerajbooks.com
www.neerajbooks.com

System/Information engineering and Testing: The testing process focuses on the logical
Modelling: Software is always part of a larger system internals of the software, assuring that all statements
(or business) hence work begins by establishing have been tested, and on the functional externals – that
requirements for all system elements and then allocating is, conducting tests to uncover errors and ensure that

Neeraj
some subset of these requirements to software. This defined input will produce actual results that agree with
system view is essential when software must interface required results.
with other elements such as hardware, people, and Maintenance: Software will undoubtedly
databases. System engineering and analysis encom- undergo change after it is delivered to the customer.
passes requirements gathering at the system level with Change will occur because errors have been

Publications
a small amount of top-level analysis and design. encountered, because the software must be adapted to
Information engineering encompasses requirements accommodate changes in its external environment or
gathering at the strategic business level and at the because the customer requires functional or performance
business area level. enhancements. Software maintenance reapplies each of

www.neerajbooks.com
Software Requirements Analysis: The the preceding phases to an existing programme rather
requirements gathering process is intensified and than a new one.
focused specifically on software. To understand the Q. 7. What do you mean by prototyping model?
nature of the programme(s) to be built, the software Ans. In general a customer defines a set of
engineer must understand the information domain for objectives for software, but does not identify detailed
the software, as well as required function, behaviour, input, processing, or output requirements. In other cases,
performance, and interfacing. Requirements for both the the developer may be unsure of the efficiency of an
system and the software are documented and reviewed algorithm, the adaptability an operating system or the
with the customer. form the human machine interaction should have.
Design: Software design is actually a multistep In such situations, a prototyping paradigm offers
process that focuses on four distinct attributes of a the best approach. The prototyping paradigm (Figure
program: data structure, software architecture, interface below) starts with requirements gathering. Developer
representations, and procedural (algorithmic) detail. The and customer define the overall objectives for the
design process translates requirements into a software, identify requirements and outline areas where
representation of the software that can be assessed for further definition is necessary. A “quick design” then
quality before code generation begins. The design is focuses on aspects of the software that are visible to the
documented and is part of the software configuration. customer/user (e.g., input approaches and output
Code Generation: The design must be translated formats). The quick design leads to the construction of
into a machine readable form. The code generation step a prototype. The prototype is evaluated by the customer/
performs this task. user and is used of refine requirements for the software

www.neerajbooks.com
www.neerajbooks.com

to be developed. Iteration occurs as the prototype is big, awkward in use or all three. There is no alternative,
developed to satisfy the needs of the customer and but to start again, smarting but smarter and build a
enabling the developer to better understanding what redesigned version in which these problems are solved
needs to be done. .... When a new system concept or new technology is
The prototype serves as a mechanism for used, one has to build a system to throw away, for even
identifying software requirements. If a working the best planning is not so omniscient as to get it right
prototype is built, the developer uses existing program the first time. The management question, therefore, is
fragments or applies tools (e.g., report generators, not whether to build a pilot system and throw it away.
window managers, etc.) to make working programs You will do that. The only question is whether to plan
quickly. in advance to build a throwaway, or to promise to deliver
According to Brooks, “In most projects, the first the throwaway to customers ....”
system built is barely usable. It may be too slow, too

Neeraj
Publications
www.neerajbooks.com Figure : The Prototyping Paradigm

Q. 8. What is incremental model? fourth increment. The process for any increment can
Ans. The Incremental Model: The incremental incorporate the prototyping paradigm.
model brings together elements of the linear sequential In first increment is often a core product. That is,
model (applied repetitively) with the iterative philosophy basic requirements are addressed, but many
of prototyping. As figure below shows, the incremental supplementary features (some known, others unknown)
model applies linear sequences in a staggered fashion remain undelivered. The core product undergoes
as time moves. Each linear sequence produces a detailed review. As a result a plan is developed for the
deliverable “increment” of the software. For example, next increment. The plan addresses the modification of
word-processing software developed using the the core product of better meet the needs of the customer
incremental paradigm might deliver basic file and the delivery of additional features and functionality.
management, editing and document production functions This process is repeated following the delivery of each
in the first increment; more sophisticated editing and increment until the complete product is produced.
document production capabilities in the second The incremental process model, like prototyping
increment; spelling and grammar checking in the third and other evolutionary approaches, is iterative in
increment; and advanced page layout capability in the nature.

www.neerajbooks.com
www.neerajbooks.com

Neeraj
Fig.: The Incremental Model

Q. 9. What is spiral model?


Ans. The spiral model, proposed by Boehm, is an
evolutionary software process model that couples the
iterative nature of prototyping with the controlled and

Publications
systematic aspects of the linear sequential model. It
provides the potential for rapid development of
incremental versions of the software. In the spiral model,
software is developed in a series of incremental releases.

www.neerajbooks.com
The spiral model is divided into a number of
framework activities, also called task regions. Typically,
there are three to six task regions. Figure below shows Each of the regions has a series of work tasks that
a spiral model that contains six task regions : are adapted to the characteristics of the project to be
— customer communication tasks required to undertaken. For small projects, the number of work tasks
establish effective communication between developer and their formality is slow. For larger projects each task
and customer. region has more work tasks that are with higher level of
— planning tasks required to define resources, formality. In all cases, the umbrella activities (e.g.,
timelines and other project related information. software configuration management and software
— risk analysis tasks required to assess both
quality assurance) are applied.
technical and management risks.
The software engineering team moves around the
— engineering tasks required to build one or more
spiral in a clockwise direction, beginning at the core.
representations of the application.
— construction and release tasks required to The first circuit may result in the development of a
construct, test, install and provide user support (e.g., product specification; subsequent passes around the
documentation and training). spiral may develop a prototype and then progressively
— customer evaluation tasks required to obtain more sophisticated versions of the software. Each pass
customer feedback based on evaluation of the software through the planning region results in adjustments to
representations created during the engineering stage and the project plan. Cost and schedule are adjusted based
implemented during the installation stage. on feedback derived from customer evaluation. Also

www.neerajbooks.com
www.neerajbooks.com

the project manager adjusts the planned number of Bradac found that the linear nature of the class life-cycle
iterations required to complete the software. leads to “blocking states” in which some project team
Unlike classical process models that end when member must wait for other members of the team to
software is delivered, the spiral model can be adapted complete dependent tasks. In fact, the time spent waiting
to apply throughout the life of the computer software. can exceed the time spent on productive work. The
In essence the spiral remains operative until the blocking states tend to be more prevalent at the
software is retired. There are times when the process is beginning and end of a linear sequential process.
dormant, but whenever a change is initiated, the process Each of these problems is real. However, the
starts at the appropriate entry point (e.g., product classific life-cycle paradigm has a definite and important
enhancement). place in software engineering work. It provides a
The spiral model is a realistic approach to the template into which methods for analysis, design,
development of large scale systems and software. coding, testing and maintenance can be placed. The
Because software involves as the process progresses, classic life-cycle remains the most widely used process
the developer and customer better understand and react model for software engineering. While it does have
to risks at each evolutionary level. The spiral model weaknesses, it is much better than a haphazard approach
uses prototyping as a risk reduction mechanism. The to software development.
developer can apply the prototyping approach at any Q. 11. Mention the problems with prototyping
stage in the evolution of the product. model?

Neeraj
However, the spiral model is also not a panacea. It Ans. The prototype serves as “the first system.”
may be difficult to convince customers that the The one that Brooks asks us we throw away. But this is
evoluntionary approach is controllable. It demands an idealized view. It is true that both customers and
considerable risk assessment expertise, and relies on developers like the prototyping paradigm. Users get a
this expertise for success. If a major risk is not uncovered feel for the actual system and developers get to build

Publications
and managed, problems undoubtedly occur. The model something immediately. Yet, prototyping is also be
is relatively new and has not been used as widely as the problematic for the following reasons :
linear sequential or prototyping paradigms. (1) The customer sees what looks-like a working
Q. 10. Mention the problems with waterfall version of the software. He does not know that the

www.neerajbooks.com
model? prototype is held together by “gene and wire,” and in
the rush to get it working no consideration for overall
Ans. The linear sequential (waterfall) model is the
software quality or long-term maintainability has been
oldest and the most widely used paradigm for software
given. He may ask that “a few fixes” be applied to make
engineering. Among the problems that are sometimes the prototype a working product. Many times software
encountered within model are : development management relents and quality suffers.
1. In practice, do not follow the sequential flow. (2) The developer often compromises to get a
Although, the linear model can accommodate iteration, prototype working quickly. An inappropriate operating
it does so indirectly. As a result, changes can cause system or programming language may be used simply
confusion as the project proceeds. because it is available and known; an inefficient
2. It is often difficult for the customer to state all algorithm may be used simply to show capability. After
requirements explicitly. The linear sequential model a time, the developer may forget the reasons why they
requires this and has difficulty accommodating the were inappropriate. The choice then becomes integral
part of the system.
natural uncertainty that exists at the beginning of many
Inspite of such problems prototyping is an effective
projects. paradigm for software engineering. The key is to define
3. The customer must have patience. A working the rules of the game at the beginning; that is, the
version of the program(s) is available late in the project customer and developer must both agree that the
time-span. A major blunder, if undetected until the prototype is built to serve as a mechanism for defining
working program is reviewed, can be disastrous. requirements. It is then discarded and the actual software
4. Developers are often delayed unnecessarily. is engineered with desired and maintainability.

www.neerajbooks.com
www.neerajbooks.com

(i) Portability: It is the effort required to transfer


Q. What are the three P’s of the software the software from one hardware configuration
product? to another.
Ans. We can specify three dimensions of the (ii) Reusability: It is the extent to which parts of
product whose quality is to be assessed: the software can be reused in other related
1. Product Operations: The first factor of product applications.
operation deals with quality factors such as correctness, (iii) Interoperability: It is the effort required to
couple the system with other systems.
reliability and efficiency.
3. Product Revision: The product revision is
(i) Correctness: It is the extent to which a program
concerned with those aspects related to modification of
satisfies its specifications.
programs and includes factors like maintainability,
(ii) Reliability: It is the property which defines how
flexibility and testability.
well the software meets its requirements.
(i) Maintainability: It is the effort required to
(iii) Efficiency: It is a factor in all issues relating to
locate and fix errors in operating programs.
the execution of software and includes such
(ii) Flexibility: It is the effort required to modify
considerations as response time, memory
an operation program (perhaps to enhance its
requirements and throughput.
functionality).
(iv) Usability: It is the effort required to learn and

Neeraj
(iii) Testability: It is the effort required to test, to
operate the software properly. Hence, it is an
ensure that the system or a module performs its
important property that emphasizes the human
intended function.
aspect of the system.
2. Product Transition: The second factor of
product transition deals with equality factors like

Publications
portability and interoperability.

www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

Software Project Management Concepts


9
Later in this chapter we will discuss about software
Project management is the exercise of planning, metrics that is a measure of some property of a piece of
executing, organizing, securing and managing resources software or its specifications and also the application of
to achieve specific goals. A project is a temporary PERT and GANTT charts.

Neeraj
attempt with a defined beginning and end (usually time-
constrained and often constrained by funding or
PLANNING
deliverables), undertaken to meet unique goals and
After the finalization of SRS, one would like to
objectives, typically to bring about beneficial change
estimate size, cost and development time of the project
or added value. The temporary nature of projects stands and sometimes even before the finalization of the SRS

Publications
in contrast with business as usual (or operations), which one would like to know the cost and development time
are repetitive, permanent, or semi-permanent functional of the project. Hence, it is a crucial decision for the
activities to produce products or services. The project and these are the key issues of the project
management of these two systems is often quite different planning.

www.neerajbooks.com
and as such requires the development of distinct Planning is an aspect of project management, which
technical skills and management strategies. comprises of various processes whose aim, is to ensure
The primary challenge of project management is that various project tasks are well coordinated and they
to achieve all of the project goals and objectives with meet the various project objectives including timely
taking in consideration the preconceived constraints. completion of the project. Project Planning helps in:
Typical constraints are scope, time and budget. The Facilitating communication
secondary and more ambitious challenge is to optimize Monitoring/measuring the project progress, and
the allocation and integrate the inputs necessary to meet Provides overall documentation of assumptions/
pre-defined objectives. planning decisions.
Thus project management is the science and art of Project planning generally consists of:
organizing the components of a project that is whether Determining how to plan (e.g. by level of detail
the project is development of a new product or the or rolling wave);
launch of a new service or a marketing campaign or a Developing the scope statement;
wedding. A project isn’t something that’s part of normal Selecting the planning team;
business operations. It’s typically created once, it’s Identifying deliverables and creating the work
temporary, and it’s specific. As one expert notes, “It breakdown structure;
has a beginning and an end.” A project consumes Identifying the activities needed to complete
resources whether people, cash, materials, or time and those deliverables and networking the activities
it has funding limits. Software project management is a in their logical sequence;
sub-discipline of project management in which software Estimating the resource requirements for the
projects are planned, monitored and controlled. activities;

www.neerajbooks.com
www.neerajbooks.com

Estimating time and cost for activities; personnel selection and evaluation and risk
Developing the schedule; management.
Developing the budget; To have a successful software project one must
Risk planning; understand:
Gaining formal approval to begin work. Scope of work to be done
Project Planning is an ongoing effort throughout The risk to be incurred
the Project Lifecycle. The resources required
Software managers are responsible for planning and The task to be accomplished
scheduling project development. They supervise the The cost to be expended
work and monitor the progress to check that The schedule to be followed.
development is on time and within the budget. It must Planning the software begins before the technical
incorporate the major issues like size and cost work starts, continues as the software evolves and
estimation, scheduling, project monitoring and reviews, culminates when the software retires.
The various steps of Project Planning Activities are shown below:

Size Estimation

Neeraj
Cost Estimation Development Time

Publications Resources Requirements

www.neerajbooks.com
Project Scheduling

EXECUTION The deliverables are produced as outputs from the


The Project Execution Phase is the next phase in processes performed as defined in the project
the project life cycle. In this phase, one will build the management plan and other frameworks that might be
physical project deliverables and present them to the applicable to the type of project at hand.
customer for signoff. The Project Execution Phase is To enable one to monitor and control the project
usually the longest phase in the project life cycle and it during this phase, they will need to implement a range
typically consumes the most energy and the most of management processes. These processes help them
resources. to manage time, cost, quality, change, risks and issues.
Execution consists of the processes used to They also help them to manage procurement, customer
complete the work defined in the project plan to acceptance and communications.
accomplish the project’s requirements. Execution MONITORING
process involves coordinating people and resources, as Monitoring consists of those processes performed
well as integrating and performing the activities of the to observe project execution so that potential problems
project in accordance with the project management plan. can be identified in a timely manner and corrective

www.neerajbooks.com
www.neerajbooks.com

action can be taken, when necessary, to control the important not to lose sight of the initial goals and targets
execution of the project. The key benefit is that project of the projects. When the changes accumulate, the
performance is observed and measured regularly to forecasted result may not justify the original proposed
identify variances from the project management plan. investment in the project.
Monitoring includes: CONTROL OF SOFTWARE PROJECTS
1. Measuring the ongoing project activities Project controlling should be established as an
(where we are). independent function in project management. It
2. Monitoring the project variables (cost, effort, implements verification and controls functions during
scope, etc.) against the project management the processing of a project in order to reinforce the
plan and the project performance baseline defined performance and formal goals. The tasks of
(where we should be). project controlling are:
3. Identify corrective actions to address issues 1. The creation of infrastructure for the supply
and risks properly (How can we get on track of the right information and its update.
again). 2. The establishment of a way to communicate
4. Influencing the factors that could circumvent disparities of project parameters.
integrated change control so only approved 3. The development of project information
changes are implemented. technology based on an intranet or the
In multi-phase projects, the monitoring process also determination of a project Key Performance
provides feedback between project phases, in order to Index system (KPI).

Neeraj
implement corrective or preventive actions to bring the 4. Divergence analyses and generation of
project into compliance with the project management proposals for potential project regulations.
plan. 5. The establishment of methods to accomplish
Project maintenance is an ongoing process, and it an appropriate project structure, project
includes: workflow organization, project control and

Publications
Continuing support of end-users governance.
Correction of errors 6. Creation of transparency among the project
Updates of the software over time. parameters.
In this stage, auditors should pay attention to how Fulfillment and implementation of these tasks can
effectively and quickly user problems are resolved. be achieved by applying specific methods and

www.neerajbooks.com
Over the course of any construction project, the
program may change. Change is a normal and expected
part of the construction process. Changes can be the
instruments of project controlling. Some of the following
methods of project controlling can be applied to achieve
the tasks:
result of design modifications, differing site conditions, Investment analysis
material availability, contractor-requested changes, Cost-benefit analysis
value engineering and impacts from third parties, etc. Value benefit analysis
Beyond executing the change in the field, the change Expert surveys
normally needs to be documented to show what was Simulation calculations
actually constructed and what it has been after the Risk-profile analyses
change. This is referred to as change management. Surcharge calculations
Hence, the owner usually requires a final record to show Milestone trend analysis
all changes or, more specifically, any change that Cost trend analysis
modifies the portions of the finished work that is some Target/actual-comparison.
part of the existing program. The record is made on the Project control is that element of a project that keeps
contract documents – usually, but not necessarily limited it on-track, on-time and within budget. Project control
to, the design drawings. The end product of this effort begins early in the project with planning and ends late
is what the industry terms as-built drawings, or more in the project with post-implementation review, having
simply, “as built.” The requirement for providing them a thorough involvement of each step in the process. Each
is a norm in construction contracts. project should be assessed for the appropriate level of
When changes are introduced to the project, the control needed: too much control is very time consuming
viability of the project has to be re-assessed. It is and too little control is very risky. If it is not implemented

www.neerajbooks.com
www.neerajbooks.com

correctly, the cost to the business should be taken into optimal personnel task assignments. It is applicable in
account in terms of errors fixes and additional audit the entire development of life cycle that is from
fees. initiation, when cost must be estimated, to monitoring
Control systems are needed for cost, risk, quality, the reliability of the end product and the way the product
communication, time, change, procurement and human changes over time with the enhancements made to it. It
resources. In addition, auditors should consider how also covers the techniques of monitoring and controlling
important the projects are to the financial statements, the progress of the software development. Motivations
how reliant the stakeholders are on controls and how of the metrics are as follows:
many controls exists. Auditors should review the Estimate the cost and schedule of future
development process and procedures for how they are projects.
implemented. The process of development and the Evaluate the productivity impacts of new tools
quality of the final product may also be assessed if and techniques.
needed or requested. A business may want the auditing Establish productivity trends over time.
firm to be involved throughout the process to catch Improve software quality.
problems earlier on so that they can be fixed more easily. Forecast future staffing needs.
An auditor can serve as a controls consultant as part of Anticipate and reduce future maintenance
the development team or as an independent auditor as needs.
part of an audit. Areas of Application: The most well known area
Sometimes businesses use formal systems of software metric is cost and size estimation techniques.

Neeraj
development processes. These help in assuring that Many packages are available that provide estimates of
systems are developed successfully. A formal process software system size, cost to develop a system and the
is more effective in creating strong controls and auditors duration of the development or enhancement of the
should review this process to confirm that it is well project. These packages are based on estimation models,
designed and is followed properly. A good formal like COCOMO, COCOMO-II developed by Barry

Publications
systems development plan outlines: Boehm. A great deal of interest is generated in
A strategy to align development with the controlling software development projects through
organization’s broader objectives. measurement and it has become more relevant with
Standards for new systems. software developers.
Project management policies for timing and Another area where software metrics play an

www.neerajbooks.com
budgeting.
Procedures describing the process.
Evaluation of quality of change.
important role is the prediction of quality levels for
software, often in terms of reliability.
The use of software metrics to provide quantitative
SOFTWARE METRICS checks on software design is also a well established area.
According to Goodman software metric can be This area is also used to control software products which
defined as “The continuous application of measurement are in place and are subject to enhancement.
based techniques to the software development process Software metrics are also used to provide
and its product to supply meaningful and timely management information. It includes information about
management information, together with the use of those productivity, quality and process effectiveness. It should
techniques to improve that process and its products”. be seen as an ongoing activity. All this shows that
Thus, it is a measure of some property of the software software metrics is a vast field and have a wide variety
or its specifications. Since quantitative measurements of applications throughout the software life cycle.
are essential in all sciences, there is a continuous effort Problems during Implementation: It is difficult
by computer science practitioners and theoreticians to to implement software metrics of any size in an
bring similar approaches to software development. The organization. There are many problems that need to be
goal is obtaining objective, reproducible and overcome and decisions to be made with a little amount
quantifiable measurements, which may have numerous of information available. The first decision concerns
valuable applications in schedule and budget planning, with the scope of the work. This tells that not too much
cost estimation, quality assurance testing, software and too less work should be done on the software
debugging, software performance optimization and metrics.

www.neerajbooks.com
www.neerajbooks.com

Another problem during implementation arises if Cost and schedule


one starts measuring the performance of individuals. Productivity.
Using measurement in this way is a worst mistake that Some metrics belong to multiple categories like
was made by the organizations as it is counterproductive, quality metric may belong to all three categories. It
divisive and simply ensures that developers will rig the focuses on quality aspects of the product process and
data they supply. the project. Some other metrics are also there like data
According to Goodman, some simple statements structure metrics, size-oriented metrics, function-
that could be made by many in the industry together oriented metrics, information flow metrics, etc.
with interpretation of current management trends will APPLICATION OF PERT AND GANTT
illustrate the following points: CHARTS
Statement: Software development is so Complex projects require a series of activities, some
complex; it cannot be managed like other parts of which must be performed sequentially and others that
of the organization. can be performed in parallel with other activities. This
Management view: Forget it, we will find collection of sequential and parallel activities can be
developers and managers who will manage that
clustered together as a network. Critical Path Method
development.
(CPM) was developed as a network model for the
Statement: I am only six months late with this
project management. It is a deterministic method which
project.
uses a fixed time estimate for each activity. It is easy to
Management view: Fine, you are only out of
understand and use but the variation in time having great

Neeraj
the job.
Statement: But you cannot put reliability impact on the completion time of a project is not
constraints in the contract. considered.
Management View: Then we may not get the The Program Evaluation and Review Technique
contract. This list is endless and the message (PERT) is a network model that allows for randomness
is clear. in activity completion times. It was developed in late

Publications
Software metrics cannot solve all our problems, but 1950’s for the U.S. Navy’s Polaris project that had
they can enable managers to prove their processes, to thousand of contractors. It has the potential to reduce
improve the productivity and quality, to improve the both the time and the cost required to complete a project.
probability of survival. But this is not an easy option. Thus a PERT chart is a graphic representation of a
Hence the use of software metrics does not ensure project’s schedule, showing the sequence of tasks, which

www.neerajbooks.com
survival but it improves the probability of survival.
Categories of Metrics: There are three categories
of software metrics which are:
tasks can be performed simultaneously and the critical
path of tasks that must be completed on time in order
for the project to meet its completion deadline. The chart
1. Product Metrics: It describes the can be constructed with a variety of attributes, such as
characteristics of the product such as size, complexity, earliest and latest start dates for each task, earliest and
design features, performance, efficiency, reliability, latest finish dates for each task, and slack time between
portability, etc. tasks. A PERT chart can document an entire project or
2. Process Metrics: It describes the effectiveness a key phase of a project. The chart allows a team to
and quality of the processes that produce the software avoid unrealistic timetables and schedule expectations,
product. Examples are: to help identify and shorten tasks that are bottlenecks,
Effort required in the process and to focus attention on most critical tasks.
Time to produce the product The Network Diagram: In a project, an activity
Effectiveness of defect removal during is a task that must be performed and an event is a
development milestone marking the completion of one or more
Number of defects found during testing activities. Before a new activity begins every
Maturity of the process.
predecessor activity of that activity should be completed.
3. Project metrics: It describes the project
PERT is an activity on arc network in which activities
characteristics and execution. Examples are:
are represented on the lines and events on the nodes.
Number of software developers
The following is a very simple example of a PERT
Staffing pattern over the life cycle of the
software diagram:

www.neerajbooks.com
www.neerajbooks.com

Pessimistic time: It is the longest time that an


activity might require. Three standard
deviations from the mean is commonly used
for the pessimistic time.
5. Determine The Critical Path: It is determined
by adding the times for the activities in each sequence
and determining the longest path in the project. It
determines the total time that is required to complete
the project. Since it determines the completion time of
the project, the project can be accelerated by adding
the resources required to decrease the time for the
activities in the critical path. Such shortening is
Steps in PERT planning process: PERT planning
sometimes referred to as project crashing.
involves the following steps: 6. Update as Project Progresses: Adjustments
1. Identify the specific activities and milestones. in the PERT chart are to be made as the project
2. Determine the proper sequence of the progresses. As the project unfolds, the estimated times
activities. can be replaced with the actual ones.
3. Construct a network diagram. Benefits of PERT: PERT is useful because it
4. Estimate the time required for each activity. provides the following information:

Neeraj
5. Determine the critical path. Expected project completion time.
6. Update the PERT chart as the project Probability of completion before a specified
progresses. date.
1. Identify Activities and Milestones: The tasks The critical path activities that directly impact
that are required to complete the project are the the completion time.

Publications
activities. Milestones are the events that mark the The activities that have slack time and that can
lend resources to critical path activities.
beginning and end of one or more activities. It is helpful
Activities start and end dates.
to list the tasks that can later be expanded to include the
Limitations of PERT: The following are the
sequence and the duration that task took to complete. limitations of PERT:

www.neerajbooks.com
2. Determine Activity Sequence: This step can Assume clearly defined, independent and stable
be combined with the first step since the activity activities.
sequence is evident for some tasks. Other tasks require Activity times follow beta distribution.
more analyses to know the order of performance. Subjective activity times.
3. Construct the Network Diagram: Using the Over emphasis on critical path.
sequence information a network diagram can be drawn GANTT Charts: A Gantt chart is a type of bar
easily that shows the sequence of the activities. Software chart that illustrates a project schedule. It shows the start
packages simplify this step by automatically converting and finish dates of the activities and summarizes the
tabular activity information into a network diagram. activities of a project. They comprise the work
4. Estimate Activity Times: Weeks are breakdown structure of the project. Some Gantt charts
commonly used unit of time for activity completion, also show the dependency (i.e., precedence network)
but any consistent unit of time can be used a relationships between activities. Gantt charts can be used
to show current schedule status using per cent-complete
distinguishing feature is its ability to deal with
shadings and a vertical “TODAY” line. Although now
uncertainty in activity completion times. For each
regarded as a common charting technique, Gantt charts
activity it includes the three estimates these are: were considered revolutionary when they were
Optimistic time: It is generally the shortest introduced. This chart is used also in Information
time in which the activity can be completed. Technology to represent data that has been collected. A
Most likely time: It is the completion time Gantt chart is a graphical representation of the duration
having the highest probability. It is different of tasks against the progression of time. A Gantt chart
from expected time. is a useful tool for planning and scheduling projects.

www.neerajbooks.com
www.neerajbooks.com

An example of GANTT Chart is shown below:

Neeraj
The horizontal axis is a time scale, expressed either Estimates must be completed before the chart

Publications
in absolute time or in relative time referenced to the is drawn.
beginning of the project. Rows of bars in the chart show It does not effectively address the dependencies
the beginning and ending dates of the individual activity between jobs (although constraints can be added
in the project. In the above diagram every predecessor as vertical lines).

www.neerajbooks.com
task of the next activity has already been completed. Dependencies are hard to verify.
It is difficult to show two sets of dates when
However, the bars may overlap in cases where a task
using techniques such as earliest start date and
can begin before the completion of another and there
latest start.
may be several tasks performed in parallel. For this It is difficult to show slack and critical path
reason Gantt chart is useful for communicating the without additional notation.
timing of the various tasks. For a larger project tasks Changes to the schedule require redrawing of
can be broken down into subtasks each having their own the chart.
Gantt charts to maintain readability. Several scheduling possibilities cannot be
Advantages of GANTT Chart: Some of the shown in the same chart.
advantages of GANTT Chart are as follows: Resource assignments are not easy to illustrate.
Cutting project cost and reducing the time scale.
Coordinating and expediting planning.
Q. 1. What do you mean by Project Planning?
Eliminating the idle time. Ans. The software project management process
Obtaining better scheduling and control for begins with a set of activities that are collectively called
subcontractor activities. project planning. The first of these activities is
Developing better troubleshooting procedures. estimation. Whenever estimates are made, we look into
Cutting time for routine decisions, but allowing the future and accept some degree of uncertianty as a
more time for decision making. matter of course. To quote Frederick Brooks [BRO75]:
Disadvantages of GANTT Chart: The [O]ur techniques of estimating are poorly
disadvantages of GANTT Chart are: developed. More seriously, they reflect an unvoiced

www.neerajbooks.com
www.neerajbooks.com

assumption that is quite untrue, i.e. that all will go The software developer and customer must meet
well.......... [B]ecause we are uncertain of our estimates, to define project objectives and scope. Objectives and
software managers often lack the courteous scope are understood, alternative solutions are
stubbornness to make people wait for a good product. considered. Although very little detail is discussed, the
Although estimating is as much art as it is science, alternatives enable managers and practitioners to select
this important activity need not be conducted in a “best” approach, given the constraints imposed by
haphazard manner. Useful techniques for time and effort delivery deadlines, budgetary restrictions, personnel,
estimation do exist. And because estimation lays a technical interfaces and other factors.
foundation for all other project planning activities, and 3. The Process: A software process provides the
project planning provides the road map for sucessful framework from which a comprehensive plan for
software engineering, we would be ill-advised to embark software development can be prepared. A small number
without it. of framework activities are applicable to all software
Q. 2. What are the three ‘P’s of effective projects, regardless of their size or complexity. A number
Software Project Management? of different task sets– tasks, milestones, deliverables,
Ans. Effective software project management and quality assurance points – enable the framework
stresses on the three P’s people, problem and process. activities to be adapted to the characteristics of the
The order is not arbitrary. The manager who forgets software project and the requirements of the project
that software engineering work is an intensely human team. Finally, umbrella activities – such as software
effort will never succeed in project management. A quality assurance, software configuration management,

Neeraj
manager who fails to encourage comprehensive and measurement – overlay the process model. Umbrella
customer communication early in the development of a activities are independent of any one framework activity
project may have an elegant solution for the wrong and occur throughout the process.
problem. Finally, the manager who gives little attention Q. 3. Mention the Objective of Project Planning?
to the process runs the risk of inserting competent
How is it achieved?
technical methods and tools into a vacuum.

Publications
Ans. Project Planning Objective: The objective
1. People: The cultivation of motivated, highly
of software project planning is to provide a framework
skilled software people i.e. the “people factor” is so
that enables the manager to make reasonable estimates
important that the Software Engineering Institute has of resources, cost, and schedule. These estimates are
developed a People Management Capability Maturity made within a limited time frame at the beginning of a
Model (PM-CMM) “To enhance the readiness of

www.neerajbooks.com
software project and should be updated regularly as the
software organizations to undertake increasingly project progresses. Estimates try to define “best case”
complex application by helping to attract, grow, and “worst case” scenarios so that project outcomes
motivate, deploy, and retain the talent needed to improve can be bounded.
their software development capability”. The planning objective is achieved through a
The people management maturity model defines process of information discovery that leads to reasonable
the following key practice areas for software people: estimates.
recruiting, selection, performance management, training, Q. 4. What are the steps in Project Planning?
compensation, career development, organization and Ans. Project Planning moves around the various
work design and team culture development. aspects of the Project. Generally, Project Planning is
Organization that achieve high levels of maturity in the considered to be a process of estimating, scheduling
people management area have a higher likelihood of
and assigning the projects resources in order to deliver
implementing effective software engineering practices.
an end product of good quality. However it is much
2. The Problem: Before a project can be planned,
more as it can assume a very strategic role, which can
its objectives and scope need to be established,
determine the success of the project. A Project Plan is
alternative solutions need to be considered and technical
one of the crucial steps in Project Planning in General.
and management constraints need to be identified.
Project Planning can include the following types:
Without this information, it is not possible to have
reasonable estimate of the cost; an effective assessement 1. Project Scope Definition and Scope Planning.
of risk; A realistic breakdown of project tasks; or a 2. Project Activity Definition and Activity
manageable project schedule that provides a meaningful Sequencing.
indication of progress. 3. Time, Effort and Resource Estimation.

www.neerajbooks.com
www.neerajbooks.com

4. Risk Factors Identification. control. Also, measurement can assess the quality of
5. Cost Estimation and Budgeting. technical work products and assists in tactical decision
6. Organizational and Resource Planning. making as a project goes ahead.
7. Schedule Development. In software project management, concern is
8. Quality Planning. primarily with productivity and quality metrics–
9. Risk Management Planning. measures of “output” as a function of effort and time
10. Project Plan Development and Execution. applied and measures of the “fitness for use” of the
11. Performance Reporting. products produced. For planning and estimating
12. Planning Change Management. purposes the interest is historical software development
13. Project Rollout Planning. productivity on past projects. The quality of the software
Q. 5. What does Monitoring include? that was produced of past productivity and quality data
Ans. Monitoring includes the following: in the present product, planning and estimating more
1. It measures the ongoing project activities that accurately.
is tell about the exact position of the software. Metrics and Indicators: The terms “measure”,
2. It monitors the project variables like cost, effort, “measurement” and “metrics” are often used
scope, etc. against the project management plan interchangeably, bit there is subtle differences between
and the performance of the project that is it tells them. Because “measure” and “measurement” can be
where one should stand after considering all the used either as a noun or a verb, definitions of the terms
project variables. can become confusing. In software engineering context,

Neeraj
3. Proper actions should be taken to address issues a measure provides a quantitative indication of the
and risks properly that is it decides how one extent, amount, dimensions, capacity, or size of some
can get back on track. attribute of a product or process. Measurement is the
4. It influences the factors so that only approved act of determining a measure. The IEEE Standard
changes are implemented by carrying the change Glossary of Software Engineering Terms defines metric

Publications
control process. as “A quantitative measure of the degree to which a
Q. 6. What are the tasks of project controlling? system, component, or process possesses a given
Ans. The tasks of project controlling are: attribute.”
1. Creating and updating of infrastructure for the A software metric relates the individual measures
supply of right information. in some way e.g.,the average number or errors found

www.neerajbooks.com
2. Finding of a way to communicate disparities of
project parameters.
3. Determining the project key performance index
per review or the average number of errors found per
person-hour expended on reviews.
A software engineer collects measures and develops
system that is the KPI’s of the project or the metrics so that indicators will be obtained. An indicator
development of project information technology is a metric or combination of metrics that provide insight
based on an intranet. into the software process, a software project, or the
4. For potential project regulations proposals are product itself. An indicator provides insight that enables
generated and a divergence analysis is done. the project manager or software engineers to revise the
5. To accomplish an appropriate project structure, process, the project, or the product to make them better.
project workflow, control and governance Q. 8. What is the use of metrics and indicators
appropriate methods should be established. in the Process and Project Domain?
6. Creating transparency amongst the project Ans. Metrics in the Process and Project
parameters. Domains: Measurement is common place in the
Q. 7. What is Software Metrics and Indicator? engineering world. We measure speed, pressure, weight,
Ans. Software metrics refers to a broad range of temperature, voltage, the list is endless. However,
measurements for computer software. Measurement can measurement is far less common in the software
be applied to the software process to improve it on a engineering world. The problem is what to measure
continuous basis. Measurement can be applied and what trouble evaluating metrics to use.
throughout a software project to help in estimation, Metrics should be collected so that process and
quality control, productivity assessment and project product indicators can be ascertained. Process indicators

www.neerajbooks.com
www.neerajbooks.com

enable a software engineering organization to gain The aim of project metrics is two fold. First, these
insight into the efficacy of an existing process (i.e., the metrics are used to minimize the development schedule
paradigm, software engineering tasks, work products, by guiding the adjustment necessary to avoid delays and
and milestone). They tell managers what works and what mitigate potential problems and risks. Second, projects
doesn’t. Process metrics are collected across all project metrics are used to assess product quality on an on-
and over long periods of time. They provide indicators going basis and when necessary, modify the technical
that lead to long-term software process improvement. approach to improve quality.
Project indicators enable a software project As quality improves, errors count goes down, the
manager to: amount of re-work required is also reduced. This reduces
(i) assess the status of an on going project; overall project cost. Another model of software project
(ii) track potential risks; metrics suggests that every project should measure.
(iii) uncover problem areas before they “go critical”; (i) Inputs: measures of the resources (e.g. people,
(iv) adjust work flow or tasks; and environment) required to do the work.
(v) evaluate the project team’s ability to control (ii) Outputs: measures of the deliverables or work
quality of software engineering work products. products created during the software engineering
Sometimes, the same software metrics can be used process.
to determine both project and then process indicators. (iii) Results: measures that indicate the effectiveness
In fact, measures that are collected by a project team of the deliverables.

Neeraj
and converted into metrics for use during a project can This model can be applied to both process and
also be transmitted to those with responsibility for project. In the project context, the model can be
software process improvement. For this reason, many recursively as each framework activity occurs.
metrics are used in both process and project domain. Therefore, the outputs from one activity become inputs
Q. 9. Define Project Metrics and explain their to the next. Results metrics can be used to provide an

Publications
use in Software Projects? indication of the usefulness of work products as they
Ans. Project Metrics and their use: Software flow from one framework activity (or task) to the next.
process metrics are used for strategic purposes. Software Q. 10. Explain in brief the following:
project measures are tactical. That is, project metrics (1) Size-Oriented Metrics
(2) Function-Oriented Metrics

www.neerajbooks.com
and the indicators derived from them are used by a
project manager and a software team to adapt project (3) Extended Function Point Metrics
work flow and technical activities. Ans. Ans. 1. Size-Oriented Metrics: Size-oriented
The first application of project metrics on software software metrics are derived by normalizing quality and/
projects takes place during estimation. Metrics collected or productivity measure with reference to the “size” of
from past projects are used as a basis from which effort the software.With simple records, a table of size-
and time duration estimates are made for current oriented measures as in Figure 4, can be created. The
software work. As a project programs, measures of table lists each software development project that has
effort and time spent are compared to original estimates been completed and corresponding measures for that
and the project schedule. The project manager uses these project. Referring to the table entry for project X, 10,000
data to monitor and control progress. Lines of Code (LOC) were developed with 20 person-
As technical work begins, other project metrics months of efforts at a cost of 5,000. The effort and cost
become significant. Production rates in terms of review recorded in the table represent all software engineering
hours, function points and delivered source lines are activities (analysis, design, coding, and testing), not just
measured. Errors uncovered during each software coding. Further information for project shows pages of
engineering task are tracked. As the software evolves documentation were prepared. 94 errors were recorded
from specification into design, technical metrics are before the software was released, and 13 defects were
collected to assess design quality and to provide encountered after release to the customer within the first
indicators that will influence the approach taken to code year of operation. Three people worked on the
generation and module and integration testing. development of software for the project.

www.neerajbooks.com
www.neerajbooks.com

Project LOC Effort $(000) pp. doc. Errors Defects People


X 10,000 20 500 250 95 13 2
Y 15,300 31 900 700 163 29 5
Z 19,800 42 1400 1250 246 48 8
• • • • •
• • • • •
• • • • •

Figure 4 : Size-oriented metrics

To develop metrics that can be assimilated with opponents that LOC measures are programming
similar metrics from other projects, we can choose lines language dependent; that they penalize well-designed
of code as the normalization value. but shorter programs; that they cannot easily
From the data given in the table, a set of simple accommodate non-procedural languages and that their
size-oriented metrics can be prepared for each project. use in estimation requires a level of detail that may be

Neeraj
(i) errors per KLOC (thousand lines of code) difficult to acheive (i.e.,the planner must estimate the
(ii) defects per KLOC LOC to be produced long before analysis and design
(iii) Rs. per LOC have been completed).
2. Function-oriented Metrics: Function-oriented
(iv) pages of documentation per KLOC
software metrics use a measure of the functionality
Also, other interesting metrics can be computed.
delivered by the application as a normalization value.

Publications
(i) errors/person-month
“Functionality” cannot be measured directly, derived
(i) LOC per person-month
indirectly using other direct measures. Function-oriented
(i) Rs. 1 page of documentation. metrics were first proposed by Albrecht, who suggested
Size-oriented metrics are not accepted by all as the a measure called the functional point. Function points
best way to measure the process of software are derived using an empirical relationship based on

www.neerajbooks.com
development. The controversy is about the use of Lines countable (direct) measures of software’s information
Of Code (LOC) as a key measure. Proponents of the domain and assessments of software complexity.
LOC measure that LOC is an “artifact” of all software Function points are computed by completing the
development projects and can be easily counted; that table shown in Figure 5. Five information domain
many existing software estimation models use LOC or characteristics are determined, and counts are provided
KLOC as a key input, and that a large body of literature in the appropriate table location. Information domain
and data predicate on LOC already exists. The assent, values are defined in the following way :

Weighting Factor
measurement parameter Count Simple Average Complex
number of user inputs × 3 1 6
number of user outputs × 4 5 7
number of user inquiries × 3 4 6
number of files × 7 10 15
number of external interface × 5 7 10
count = total
Figure 5. Computing function point metrics.

www.neerajbooks.com
www.neerajbooks.com

Number of user inputs: Each user input that point measure i.e.inadequate for many engineering and
provides separate application–oriented data to the embedded systems (which emphasize function and
software is counted. Inputs are not inquires, which are control). A number of extensions to the basic function
counted separately. point measure have been proposed as solution this
Number of user outputs: Each user output that situation.
gives application–oriented information to the user is A function point extension called feature points, is
counted. Output is reports, screens, error messages and a superest of the function point measure that can be
so on. Data item in report are not counted separately. applied to systems and engineering software application.
Number of user inquiries: An inquiry is defined The feature point measure allows applications for which
as an online input that results in the generation of some
algorithmic complexity is high. Real time, process
immediate software response as on-line output. Each
control and embedded software applications with high
distinct inquiry is counted.
algorithmic complexity are thus amenable to the feature
Number of files: Each logical master file that may
point.
be one part of a large database or a separate files.
To compute the feature point, information domain
Number of external interfaces: All machine
values are counted and weighted. In addition, the feature
readable interface (data files on tape or disk) that are
point measure counts a new characteristic, algorithms.
used to transmit information to other system are counted.
An algorithm is defined “A bounded computational
After the above data is collected, a complexity value

Neeraj
problem that is included within a specific computing
is given to each count. There is criteria for determining
program.” Inverting a matrix decoding a bit string, or
whether a particular entry is simple, average or complex.
handling an interrupt are all examples of algorithms.
The determination of complexity is somewhat subjective
To compute Function Points (FP), the following Another function point extension for real-time
relationship is used: systems and engineering products has been developed

Publications
FP = count-total × [0.65 + 0.01 ×  Fi] by Boeing. It integrate the data dimension of software
where count-total is the sum of all entries in with the functional and control dimensions to give a
Figure 5. function–oriented measure, called the 3D Function
The Fi (i = 1 to 14) are “complexity adjustment Point. It is amenable to applications that emphasize

www.neerajbooks.com
values” based on answers to questions about the 14 function and control capabilities. Characteristics of all
factors. The constant values and the weighting factors three software dimensions are “counted, quantified and
that are applied to information domain counts are transformed” into a measure that offer an indication of
determined exempirically. the functionality delivered by the software.’’
Once fuction points have been calculated, they are Function points, feature points, and 3D function
used in a manner analogous to LOC to normalize points represent the same thing–“functionality’’ or
measures of software productivity, quality, and other “utility” delivered by software. Each of these measures
attributes: results in the same value if only the data dimension of
 errors per FP an application is considered. For more complex real-
 defects per FP time systems, the feature point count is often between
 Rs. per FP 20 and 35 per cent higher than the count determined
 page of documentation per FP using function points alone.
 FP per person-month. The fuction point (and its extensions), like the LOC
(iii) Extended Function Point Metrics: The measure, is controversial. Proponents claim that FP is
function point metric was originally designed to be programming language independent, making it ideal for
applied to business information systems applications. applications using conventional and non-procedural
To allow these applications, the data dimension was languages, and that it is based on data that are more
emphasized to the exclusion of the functional and likely to be known early in the evolution of a project,
behavioural (control) dimensions. Due to this function making FP more attractive as an estimation approach.

www.neerajbooks.com
www.neerajbooks.com

Opponents assert that it involves deceptive as (5) The total that–the amount of surplus time or
computation is based on subjective data counting leeway allowed in scheduling tasks so that
difficult after the fact and FP has no direct physical the network critical path is maintained on
meaning, it is just a number. schedule. Boundary time calculations lead to
Q. 11. What is the use of PERT and CPM project a determination of critical path and provide
scheduling methods in a software project? the manager with a quantitative method for
Ans. PERT/CPM—Scheduling of a software evaluating progress as tasks are completed.
project is same as for any multitask engineering effort. Both PERT and CPM have been implemented in
Hence, general project scheduling tools and techniques a wide variety of automated tools that are available for
can be applied to software with little modification. virtually ever personal computer. Such tools are easy to
Program Evaluation and Review Technique
use and make the scheduling methods available to every
(PERT) and critical path method (CPM) are the two
software project manager.
project scheduling methods used in technique software
Q. 12. What is the use of GANTT Charts in
development. Both techniques use information already
Software Project?
developed in earlier project planning activities :
Ans. Gantt Charts (Timeline Charts): When
— estimates of effort
creating a software project schedule, the planner begins
— a decomposition of product function
with a set of tasks. If automated tools are used, the work

Neeraj
— the selection of the appropriate process model
— the selection of project type and task set breakdown is input as a task network or task outline.
Interdependencies among tasks may be defined Effort, duration and start data are then input for each
using a task network. Tasks, sometimes called the project task. In addition, tasks may be assigned to specific
Work Breakdown Structure (WBS), are defined for the individuals.

Publications
product as a whole or for individual functions. As a consequence of this input, a Gantt chart, a
Both PERT and CPM offer quantitative that allow timeline chart, is generated. A timeline chart can be
the software planner to: developed for the entire project. Alternatively, separate
(1) determine the critical path–the chain of tasks charts can be developed for each project function or for
that determines the duration of the project; each individual working on the project.

www.neerajbooks.com
(2) establish most likely time estimates for
individual tasks by applying statistical models; and
Figure illustrates that format of Gantt chart. It
depicts a part of a software project schedule that
(3) calculate boundary times that define a time emphasizes the concept scoping tasks for a new project
“window” for a particular task. schedule that emphasizes the concept scoping task for
Boundary time calculations are very useful in a new word-processing software product. All project
software project scheduling. Slippage in the design of tasks are listed in the left hand column. The horizontal
one function, for example, can retard further bars indicate the duration of each task. When multiple
development of the functions. Important boundary times bars occur at the same time on the calendar, task
are: concurrency is implied. The diamonds indicate
(1) The earliest time that a task can begin when milestones.
all preceding tasks are completed in the
Once the information needed for Gantt chart is
shortest possible time;
input, the majority of software project scheduling tools
(2) The latest time for task initiation before the
produce project tables–a tabular listing of all project
minimum project completion time is delay;
tasks, their planned and actual start an end dates, and a
(3) The earliest finish–the sum of the earliest start
variety of related information. Used alongwith the
and the task duration;
timeline chart, project tables enable the project manager
(4) The latest finish–the latest start time added
to tasks duration; and to follow progress.

www.neerajbooks.com
www.neerajbooks.com

Work tasks week 1 week 2 week 3 week 4 week 5

1. Identify need and benefits


Meet with customers
Identify needs and project constraints
Establish product statement
Milestone : product statement defined
2. Defined desired output/control/input (OCI)
Scope keyboard functions
Scope voice input functions
Scope modes of interaction
Scope document diagnostics
Scope other WP functions
Document OCI
FTR: Review OCI with customer
Revise OCI as required;
Milestone : OCI defined

Neeraj
3. Define the functionality/behaviour
Define keyboard functions
Define voice input functions
Describe modes of interaction
Describe spell/grammar check

Publications
Describe other WP functions
FTR : Review OCI definition with customer
Revise as required
Milestone : OCI definition complete

www.neerajbooks.com
4. Isolate software elements
Milestone : Software elements defined
5. Research availability of existing software
Research text editing components
Research voice input components
Research file management components
Research spell/grammar check components
Milestone : Reusable components identified.
6. Define technical feasibility
Evaluate voice input
Evaluate grammar checking
Milestone : Technical feasibility assessed
7. Make quick estimate of size
8. Create a scope definition
Review scope document with customer
Revise document as required
Milestone : Scope document complete

www.neerajbooks.com
www.neerajbooks.com

Neeraj
Publications
www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

Software Engineering Fundamentals


10
discipline that enables changes to be made in the existing
The days when computer software development documentation and products in such a way as not to
was handled as part of documentation or general on the destroy the integrity of the software.
agenda of a project meeting have gone long back. Now- The goals of SCM are:

Neeraj
a-days, software has become the most important part. It Configuration Identification: It identifies
also plays an increasing role in business management. configurations, configuration items and
Software’s development should be managed very baselines.
carefully. It needs the structured application of scientific Configuration Control: It implements a
and engineering principles in order to analyze, design, controlled change process. This is usually
achieved by setting up a change control board

Publications
construct, document and maintain it.
In this chapter, we will study about good quality whose primary function is to approve or reject
software and how it can be achieved, software all change requests that are sent against any
configuration management and also the maintenance baseline.
of the software is considered as the important criteria. Configuration Status Accounting: It records

www.neerajbooks.com
Quality of software can be ensured by some quality and reporting all the necessary information on
control activities performed throughout the develop- the status of the development process.
ment of the software. Configuration Auditing: It ensures that
configurations contain all their intended parts
and are sound with respect to their specifying
SOFTWARE CONFIGURATION MANAGEMENT documents, including requirements, archi-
Software configuration management is a task of tectural specifications and user manuals.
initiating, evaluating and controlling the changes to a Build Management: It manages the process and
software product. Its practice includes revision control tools used for builds.
and the establishment of baselines. Thus, Software Process Management: It ensures adherence to
Configuration Management (SCM) is a set of activities the organization’s development process.
that are designed to control changes identified by the Environment Management: It manages the
work products that are likely to change, establishing software and hardware that host the system.
relationships among them, defining mechanisms for Teamwork: It facilitates team interactions
managing different versions of these work products, related to the process.
controlling changes that are imposed, auditing and Defect Tracking: It makes sure every defect has
reporting on the changes that are made. traceability back to the source.
The process of software development and Configuration Management Activities: There are
maintenance is controlled is called configuration four categories of configuration management activities.
management. Configuration management is an integral They are:
part of the software development process across all 1. The identification of the components and
phases of the life cycle. It functions as a controlling changes.

www.neerajbooks.com
www.neerajbooks.com

2. The control of the way by which the changes During the process of software evolution, many objects
are made. are created for example files, electronic documents,
3. Auditing the changes. paper documents, source code, executable code and
4. Status accounting-recording and documenting bitmap graphics. It is the first stage towards being able
all the activities that have taken place. to manage multiple versions. A detailed record of every
The required documents for these activities are: version of the software is kept once the version control
Project plan tool is in place. According to Clemm, configuration
Software requirement specification document management allows a user to specify alternative
Software design description document configurations of the software system through the
Source code listing selection of appropriate versions. This is supported by
Test plans/procedures/test cases associating attributes with each software version and
User manuals. then allowing a configuration to be specified and
All components of the system’s configuration are constructed by describing the set of desired attributes.
recorded along with the relationships and dependencies This comprises the:
between them. It must record all the changes that is Name of each source code component,
addition, deletion or modification on any system including the variations and revisions,
component and its effect upon the rest of the system’s The versions of the various compilers and
components must be checked. A new configuration is linkers used,
recorded after a change has been made. The name of the software staff who constructed

Neeraj
Software Configuration Management Process: the component.
It is an important element of software quality assurance. The date and the time at which it was
Its responsibility is to control the changes made in the constructed.
software. It is also responsible for the identification of Change Control Process: It will be appropriate if
software configuration items and various versions of changes to the software can be predicted. Change control
the software, the auditing and the reporting of all the process comes into effect when the software and

Publications
changes that are made to the software, applied to the associated documentation are delivered to configuration
configuration. It introduces a set of complex questions management change request form which should be able
such as: to record the recommendations regarding the change.
How does an organization identify and manage This form is handed to change control authority which
the many existing versions of a program in a determines whether a change has to be accepted or not

www.neerajbooks.com
manner that will enable change to be accommo-
dated efficiently?
How does an organization control the changes
and only the approved changes are made to the software.
The change request form is shown below:
CHANGE REQUEST FORM
before and after the software is released to the Project ID:
customer? Change Requester with date:
Who has the responsibility for approving and Requested change with date:
ranking changes? Change analyser:
How can be ensured that changes have been Components affected:
made properly? Associated components:
What mechanism is used to appraise others of Estimated change costs:
changes that are made? Change priority:
These questions lead us to the definition of the Change assessment:
software configuration tasks: Identification, version Change Implementation:
control, change control, configuration auditing and Date submitted to CCA:
reporting. Date of CCA decision:
Software Version: There will be at least two CCA decision:
versions of the software system during software Change implementer:
maintenance that is the old version and the new Date submitted to QA:
version(s). Version control combines procedures and Date of implementation:
tools to manage different versions of the configuration Date submitted to CM:
objects that are created during the software process. QA decision:

www.neerajbooks.com
www.neerajbooks.com

Here, CCA refers to Change Control Authority, QA for quality assurance and CM for change manager.
According to James Bach, we can define change control as follow: “Change control is vital. But the forces that
make it necessary also make it annoying. We worry about change because a tiny disturbance in the code can create
a big failure in the product. But it can also fix a big failure or enable wonderful new capabilities. We worry about
change because a single rogue developer could sink the project; yet brilliant ideas originate in the minds of those
rogues and a burdensome change control process could effectively discourage them from doing creative work.”
For a large project an uncontrolled change would lead to a big chaos. For such projects change control process
should be applied. The change control process is explained schematically below:

Need fo r change is recognized

C hange requ est from user

Developer evalua tes

Change re port is gen erated

Change control authority decides

Neeraj
Request is queued for action, ECO generated Change request is denied

Assign individua ls to con figuration obje cts Use r is informed

“Check out” configura tio n objects (items)

Publications
Make the change

Review the change

“Check in” the c onfiguration items that have been changed

www.neerajbooks.com
Establish a ba seline for testing

Perform qua lity assura nce and testing activitie s

“Promote” c hanges for inclusion in the next release

Rebuild appropriate version of software

Review the change to all configu ration items

Include change in ne w version

Distribute the new version

The change control process is described below: the final decision on the status and priority of the change.
A change request is submitted and evaluated to An Engineering Change Order (ECO) is generated for
access technical merit, potential side effects, overall each approved change which describes the change to
impact on other configuration objects and system be made, the constraints that must be respected and the
functions, and the projected cost of change. The results criteria for review and audit. Now the object to be
of the evaluation are presented as a change report, which changed is checked out of the project database, the
is used by a Change Control Authority (CCA) to make change is made and appropriate SQA activities are

www.neerajbooks.com
www.neerajbooks.com

applied. The object is then checked in to the database rules, government policies, work patterns or
and appropriate version control mechanism is used to software and hardware operating platforms.
create a next version of the software. The changes to all Modification will be required for the change
configuration items are being audited and the changes occurring to the whole or part of the
are included in the new version which is then distributed environment. Thus, this type of maintenance
to all. includes any work this is initiated by moving
SOFTWARE MAINTENANCE the software to the different hardware or
Software maintenance is a task that every software platform-compiler, operating system
development group has to face when the software is or new processor.
delivered to the customer’s site, installed and is Perfective Maintenance: It means improving
operational. Commonly maintenance means fixing processing efficiency or performance or
things that break or wear down whereas in software restructuring the software to improve
nothing wears out. Hence, software maintenance changeability. When software becomes useful
includes error correction, enhancement of capabilities, it tries to expand its requirements. Expansion
deletion of absolute capabilities and optimization. of requirements can take the form of
Because change is unavoidable hence modifications are enhancement of existing system functionality or
required to be done on the software. So any work that is improvement in computational efficiency. Thus
done after the software is released and is operational is this type of maintenance refers to enhancements:
the maintenance work. Its purpose is to preserve the making the product better, faster, smaller, better
documented, cleaner structured, with more

Neeraj
value of software over time. The value can be enhanced
functions or reports.
by meeting additional requirements, expanding the
Other Types of Maintenance: There are long
customer base, being easy to use, and being efficient
term effects of corrective, adaptive and
and using new technologies. It takes about 70% of the
perfective changes which will lead to increase
cost of the entire life cycle to keep the software
in the complexity of the software that reflects
operational after release.

Publications
deteriorating structure. Preventive maintenance
Categories of Maintenance: There are four broad should be done to maintain or reduce it. Thus,
categories of software maintenance. They are: this type of maintenance concerns activities
Corrective Maintenance: It refers to the aiming on increasing software maintainability
modifications that are initiated by the defects and prevent problems in the future. Since,

www.neerajbooks.com
in the software. A defect can be a result of design software does not degrade in the same way as
errors, logic errors and coding errors. Design hardware and does not need maintenance to
error occurs when the changes made to the retain the presently established level of
software are incorrect, incomplete, wrongly functionality. Some authors do not use this term
communicated or the change request is that is why it is put under “other types of
misunderstood. Logic errors occur when there maintenance” category.
are invalid tests and conclusions; incorrect The requests come regularly to carry out
implementation of design specifications, faulty maintenance activities. The request may be for
logic flow or incomplete test data is there. corrective, adaptive or perfective maintenance. The
Coding errors are caused when incorrect distribution of maintenance effort is shown below:
implementation of detailed logic design and
incorrect use of the source code logic is there.
Defects also occur due to data processing errors
and system performance errors. Thus, corrective
maintenance includes all the changes made to
remove actual faults in the software.
Adaptive Maintenance: It refers to the
modifications of the software to match the
changes in the ever-changing environment. The
term environment here refers to the totality of
all conditions and influences which act from
outside upon the software, for example, business

www.neerajbooks.com
www.neerajbooks.com

Problems During Maintenance: The most or difficult to maintain systems. To address this
important problem during maintenance is that the issue the use of more advanced requirement
programmer must understand the problem before specification approaches, design techniques and
correcting or modifying it. Then the impact of the tools is done.
intended change on the problem should be understood. Complete Replacement of the System: If the
Some of the problems with maintenance are discussed cost of developing a new system is equal to the
below: cost of maintaining an existing system then one
Program is written by person or group of can develop the new system from scratch; but it
persons that work individually. is not practical to do so. The risk and cost
Often the program is changed by the person who associated with complete replacement of the
did not understand it properly which results in system is very high. Corrective and preventive
a deterioration of the program’s original maintenance takes place at small intervals. The
organization. creation of another system has no guarantee of
Program listings, even those that are well functioning properly or better than the previous
organized, are not structured to support reading one and even on installation few errors can occur
for comprehension. which didn’t occur in the previous one and once
Due to high staff turnover in the Information such error are discovered they need to be fixed

Neeraj
Technology industry many systems are which will cost them more.
maintained by persons who are not the original Maintenance of Existing System: Complete
author of the software and do not have adequate replacement of the system is not a good option.
knowledge about the system. This means that An operational system is itself an asset to an
these persons may introduce changes to organization in terms of the technical knowledge

Publications
programs without being aware of their effects and the working culture engendered. The current
on the other parts of the system- the ripple system may need to have the potential to evolve
effect. to a higher state, providing more sophisticated
Some problems become visible when the system user-driven functionality, the capability of
is in use. Due to information gap the users are developing cutting edge technology and of

www.neerajbooks.com
unable to explain what their requirements are
from the system to the programmers/analysts.
allowing the integration of other systems in a
cost effective manner.
Systems are not designed for changes. If there The Maintenance Process: Firstly, what is to be
is hardly any scope for change, maintenance will modified is understood by the maintenance personnel.
be very difficult. Now they modify the program to satisfy the maintenance
All these problems translate to a higher total cost objectives. After modifications it must ensure that the
that is 40% to 70% for a system. changes that are done do not affect the other parts of
Potential Solutions to Maintenance Problems: the system. Finally, the program must be tested. These
A number of possible solutions are suggested for activities can be accomplished in four phases that is:
maintenance problem. They include: 1. Program understanding.
Budget and Effort Reallocation: It is 2. Generating particular maintenance proposal.
suggested that more time and resources should 3. Accounting for ripple effect.
be invested in the development specification and 4. Testing and maintainability.
design of more maintainable system rather than The diagrammatic representation of the software
allocating resources to develop unmaintainable maintenance process is shown below:

www.neerajbooks.com
www.neerajbooks.com

Correct program error


Determine Add new capabilities
maintenance objectives Delete absolute features
Optimization

Phase 1

Complexity
Program understanding
Documentation

Self descriptiveness

Phase 2

Generate particular
maintenance proposal Extensibility

Neeraj Phase 3

Publications
Account for ripple
effect Stability

www.neerajbooks.com Phase 4

Testing
Testability

Pass testing
No

1. Program Understanding: The first phase consists of analyzing the program in order to understand it.
Attributes like complexity, documentation, self descriptiveness, etc. contribute to the ease of understanding a program.
Complexity of the system usually based on the control or data flow of the program is the measure of the effort
required to understand a program. Self-descriptiveness of the program refers to the measure of the clarity of the
program that is how easy the program is to read, understand and use.

www.neerajbooks.com
www.neerajbooks.com

2. Generating Particular Maintenance Proposal: explicitly stated and implicitly stated functional
To accomplish the implementation of the maintenance requirements. Here, the explicitly stated functional
objective this phase consists of generating particular requirement can be derived from the requirements stated
maintenance proposal. A clear understanding is required by the customer which are generally documented in
for the maintenance objective and the program to be some form. Implicit requirements are requirements
modified. It is affected by the attribute extensibility. which are not stated explicitly but are intended. Implicit
Extensibility is the measure to which a program can functional requirements are standards which a software
support the extension of functions. development company adheres to during the
3. Ripple Effect: This phase consists of accounting development process. Implicit functional requirements
all the ripple effect that occurred due to modifications. also include the requirements of good maintainability.
Modifications not only affect the portion where it is Quality software is reasonably bug-free, delivered
performed but also to the other portions of the program. on time and within budget, meets requirements and is
Hence ripple effect occurs here. One aspect of this effect maintainable. However, as discussed above, quality is
is functional or logical in nature. It also concerns the a subjective term. It will depend on who the customer
performance of the program. The stability of the is and their overall influence in the scheme of things.
program is the main concern affecting the ripple effect Each type of ‘customer’ will have their own slant on
after the program modification. Program stability refers ‘quality’. The end-use might define quality as some thing
to the resistance to the amplification of changes in the which is user-friendly and bug-free.
program. Good quality software satisfies both explicit and

Neeraj
4. Modified Program Testing: To ensure that the implicit requirements. Software quality is a complex
program has the same reliability level as it had before mix of characteristics and varies from application to
modification, testing is performed on the modified application and the customer who requests for it.
program in this phase. It is the primary factor that Attributes of Quality: The following are some of
constitutes to the development of the cost effective the attributes of quality:

Publications
techniques that are applied during maintenance. Program 1. Ability to be Audited: The ability of the
testability is defined as the measure of the effort required software being tested against conformance to standard.
to adequately test the program according to the well 2. Compatibility: The ability of two or more
defined testing criterion. systems or components to perform their required
5. Maintainability: Maintainability may be functions while sharing the same hardware or software

www.neerajbooks.com
defined qualitatively as: the ease with which software environment.
can be understood, corrected, adapted and/or enhanced. 3. Completeness: The degree to which all the
Program maintainability and program understandability software’s required functions and design constraints are
are parallel concepts: the more difficult a program is to present and fully developed in the requirements
understand, the more difficult it is to maintain and the specification, design document and code.
more difficult it is to maintain higher will be the 4. Consistency: The degree of uniformity,
maintenance risk. standardization and freedom from contradiction among
SOFTWARE QUALITY ASSURANCE the documents or parts of a system or component.
Software Quality Assurance (SQA) consists of a 5. Correctness: The degree to which a system or
means of monitoring the software engineering processes component is free from faults in its specification, design
and methods that is used to ensure quality. The methods and implementation. The degree to which software
by which this is accomplished are many and varied and documentation or other items meet specified require-
may include ensuring conformance to one or more ments.
standards, such as ISO 9000 or a model such as CMMI. 6. Feasibility: The degree to which the require-
Software Quality: Quality is defined as ments, design, or plans for a system or component can
conformance to the stated and implied needs of be implemented under existing constraints.
customer. Quality also refers to the measurable 7. Modularity: The degree to which a system or
characteristics of a software product and these can be computer program is composed of discrete components
compared based on a given set of standards. In the same such that a change to one component has minimal impact
way, software quality can be defined as conformance to on other components.

www.neerajbooks.com
www.neerajbooks.com

8. Predictability: The degree to which the of course, most people feel that problems in these areas
functionality and performance of the software are are caused by other people. (If only they would take the
determinable for a specified set of inputs. time to do things right.)
9. Robustness: The degree to which a system or Some software developers continue to believe that
component can function correctly in the presence of software quality is something you begin to worry about
invalid inputs or stressful environmental conditions. after code has been generated. Nothing could be further
10. Structured: The degree to which the SDD from the truth! software quality assurance (SQA) is an
(System Design Document) and code possess a definite umbrella activity that is applied throughout the software
pattern in their interdependent parts. This implies that process. SQA encompasses :
the design has proceeded in an orderly and systematic (1) a quality management approach,
manner (e.g. top-down, bottom-up). The modules are (2) effective software engineering technology
cohesive and the software has minimized coupling (methods and tools),
between modules. (3) formal technical review that are applied
11. Testability: The degree to which a system or throughout the software process,
component facilitates the establishment of test criteria (4) a multitiered testing strategy,
and the performance of tests to determine whether those (5) control of software documentation and the
criteria have been met. changes made to it,
12. Traceability: The degree to which a (6) a procedure to assure compliance with

Neeraj
relationship can be established between two or more software development standards (when applicable), and
products of the development process. The degree to (7) measurement and reporting mechanisms.
which each element in a software development product Quality Concepts: It has been said that no two
establishes its reason for existing (e.g., the degree to snowflakes are alike. Certainly when we watch snow
which each element in a bubble chart references the failing it is hard to imagine that snowflakes differ at all,

Publications
requirement that it satisfies). For example, the system’s let alone that each flames possesses a unique structure.
functionality must be traceable to user requirements. In order to observe differences between snowflakes, we
13. Understandability: The degree to which the must examine the specimens closely, perhaps using a
meaning of the SRS, SDD, code are clear and magnifying glass. In fact, the closer we look, the more
understandable to the reader. differences we are able to observe.

www.neerajbooks.com
14. Verifiability: The degree to which the SRS,
SDD and code have been written to facilitate verification
and testing.
This phenomenon, variation between samples,
applies to all products of human as well as natural
creation. For example, if two “identical” circuit boards
Quality Assurance: The software engineering are examined closely enough, we may observe that the
approach described in this book works toward a single copper pathways on the boards differ slightly in
goal: to produce high-quality software. Yet many readers geometry, placement and thickness. In addition, the
will be challenged by the question : “What is software location and diameter of the holes drilled in the boards
quality?” varies as well.
Philip Crossly [CRO79], in his landmark book All engineered and manufactured parts exhibit
on quality, provides a wry answer to this question: variation. The variation between samples may not be
The problem of quality management is not what obvious without the aid of precise equipment to measure
people don’t know about it. The problem is what they the geometry, electrical characteristics, or other attribute
think they do know.... of the parts. However, with sufficiently sensitive
In this regard, quality has much in common with instruments, we will likely come to the conclusion that
sex. Everybody is for it. (Under certain conditions, of no two samples of any item are exactly alike.
course.) Everyone feels they understand it. (Even though Does this principle apply to software as well as
they wouldn’t want to explain it.) Everyone thinks physical items? Imagine a program that, at some point
execution is only a matter of following natural during its execution, needs to sort records in ascending
inclinations. (After all, we do get along somehow.) And, order based on some key field. The nature of the records

www.neerajbooks.com
www.neerajbooks.com

is not important. They may be employee records, a measurable characteristics–things we are able to
customer database, map coordinates for a real-time flight compare to known standards such as length, colour,
control system, or whatever. electrical properties, malleability and so on. However,
The programmer creating the sort routine (or software, largely an intellectual entity, is more
selecting it from a library of reusable components) elects challenging to characterize than physical objects.
to use quicksort to solve the immediate problem. Can Nevertheless, measures of a program’s character-
an observer of the final product distinguish the software istics do exist. These properties include cyclomatic com-
from an otherwise identical product that uses, for plexity, cohesion, number of function points, lines of
example , a bubble sort? Perhaps, but we probably need code, and many other discussed earlier. When we
more information and possibly sensitive instrumentation examine an item based on its measurable characteristics,
to distinguish between the two systems. two kinds of quality may be encountered: quality of
Variation control is the heart of quality control. A design and quality of conformance.
manufacturer wants to minimize the variation among Quality of design refers to the characteristics that
the products that are produced, even when doing designers specify for an item. The grade of materials,
something relatively simple like duplicating diskettes. tolerances and performance specifications all contribute
We want to minimize the variation between any pair of to the quality of design. As higher-graded materials are
allegedly identical diskettes. Surely, this cannot be a used and tighter tolerances and greater levels of
problem–duplicating disks is a trivial manufacturing performance are specified, the design quality of a
operation, and we can guarantee that exact duplicates product increases, if the product is manufactured

Neeraj
of the software are always created. according to specifications.
Or can we? We need to ensure the tracks are placed Quality of conformance is the degree to which the
on the diskettes within a specified tolerance so that the design specifications are followed during manufactur-
overwhelming majority of floppy drives can read the ing. Again, the greater the degree of conformance, the
diskettes. In addition, we need to ensure that the higher the level of quality of conformance.

Publications
magnetic flux for distinguishing a zero from a one is In software development, quality of design
sufficient for read/write heads to detect. The disk encompasses requirements, specifications and the
duplication machines can, and do, wear and go out to design of the system. Quality of conformance is an issue
tolerance. So even a “simple” process such as focused primarily on implementation. If the
duplication may encounter problems due to variation implementation follows the design and the resulting

www.neerajbooks.com
between samples.
How might a software development organization
need to control variation? From one project to another,
system meets its requirements and performance goals,
conformance quality is high.
2. Quality Control: Variation control may be
we want to minimize the difference between the equated to quality control. But how do we achieve
predicted resources needed to complete a project and quality control? Quality control is the series of
the actual resources used, including staffing, equipment, inspections, reviews, and tests used throughout the
and calendar time. In general, we would like to make development cycle to ensure that each work product
sure our testing program covers a known percentage of meets the requirements placed upon it. Quality control
the software from one releases to another. Not only do includes a feedback loop to the process that created the
we want to minimize the number of defects that are work product. The combination of measurement and
released to the field, but we’d like to ensure that the feedback allows us to tune the process when the work
variance in the number of hugs is also minimized from products created fail to meet their specifications. This
one release to another. (Our customers will likely be approach views quality control as part of the manufac-
upset if the third release of a product has ten times as turing process.
many defects as the previous release). We would like to Quality control activities may be fully automated,
minimize the differences in speed and accuracy of our entirely manual, or a combination of automated tools
hot line support responses to customer problems. The and human interaction. A key concept of quality control
list goes on and on. is that all work products have defined and measurable
1. Quality: The American Heritage Dictionary specification to which we may compare the outputs of
defines quality as “a characteristic or attribute of some- each process. The feedback loop is essential to minimize
thing.” As an attribute of an item, quality refers to the defects produced.

www.neerajbooks.com
www.neerajbooks.com

3. Quality Assurance: Quality assurance consists Appraisal costs include activities to gain insight into
of the auditing and reporting functions of management. product condition the “first time through” each process.
The goal of quality assurance is to provide management Examples of appraisal costs include :
with the data necessary to be informed about product • in-process and interprocess inspection
quality, thereby gaining insight and confidence that • equipment calibration and maintenance
product quality is meeting its goals. Of course, if the • testing
data provided through quality assurance identify Failure costs are costs that would disappear if no
problems, it is management’s responsibility to address defects appeared before shipping a product to customers.
the problems and apply the necessary resources to Failure costs may be sub-divided into internal failure
resolve quality issues. costs and external failure costs. Internal failure costs
are the costs incurred when we detect an error in our
4. Cost of Quality: Cost of quality includes all costs
product prior to shipment. Internal failure costs include:
incurred in the pursuit of quality or in performing quality
• rework
related activities. Cost of quality studies are conducted
• repair
to provide a baseline for the current cost of quality, to • failure mode analysis
identify opportunities for reducing the cost of quality, External failure costs are the costs associated with
and to provide a normalized basis of comparison. The defects found after the product has been shipped to the
basis of normalization is almost always dollars. Once customer. Examples of external failure costs are:
we have normalized quality costs on a dollar basis, we • complaint resolution
have the necessary data to evaluate where the • product return and replacement

Neeraj
opportunities lie to improve our processes. Furthermore, • help line support
we can evaluate the affect of changes in dollar-based • warranty work
terms. As expected, the relative costs to find repair a defect
Quality costs may be divided into costs associated increase dramatically as we go from prevention to
with prevention, appraisal, and failure. Prevention costs detection and from internal failure to external failure.

Publications
include : Figure on the nest page based on data collected by
• quality planning Boehm [BOE81], illustrates this phenomenon.
• formal technical reviews More recent anecdotal data is reported by Kaplan
• test equipment and his colleagues [KAP95] and is based on work at
• training IBM’s Rochester development facility:

www.neerajbooks.com

www.neerajbooks.com
www.neerajbooks.com

A total of 7053 hours was spent inspecting 200,000 recognizations within a company. It may be that a stable
lines of code with the result that 3112 potential defects organizational structure could do much to improve the
were prevented. Assuming a programmer cost of $ 40.00 quality of software. Atarimae hinshits would lead
per hour, the total cost of preventing 3112 defects was management to suggest changes in the way
$ 282,120, as roughly $ 91.00 per defect. reorganization occurs.
Compare these numbers to the cost of defect While the first two steps focus on the process, the
removal once the product has been shipped to the next step, called kansei (translated as “the five senses”)
customer. Suppose that there had been no inspections, concentrates on the user of the product (in this case,
but that programmers had been extra careful and only software). In essence, by examining the way the user
one defect per 1000 lines of code [singnificantly better applies the product, kansei leads to improvement in the
than industry average] escaped into the shipped product. product itself, and potentially, to the process that created
That would mean that 200 defects would still have to it.
be fixed in the field. At an estimated cost of $ 25,000 Finally, a step called miryokuteki hinshitsu
per field fix, the cost would be $ 5 million, or broadens management concern beyond the immediate
approximately 18 times more expensive than the total product. This is a business-oriented step that looks for
cost of the defect prevention effort. opportunity in related areas that can be indentified by
It is true that IBM produces software that is used observing the use of the product in the marketplace. In
by tens of thousands of customers and that their costs the software world, miryokuteki hinshitsu might be
for field fixes may be higher than average. This in no viewed as an attempt to uncover new and profitable

Neeraj
way negates the results noted above. Even if the average products or applications that are an outgrowth from an
software organization has field fix costs that are 25 per existing computer-based system.
cent of IBM’s (most have no idea what their costs are), For most companies kaizen should be of immediate
the cost savings associated with quality control and concern. Until a mature software process has been
assurance activities are compelling. achieved, there is little point in moving to the next steps.

Publications
Quality Movement: Today, senior managers at Software Quality Assurance: Even the most jaded
companies throughout the industiralized world software developers will agree that high-quality software
regognize that high product qauality translates to cost is an important goal. But how do we define quality? A
saving and an improvied bottom line. However, this was wag once said, “Every program does something right,
not always the case. The quality movement began in it just may not be the thing that we want it to do”.

www.neerajbooks.com
the 1940s with the seminal work of W. Edwards Deming
[DEM86] and had its first true test in Japan. Using
Deming’s ideas as a cornerstone, the Japanese have
There have been many definitions of software
quality proposed in the literature. For our puposes,
software quality is defined as :
developed a systematic approach to the elimination of Conformance to explicitly stated functional and
the root causes of product defects. Throughout the 1970s performanc requirements, explicitly documented
and 1980s, their work migrated to the Western world development standards, and implicit characteristics what
and is sometimes called “Total Quality Management are expected of all professionally developed software.
(TQM)”. Although, terminology differs across different There is little question that the above definition
companies and authors a basis four-step progression is could be modified or extended. If fact, a definitive
normally encountered and forms the fondation of any definition of software quality could be debated endlessly.
good TQM program. For the purposes of this book the above definition serves
The first step is called kaizen and refers to a system to emphasize three important points:
of continuous process improvement. The goal of kaisen 1. Software requirements are the foundation from
is to develop a process (in this case, the software which quality is measured. Lack of conformance to
process) that is visible, repeatable, and meaurable. requirement is lack of quality.
The second step, invoked only after kaizen has been 2. Specified standards define a set of development
achieved, is called atarimae hinshitsu. This step criteria that guide the manner in which software is
examines intangibles that affect the process and works engineered. If the criteria are not followed, lack of
to optimize ehtier impact on the process. For example, quality will almost surely result.
the software process may be affected by high staff 3. There is a set of implicit requirements that often
turnover, which itself is caused by constant goes unmentioned (e.g., the desire for good

www.neerajbooks.com
www.neerajbooks.com

maintainability). If software conforms to its explicit — project documents (e.g., project plan)
requirements but fails to meet implicit requirements, — models (e.g., ERDs, class hierarchies)
software quality is suspect. — technical documents (e.g., specifications, test
SQA Plan: The SQA plan is the blueprint for plans)
software quality assurance. Developed by the SQA — user documents (e.g., help files)
group and the project team, the plan serves as a template This section also defines the minimum set of work
for SQA activities for each software project. products that are acceptable to achieve high quality.
An outline for SQA plan recommended by the IEEE Standards, Practices and Conventions lists all
is given below. Initial sections describe the purpose and applicable standards/practices that are applied during
scope of the document and indicate the software process the software process (e.g., document standards, coding
activities covered by quality assurance. All documents standards, and review guidelines). In addition, all
in the SQA plan are listed and all applicable standards project, process, and product metrics that are to be
are noted. The Management section of the plan describes collected as part of software engineering work are listed.
SQA’s place in the organizational structure; SQA tasks The Reviews and Audits section of the plan
and activities and their placement throughout the identifies the reviews and audits to be conducted by the
software process; and the organizational roles and software engineering team, the SQA group, and the
responsibilities relative to product quality. customer. It provides an overview of the approach for
The Documentation section details work products each review and audit.
produced as part of the software process. These include :
I. Purpose of plan

Neeraj
II. References
III. Management
1. Organization
2. Tasks
3. Responsibilities
IV. Documentation

Publications
1. Purpose
2. Required software engineering documents
3. Other documents
V. Standards, Practices and Conventions
1. Purpose

www.neerajbooks.com
2. Conventions
VI. Reviews and Audits
1. Purpose
2. Review Requirements
(a) software requirements review
(b) design reviews
(c) software verification and validation reviews
(d) functional audit
(e) physical audit
(f) in-process audits
(g) management reviews
VII. Test
VIII. Problem Reporting and Corrective Action
IX. Tools, Techniques and Methodologies
X. Code Control
XI. Media Control
XII. Supplier Control
XIII. Records Collection Maintenance Retention
XIV. Training
XV. Risk Management
Fig. ANSI/IEEE Std. 730-1984 and 983-1986 software quality assurance plans

www.neerajbooks.com
www.neerajbooks.com

The test seciton is about the software test plan and documents, and tracks deviations; verifies that
procedure. It also defines test record-keeping corrections have been made; and periodically
requirements. Problem Reporting and Corrective Action reports, the results of its work to the project
defines procedures for reporting, tracking and resolving manager.
errors and defects and identifies the organizational (4) Ensures that deviations in software work and
responsibilities for these activities. work products are documented and handled
The rest of the SQA plan identifies the tools and according to a documented procedure.
methods that support SQA activities and tasks; Deviations may be encountered in the project
references software configuration management plan, process description, applicable
procedures for controlling change; defines a contract standards, or technical work products.
management approach; establishes methods for (5) Records any non-compliance and reports to
assembling, safeguarding and maintaining all records; senior management. Non-compliance items
identifies training required to meet the needs of the plan are tracked until they are resolved.
and defines methods for identifying, assessing, Moreover, the SQA group coordinates the control
monitoring and controlling risks. and management of change and helps to collect and
The SQA plan is developed during project analyze software metrics.
planning and is reviewed by all interested parties. Software Quality Standards: Software standards
Quality assurance activities performed by the software help an organization to adopt a uniform approach in
engineering team and the SQA group are governed by designing, developing and maintaining software. There

Neeraj
the plan. The plan identifies: are a number of standards for software quality and
— evaluations to be performed software quality assurance. Once an organization
— audits and reviews to be performed decides to establish a software quality assurance process,
— standards that are applicable to the project standards may be followed to establish and operate
— procedures for error reporting and tracking different software development activities and support

Publications
— documents to be produced by the SQA group activities. A number of organizations have developed
— amount of feedback provided to software standards on quality in general and software quality in
project team. specific.
The SQA team prepares the SQA plan and Software Engineering Institute (SEI) has developed
performs following duties : what is called a Capability Maturity Model (CMM) now

www.neerajbooks.com
(1) Participates in the development of the called the Capability Maturity Model Integration
project’s software process description. The (CMMI) to help organizations to improve software
software engineering team selects a process development processes.
for the work to be performed. The SQA group It is a model of 5 levels of process maturity that
reviews the process description for determine the effectiveness of an organization in
compliance performed. The SQA group delivering quality software. Organizations can receive
reviews the process description for CMMI ratings by undergoing assessments by qualified
compliance with organizational policy, auditors. The organizations are rated as CMM Level 1,
internal software standards, externally CMM Level 2 etc. by evaluating their organizational
imposed standards (e.g., (ISO 9001), and process maturity.
other parts of the software project plan. 1. SEI-CMM Level 1: Characterized by
(2) Reviews software engineering activities to unorganized, chaos, periodic panics, and heroic/efforts
verify compliance with the defined software required by individuals to successfully complete
process. The SQA group identifies, projects. Successes depend on individuals and may not
documents and tracks deviations from the be repeatable.
process and verifies that corrections have 2. SEI-CMM Level 2: Software project tracking,
been made. requirements management, realistic planning, and
(3) Audits designated software work products to configuration management processes are in place;
verify compliance with those defined as part successful practices can be repeated.
of the software process. The SQA group 3. SEI-CMM Level 3: Standard software
review selected work products identifies, development and maintenance processes are integrated

www.neerajbooks.com
www.neerajbooks.com

throughout an organization; a Software Engineering replaces the previous set of three standards of 1994)
Process Group is in place to oversee software processes, that helps the organization to establish, operate, maintain
and training programs are used to ensure understanding and review a quality management system that is assessed
and compliance. by outside auditors. The standard is generic in nature
4. SEI-CMM Level 4: Metrics are used to track and can be applied to any organization involved in
productivity, processes, and products. Project production, manufacturing service including an
performance is predictable, and quality is consistently organization providing software services.
high. It covers documentation, design, development,
5. SEI-CMM Level 5: The focus is on continuous production, testing, installation, servicing and other
process improvement. The impact of new processes and processes. It may be noted that ISO certification does
technologies can be predicted and effectively not necessarily indicate quality products. It only indicates
implemented when required. that the organization follows a well documented
The International Organization for Standardization established process. Table below gives a list of standards
(ISO) developed the ISO 9001:2000 standard (which along with the corresponding titles.
Standards Title
ISO/IEC 90003 Software Engineering. Guidelines for the Application of ISO 9001 : 2000 to Computer
Software

Neeraj
ISO 9001 : 2000 Quality Management Systems - Requirements
ISO/IEC 14598-1 Information Technology-Evaluation of Software Products-General Guide
ISO/IEC 9126-1 Software Engineering – Product Quality - Part 1: Quality Model
ISO/IEC 12119 Information Technology-Software Packages-Quality Requirements and Testing
ISO/IEC 12207 Information Technology-Software Life Cycle Processes

Publications
ISO/IEC 14102 Guideline For the Evaluation and Selection of CASE Tools
IEC 60880 Software for Computers in the Safety Systems of Nuclear Power Stations
IEEE 730 Software Quality Assurance Plans
IEEE 730.1 Guide for Software Assurance Planning

www.neerajbooks.com
IEEE 982.1 Standard Dictionary of Measures to produce reliable software
IEEE 1061 Standard for a Software Quality Metrics Methodology
IEEE 1540 Software Life Cycle Processes – Risk Management
IEEE 1028 Software review and audits
IEEE 1012 Software verification and validation plans

The documents that should be produced during they are made, recorded before they are implemented,
software development to enhance software quality reported to those with a need to know, or controlled in a
should also be specified by the SQAP. It should identify manner that will improve quality and reduce error.
all documents that govern the development, verification, Babich states that :
validation, use and maintenance of the software and how ‘‘The art of coordinating software development
these documents are to be checked for adequacy. to minimize .... confusion is called configuration
management. Configuration management is the
art of identifying, organizing and controlling
Q. 1. What is Software Configuration Manage- modifications to the software being built by a
ment and how does it differ from software programming team. The goal is to maximize
maintenance? productivity by minimizing mistakes.’’
Ans. Change is basic to any computer software Software Configuration Mangement (SCM) is an
when it is built. Change increases the level of confusion umbrella activity that is applied throughtout the software
among software engineers working on a project. process. Because cahnge can occur at any time, SCM
Confusion comes when changes are not analyzed before aims to (1) identify change, (2) control change, (3)

www.neerajbooks.com
www.neerajbooks.com

ensure that change is being properly implemented, and Ans. The Software Change Control process is as
(4) report change to others who may have an interest. follows:
There is clear distinction between software It will be appreciated if changes to the software
maintenance and software configuration management. can be predicted earlier. Change control process comes
Maintenance is a set of software engineering activities into situation when the software and associated
that occur after software has been delivered to the documentation are delivered to configuration
customer and put into operation. Software configuration
management change request form, which should record
management is a set of tracking and control activities
the actions that should be taken regarding the change.
that begin when a software project begins and terminated
only when the software is no more operation. The change request form is shown below:
Q. 2. What are the Fundamental Sources of CHANGE REQUEST FORM
change in Software? Project ID:
Ans. The output of the software process is Change Requester with date:
information. It can be divided into three broad categories: Requested change with date:
(1) Computer programs (both source-level and Change analyser:
executable forms), Components affected:
(2) Documents that describe the computer Associated components:
programs and Estimated change costs:
(3) Data (contained within the program or external Change priority:
to it).

Neeraj
Change assessment:
The items that comprise all information produced
as part of the software process are collectively called a Change Implementation:
software configuration. Date submitted to CCA:
As the software process progresses, the number Date of CCA decision:
of Software Cofiguration Items (SCIs) grows rapidly. A CCA decision:
system specification spawns a software project plan and Change implementer:

Publications
software requirements specification. In each SCI simply Date submitted to QA:
spawned other SCIs, little confusion would result. Date of implementation:
However, change may occur at any time, for any reason. Date submitted to CM:
The first Law of System Engineering states : No matter QA decision:
where you are in the system life-cycle, the system will

www.neerajbooks.com
Change Request Form
change, and the desire to change it will persist
It may include assessment of the proposed change,
throughout the life-cycle.
There are four fundamental sources of change: the estimated costs and how the change should be
— new business or market conditions that implemented. This form is submitted to a Change
demand changes in product requirements or Control Authority (CCA), which decides whether or not
business rules. the change is to be accepted. If the change is approved
— new customer requirements that demand by CCA it is then applied to the software. The revised
modification of data produced by information software is then revalidated by the Software Quality
systems, functionality delivered by products, Assurance (SQA) team to ensure that the changes made
or services delivered by a computer-based have not adversely affected the other parts of the
system. software. The change software is handed over to the
— reorganization and/or business downsizing software configuration team and is incorporated in a
that causes changes in project priorities or new version of the system.
software engineering team structure. Change control is currently used in a wide variety
— budgetary or scheduling constraints may
of products and systems. For Information Technology
redefine or product.
(IT) systems, it is a major aspect of the broader discipline
Software configuration management activities
manage change throughout the life-cycle of computer of change management. Typical examples from the
software. SCM is a software quality assurance activity computer and network environments are patches to
that is applied throughout the software process. software products, installation of new operating systems,
Q. 3. Briefly explain software change control upgrades to network routing tables, or changes to the
process? electrical power systems supporting such infrastructure.

www.neerajbooks.com
www.neerajbooks.com

Q. 4. What is meant by Software Configuration


Item?
Ans. Software Configuration Item is any part of
development and/or deliverable system which may
include software, hardware, firmware, drawings,
inventories, project plans or documents. These items
are independent tested stored reviewed and changed. A
software configuration item can be one or more of the
following:
1. System specification
2. Source code
The above evolutionary graph depicts the evolution
3. Object code of a configuration item during the development life
4. Drawing cycle. The initial version of the item is given version
5. Software design number Ver 1.0. Subsequent change to the item which
6. Design data would be mostly fixing bugs or adding minor
7. Database scheme and file structure functionality is given as Ver 1.1 and Ver1.2. After that,
8. Test plan and test cases a major modification to Ver 1.2 is given a number Ver
9. Product specific documents 2.0 at the same time, a parallel version of the same item

Neeraj
10. Project plan without the major modification is maintained given a
11. Standards procedures version number 1.3:
12. Process description. Depending on the volume and extent of change,
the version numbers are given by the version control
Q. 5. Comment “Version Control is a manage-
manager to uniquely identify an item through the
ment of multiple versions”?
software. Development lifecycle. It may noted that most

Publications
Ans. Version control is maintaining the multiple
of the version of the items are released during the
revisions of the same unit of item during the software software maintenance phase.
development process. For example, a System Software engineers use this version control
Requirement Specification (SRS) is produced after mechanism to track source code documentation and
tasking into account the user requirements which change other configuration items. In practice, many tools are

www.neerajbooks.com
with time into account. Once a SRS is finalized, available to store and number these configuration items
documented and approved it is given a document automatically. As software is developed and deployed,
number, with a unique identification number. The name it is common to expect that multiple versions of the same
of the items may follow a hierarchical pattern which software are deployed or maintained for version reasons.
may consist of the following: Many of these versions are used by developers to
1. Project identifier. privately work to update the software.
2. Configuration item (or simply item, e.g., SRS, The project database maintains all copies of the
programs data model). different versions of the software and other items. It is
3. Change number or version number. quite possible that without each other’s knowledge, two
The identification of the configuration item must developers may copy the same version of the item to
their private area and start working on it. Updating to
be able to provide the relationship between items
the central project database after completing changes
whenever such relationship exists.
will lead to overwriting of each other’s work. Most
The identification process should be such that is version control systems provide a solution to this kind
uniquely identifies the configuration item throughout of problem by locking the version for further
the development life cycle, such that all changes are modification.
traceable to the previous configuration. An evolu-tionary Commercial tools are available for version control
graph graphically reflects the history of all such changes. which performs one or more of following tasks:
The aim of these is to facilities the return to any previous 1. Source code control
state of configuration item in case of any unresolved 2. Revision control
issue in the current unapproved version. 3. Concurrent version control.

www.neerajbooks.com
www.neerajbooks.com

There are many commercial tools like Rational the file is locked for further modifications by any other
Clear case, Microsoft Visual Source Safe an a number developer. Other developers can check out the file for
of other commercial tools to help version control. read only purpose.
Managing change is an important part of Now, the following lines are added to the file
computing. The programmer fixes bugs while producing welcome.html.
a new version based on the feedback of the user. System <hr>
administrator manages versions change like porting a href= mailto: webfile@abc.com> webfile</a>
database, migrating to a new platform and application <hr>
environment without interrupting the day- to-day The revised version of the file welcome.html
operations. Revisions to documents are carried out while become
improving application. <html>
Q. 6. With the help of an example explain version <head>
control and its effects? <Title> A simple HTML Page </title>
Ans. Let us consider the following simple HTML <head>
file in a web based application (welcome. htm) <body>
<html> <h1> Welcome to HTML Concepts</a>
<(head) <hr>
<Title> A simple HTML Page </title> a href = mail to: webmaster@ xyz.com>
</head> webmaster</a>

Neeraj
<body> <hr>
<h1> Welcome to HTML Concepts</h1> </body>
</body> </html >
</html> Then the developer check in revised version of the
Once the code is tested and finalized the first step file to the project data with a new version (revision)

Publications
is to register the program to he project database. The number version 1.1 i.e., the first revision with the details
revision is numbered and this file is marked read only of the modification done.
to prevent any further undesirable changes. This forms Suppose another modification is done by adding a
the building block of source control. Each time the file graphic to the html file welcome.html. This becomes
is modified, a new version is created and a new revision version 1.2. the version tree after two modifications

www.neerajbooks.com
number is given. looks as shown below:
The first version of the file is numbered as version
1.0 Any further modification is possible only in the
developer’s private area by copying the file from the
project database. The process of copying the Suppose further modification is required for text
configuration object (the baseline version) is called based browser as graphic will not be supported by text
checkout. based browser. Then the version 1.1 will be selected
from the project database. This shows the necessity of
storing all versions of the file in the project database.
Q. 7. What are the benefits of Control
Management?
The version (revision) control process starts with Ans. The existence of a formal process of change
registering the initial versions of the file. This essentially management helps the developer to identify the
enforces a check on the changes which ensure that the responsibility of code for which a developer is
file can be changed unless it is checked out from the responsible. An idea is achieved about the changes that
project database. affect the main product. The existence of such
When a change is required to be made, allowing an mechanism provides a road map to the development
e-mail address to be added to the above html file, the process and encourages the developers to be more
developer will extract the lastest version of the file involved in their work.
welocome.html from the project database. Once it is Version control mechanism helps the software tester
check out from the project database for modification, to rack the previous version of the product. There by

www.neerajbooks.com
www.neerajbooks.com

giving emphasis on testing of the changes made since Given this perspective, it is apparent that the product
the last approved changes. It helps the developer and delivered to the customer at the end of the development
tester to simultaneously work on multiple versions of cycle is only the initial version of the system. Some
the same product and still avoid any conflict overlapping authors have suggested that the appropriate life-cycle
of activity. model for software is developement evolution
The software change management process is used evolution evolution.......
This perspective makes it clear that the primary
by the managers to keep a control on the changes to the
goal of software develpoment should be production of
product there by tracking and monitoring every change.
maintainable software systems. Maintability, like all
The existence of a formal process resources the high-level quality attributes, can be expressed in terms
management. It provides a professional approach to of attributes that are built into the product. The primary
control software changes. It also provides confidence product attributes that contribute to software
to the customer regarding the quality of the product. maintainability are clarity, modularity, and good internal
Q. 8. Define Software Maintenance? Is it true documentation of the source code, as well as appropriate
that software maintenance accounts to 40% to supporting documents.
70 % to the total cost of a Software Life Cycle? If Software maintenance is a microcosm of the
yes, why is it so? software development cycle. Enhancemnent and
Ans. Software Maintenance: The term “software adaption of software problem may reinitiate the
maintenance” is used to describe the software development cycle in the analysis phase, the design
engineering activities that occur following delivery of phase, or the implemention phase. Thus, all of the tools

Neeraj
a software product to the customer. The maintenance and techniques used to develop software are potentially
phase of the software life-cycle is the time period in useful for software maintenance.
which a software product performs useful work. Q. 9. What is software maintainability?
Maintenance activities involve making enhance- Ans. Software maintenance-more effort than any
ments to software products, adapting products to new other software engineering activity. Maintainability is
environments, and correcting problem. Software product the ease with which a program can be corrected if an

Publications
enhancement may involve providing new functional error occur adapted if its environment changes, or
capabilities. Improving user displays and modes of enhanced if the customer wants a change in
interaction, upgrading extermal documents and internal requirements. There is no way to measure maintability
documentation, or upgrading the performance directly; therefore, indirect measures are used. A simple
time-oriented metric is meantime-to-change (MTTC),

www.neerajbooks.com
characteristics of a system. Adaptation of software to a
new environment may involve moving the software to the time it takes to analyze the change request, design
a different machine, or for instance, modifying the an appropriate modification, implement the change, test
software to accomodate a new telecommunications it, and distribute the change to all users. Programs that
protocol or an additional disk drive. Problem correction are maintainable have a lower MTTC than programs
involves modification and revalidation of software to that are not maintainable.
correct errors. Some errors require immediate attention, Q. 10. What are the different types of changes
some can be corrected on a sheduled, periodic basis, of software maintenance?
and other are known but never corrected. Ans. The maintencance phase focuses on change
It is well established that maintenance activities that is associated with error correction, software’s
consume a large portion of the total life-cycle budget. environment and enhancements due to changing
It is not uncommon for software maintenance to account customer requirements. The maintenance phase
for 70 per cent of total software life-cycle costs (with reapplies the definition and development phases, but in
development requiring 30 per cent). As a general rule the context of existing software one comes across four
of thumb, the distribution of effort for software types of change during the maintenance phase.
maintnance include 60 per cent of the maintenance Correction: Even with the best quality assurance
budget for enhancement, and 20 per cent each for activities, customer may uncover defects in the software.
adaptation and correction. Corrective maintenance corrects defects in the software.
If maintenance consumes 70 per cent of the total Adaptiaticon: Many times the original
life-cycle effort devoted to a particular software product, environment (e.g., CPU, operating system, business
and if 60 per cent of maintenance goes to enhancing the rules, external product characteristics) of software may
product, then 42 per cent of the total life-cycle effort change. Adaptive maintenance modifies the software
for that product is dedicated to product enhancement. to allow changes in external environment.

www.neerajbooks.com
www.neerajbooks.com

Ehancement: As software is used, the customer/ (vi) a procedure to assure compliance with software
user may desire more functions that will be beneficial. development standards (when applicable), and
Perfective maintenance extends the software beyond its (vi) measurement and reporting mechanisms.
original functional requirements. Quality Assurance: Quality assurance consists of
Prevention: Computer software deteriorates due
the auditing and reporting functions of management. Its
to change, and so preventive maintenance, called
software reengineering, is conducted to enable the goal is to assume management with the data necessary
software to serve the needs of its end users. Basically, to show that product quality is meeting its goals. If the
preventive maintenance makes changes to computer data provided through quality assurance identify
programs so that they can be more easily corrected, problems management should take necessary action to
adapted and enhanced. resolve quality issues.
Q. 11. Elaborate the statement “Software Q. 13. Define the terms quality of design and
maintenance is far more than fixing errors”? quality of conference?
Ans. All software work is marked by changes in its Ans. A dictionary defines quality as “a characteristic
various phases. Change is inevitable when computer- or attribute of something.” As an attribute of an item
based systems are built; therefore, we need mechanisms quality refers to measurable characteristics—things we
for evaluating, controlling and making modifications. are able to compare to known standards such as length,
Software maintenance is far more than “fixing colour, electrical properties, malleability and so on.
mistakes.” Maintenance means four activities that are
However, software, largely an intellectual entity, is more
undertaken after a program is realeased for use:

Neeraj
corrective maintenance challenging to characterize than physical objects.
adaptive maintenance However, measures of a program’s characteristics
perfective maintenance or enahancement do exist. These properties include cyclomatic
preventive maintenance or reengineering. complexity, cohesion, number of function points, lines
Only about 20 per cent of all maintenance work is of code and many others. There are two kinds of quality
spent on “fixing mistakes.” The remaining 80 per cent

Publications
encountered: quality of design and quality of
is spent adapting existing systems to changes in their conformance.
external environment, making enhancements requested 1. Quality of design refers to the characteristics that
by customers and reengineering some application for
designers specify for an item. The grade of materials,
future use. When maintenance is considered in the light
tolerances, and performance specifications all contribute

www.neerajbooks.com
of these activities, one can see why it absorbs so much
effort. to the quality of design. As higher-graded materials are
Q. 12. What is software quality and software used and tighter tolerances and greater levels of
quality assurance? performance are specified, the design quality or a
Ans. The quality is defined as “a characteristic or product increases, if the product is manufactured
attribute of something.” Software quality, refers to according to specifications.
software attributes like complying, design etc. Some 2. Quality of conformance is the degree to which
software developers believe the software quality is the design specifications are followed during
something to worry about after cod has been generated. manufacturing. Again, the greater the degree of
This is a false notion. conformance, the higher the level of quality of
Software Quality Assurance (SQA) is an umbrella conformance.
activity that is applied throughout the software process. In software development, quality of design covers
SQA covers requirements, specifications and the design of the
(i) a quality management approach, system. Quality of conformance focuses primarily on
(ii) effective software engineering technology implementation. If the implementation follows the
(methods and tools), design and the resulting system meets its requirements
(iii) formal technical reviews that are applied and performance goals, conformance quality is high.
throughout the software process, Q. 14. Mention the criteria applied to determine
(iv) a multitiered testing strategy, quality of a software product?
(v) control of software documentation and the Ans. There are many definitions of software quality,
changes made to it, but a practical one is as below:

www.neerajbooks.com
www.neerajbooks.com

Conformance to explicitly stated functional and 6. Feasibility: The degree to which the
performance requirements, explicitly documented requirements, design, or plans for a system or component
development standards and implicit characteristics that can be implemented under existing constraints.
are expected of all professionally developed software. 7. Modularity: The degree to which a system or
This definition can also be modified or extended. computer program is composed of discrete components
If fact, a definitive definition of software quality could such that a change to one component has minimal impact
be debated forever. However, the above definition serves
on other components.
to emphasize three important points:
8. Predictability: The degree to which the
(i) Software requirements are the foundation from
which quality is measured. Lack of conformance functionality and performance of the software are
to requirements is lack of quality. determinable for a specified set of inputs.
(ii) Specified standards define a set of development 9. Robustness: The degree to which a system or
criteria that guide the ways in which software is component can function correctly in the presence of
engineered. If the criteria are not followed, it invalid inputs or stressful environmental conditions.
will result in lack of quality. 10. Structured: The degree to which the SDD
(iii) There is a set of implicit requirements that often (System Design Document) and code possess a definite
goes un-mentioned (e.g., the desire for good pattern in their interdependent parts. This implies that
maintainability). If software conforms to its the design has proceeded in an orderly and systematic
explicit requirements, but fails to meet implicit manner (e.g. top-down, bottom-up). The modules are
requirements, software quality is in doubt.

Neeraj
cohesive and the software has minimized coupling
Q. 15. What are the attributes of quality? between modules.
Ans. The following are some of the attributes of 11. Testability: The degree to which a system or
quality: component facilitates the establishment of test criteria
1. Ability to be Audited: The ability of the software and the performance of tests to determine whether those
being tested against conformance to standard. criteria have been met.

Publications
2. Compatibility: The ability of two or more
12. Traceability: The degree to which a
systems or components to perform their required
relationship can be established between two or more
functions while sharing the same hardware or software
products of the development process. The degree to
environment.
which each element in a software development product
3. Completeness: The degree to which all the

www.neerajbooks.com
establishes its reason for existing (e.g., the degree to
software’s required functions and design constraints are
which each element in a bubble chart references the
present and fully developed in the requirements
specification, design document and code. requirement that it satisfies). For example, the system’s
4. Consistency: The degree of uniformity, functionality must be traceable to user requirements.
standardization and freedom from contradiction among 13. Understandability: The degree to which the
the documents or parts of a system or component. meaning of the SRS, SDD and code are clear and
5. Correctness: The degree to which a system or understandable to the reader.
component is free from faults in its specification, design 14. Verifiability: The degree to which the SRS,
and implementation. The degree to which software SDD and code have been written to facilitate verification
documentation or other items meet specified requirements. and testing.

www.neerajbooks.com

You might also like