UNIT-II Update
UNIT-II Update
Software Analysis
and Design
Design Process
Data-Flow Diagrams
Primitive Symbols of DFD ,Develop DFD Model of System Shortcoming of
DFD Model
Scenario-Based Modelling
Goals of implementation
Functional requirements:-
The functional requirements part discusses the
functionalities required from the system.
The system is considered to perform a set of
high-level functions {fi}.
Continue…
Each function fi of the system can be considered as a
transformation of a set of input data (i) to the
corresponding set of output data (o). The user can get
some meaningful piece of work done using a high-
level function
Nonfunctional
requirements
Nonfunctional requirements deal with the
characteristics of the system which can not be
expressed as functions - such as the
maintainability of the system, portability of the
system, usability of the system, etc.
accuracy of results,
Type of software
Software development environment
User requirements
Qualification of development team
Available software and hardware resources.
There are many methodologies for software
Structured
Analysis (DFD
Structure Class Diagram and
Diagram) d Design UML Diagrams
Characteristics of a good software
design
The definition of “a good software design”
understandability of a design.
A design that is easy to understand is also
Low high
Fig. - Classification of
Cohesion
Continue…
Coincidental cohesion: A module is said to
have coincidental cohesion, if it performs a set of
tasks that relate to each other very loosely.
Logical cohesion: A module is said to be
logically cohesive, if all elements of the module
perform similar operations.
Temporal cohesion: when all functions of
module execute in same time span than we can
say module contain temporal cohesion
Procedural cohesion: when set of functions of
the module are all part of a same procedure
(algorithm) than we can say module contain
Procedural cohesion
Continue…
Communicational cohesion: A module is said to
have communicational cohesion, if all functions of the
module refer to or update the same data structure,
e.g. the set of functions defined on an array or a
stack.
Sequential cohesion: if the elements of a module
form the parts of sequence, where the output from
one element of the sequence is input to the next than
we can say module contain Sequential cohesion
Functional cohesion: Functional cohesion is said to
exist, if different elements of a module achieve a
single function.
Classification of Coupling
Coupling between two modules is a measure of the
degree of interdependence or interaction between the
two modules.
A module having high cohesion and low coupling is
said to be functionally independent of other modules.
If two modules interchange large amounts of data,
then they are highly interdependent.
The degree of coupling between two modules depends
on their interface complexity.
The interface complexity is basically determined by
the number of types of parameters that are
interchanged while invoking the functions of the
module.
Continue…
The different classes of Coupling that can
exist between module are shown in the
following fig.
Fig. - Classification of
coupling
Continue…
Data coupling: Two modules are data coupled, if
they communicate through a parameter. An example
is an elementary data item passed as a parameter
between two modules, e.g. an integer, a float, a
character, etc.
Stamp coupling: Two modules are stamp coupled, if
they communicate using a composite data item such
as a record in PASCAL or a structure in C.
Control coupling: Control coupling exists between
two modules, if data from one module is used to direct
the order of instructions execution in another. An
example of control coupling is a flag set in one module
and tested in another module.
Continue…
Common coupling: Two modules are common
coupled, if they share data through some global data
items.
representation of data.
Data modeling or ER diagram gives the
Student
Student
Roll_nu branch
name
mber
Relationship of entities.
Enrolled
Student to Department
learnin has
g
subjects
HOD
Cardinality
STUDENTS SUBJECTS
have
Data Flow Diagram (DFD)
The DFD (also known as a bubble chart) is a
hierarchical graphical model of a system that
shows the different processing activities or
functions that the system performs and the data
interchange among these functions.
Each function is considered as a processing
station (or process) that consumes some input
data and produces some output data.
The system is represented in terms of the input
data to the system, various processing carried
out on these data, and the output data
generated by the system.
Symbols used for designing
DFDs
Main five symbols used for constructing
DFDs are:
Function symbol
External Entity Symbol
Data Flow Symbol
Data Store Symbol
Output Symbol
Continue…
Continue…
Function symbol is used to represent a function. This
symbol is called a process or bubble. These bubbles are
annotated with the corresponding function names.
External Entity Symbol is used for representing those
physical agents that are external to the software system.
These agents interact with the software by providing or
consuming data with the software system.
Data Flow symbol shows the data flow between processes
or physical agents and processes. The direction of data flow
is given by the arrow and is usually labeled with
corresponding data name.
Data Store symbol represents a data structure or a logical
file or a physical file on disk and will be connected to
processes using data flow symbols.
Output symbol is for representing output data produced by
the software.
DFD Guidline
The complete DFD of a system is not constructed in a
single step. Rather, first an abstract DFD is constructed
and is refined in further stages to obtain a detailed DFD.
Construction of a DFD starts with the most abstract
definition of the system.
This abstract representation is called a Context Diagram
or Level 0 DFD. In the Context Diagram the entire
software is represented as a single bubble. The data
inputs and outputs of the system is represented as a
single bubble.
The data inputs and outputs of the system is
represented as incoming and outgoing arrows.
In the Context Diagram the external entities with which
the system interacts are identified and the data
interchange occurring between the system and these
external entities are represented.
Continue…
Numbering of Bubbles:-
It is necessary to number the different bubbles
occurring in the DFD. These numbers help in
uniquely identifying any bubble in the DFD by its
bubble number.
The bubble at the context level is usually
assigned the number 0 to indicate that it is the 0
level DFD. Bubbles at level 1 are numbered, 0.1,
0.2, 0.3, etc, etc.
When a bubble numbered x is decomposed, its
children bubble are numbered x.1, x.2, x.3, etc.
Commonly made errors while constructing
a DFD model
Many beginners commit the mistake of drawing more
than one bubble in the context diagram. A context
diagram should depict the system as a single bubble.
Many beginners have external entities appearing at all
levels of DFDs. All external entities interacting with
the system should be represented only in the context
diagram. The external entities should not appear at
other levels of the DFD.
It is a common oversight to have either too less or too
many bubbles in a DFD. Only 3 to 7 bubbles per
diagram should be allowed, i.e. Each bubble should be
decomposed to between 3 and 7 bubbles.
Many beginners leave different levels of DFD
unbalanced.
Continue…
A common mistake committed by many
beginners while developing a DFD model is
attempting to represent control information in a
DFD. It is important to realize that a DFD is the
data flow representation of a system, and it does
not represent control information.
CONTEXT LEVEL DIAGRAM
UML(Unified modeling language)
UML is a modeling language.
Standard language for specifying, visualizing,
constructing, and documenting the software
systems.
The UML uses mostly graphical notations to
express the design of software projects.
It provides a set of notations (e.g. rectangles,
lines, ellipses, etc.) to create a visual model of
the system.
UML Particularly useful for OO design.
UML is Independent of implementation language
UML Diagrams
UML can be used to construct nine different
types of diagrams to capture five different
views of a system.
The UML diagrams can capture the following
with it.
Actors are represented by using the stick person icon.
system.
Actors are connected to use cases by drawing a
72