Unit 3 Software Engineering
Unit 3 Software Engineering
The tree shows the relationship between modules, showing data transfer
between the models. Data being passed from module to module that needs
to be processed.
Structure chart is a chart derived from a Data Flow Diagram. It represents the
system in more detail than DFD. It breaks down the entire system into lowest
functional modules, describes functions and sub-functions of each module of the
system to a greater detail than DFD.
Design Structure
Charts
Pseudo
Codes
Pseudo Codes
Pseudo code uses the vocabulary of one language i.e, English and syntax of
another i.e, any structured programming language.
Pseudo code is a combination of algorithm written in a simple language and
programming language statements.
Using Pseudo code, the designer design describes system characteristics
structured by keywords such as IF-THEN-ELSE, while-do and end.
Advantages of Pseudo
Codes
Converting a Pseudo code to a programming language is much easier as
compared to converting to flowchart or decision table.
It is easier to modify whenever programmer modification are
necessary. Take less time to writing as compared to drawing
flow chart.
Done easily on Word Processor
Coupling
and Cohesion
Measures
Coupling
The coupling is the degree of interdependence between software modules. Two
modules that are tightly coupled are strongly dependent on each other. However,
two modules that are loosely coupled are not dependent on each other. Uncoupled
modules have no interdependence at all within them.
A good design is the one that has low coupling. Coupling is measured by the
number of relations between the modules. That is, the coupling increases as the
number of calls between modules increase. Thus, it can be said that a design with
high coupling will have more errors.
Coupling
Types of Module Coupling:
Coupling
Data Coupling:
When data of one module is passed to another module, this is called
data coupling.
Stamp Coupling:
Two modules are stamp coupled if they communicate using composite data
items such as structure, objects, etc.
When the module passes entire structure to another module, they are said to be
stamp coupled. For example, passing structure variable in C or object in C++
language to a module.
Coupling
Control Coupling:
Control Coupling exists among two modules if data from one module is used to
direct the structure of instruction execution in another.
External Coupling:
External Coupling arises when two modules share an externally imposed data
format, communication protocols, or device interface. This is related to
communication to external tools and devices.
Common Coupling:
Two modules are common coupled if they share information through some global
data items.
Cohesion
Cohesion shows the relationship within the module.
Cohesion is an ordinal type of measurement and is generally described as "high
cohesion" or "low cohesion."
Types of
Cohesion
Cohesion
1.Functional Cohesion: Functional Cohesion is said to exist if the different
elements of a module, cooperate to achieve a single function.
2.Sequential Cohesion: If the element of a module form the components of
the sequence, where the output from one component of the sequence is
input to the next.
3.Communicational Cohesion: If all tasks of the module refer to or update
the same data structure, e.g., the set of functions defined on an array or
a stack.
4.Procedural Cohesion: If the set of purpose of the module are all parts of a
procedure in which particular sequence of steps has to be carried out for
achieving a goal, e.g., the algorithm for decoding a message.
5.Temporal Cohesion: When a module includes functions that are associated by
the fact that all the methods must be executed in the same time.
6.Logical Cohesion: If all the elements of the module perform a similar operation.
For example Error handling, data input and data output, etc.
7.Coincidental Cohesion: If it performs a set of tasks that are associated with
each other very loosely, if at all.
Coupling Cohesio
Coupling is also called Inter-
Module Binding.
n
Cohesion is also called Intra-
Module Binding.
Coupling shows the relationships Cohesion shows the relationship
between modules. within the module.
In coupling, modules are linked to the In cohesion, the module focuses on a
other modules. single thing.
Function
Oriented
Design
Function Oriented
Design
Function Oriented Design is an approach to software design where the design
is decomposed into a set of interacting units where each unit has a clearly
defined function.
Function Oriented Design
Techniques used by Function Oriented Design are:
Data Flow Diagram(A data flow diagram (DFD) maps out the flow of
information for any process or system. )
Data Dictionaries(Data dictionaries are simply repositories to store information
about all data items defined in DFDs. At the requirement stage, data dictionaries
contain data items.) Structure Charts(Components are read from top to bottom
and left to right. When a module calls another, it views the called module as
black box, passing required parameters and receiving results)
Pseudo Codes(It uses keywords and indentation. Pseudo codes are used as
replacement for flow charts. It decreases the amount of documentation
required.)
Object
Oriented
Design
Object Oriented
Design
Object-oriented design is the process of planning a system of interacting
objects for the purpose of solving a software problem. It is one approach to
software design.
In the object-oriented design method, the system is viewed as a collection of
objects (i.e., entities).
Top-Down
and Bottom-
Up Design
Top-Down and Bottom-Up Design
Measurement
and
Metrics
Measurement
A software metric is a measure of software characteristics which are
measurable or countable. Software metrics are valuable for many reasons,
including measuring software performance, planning work items, measuring
productivity, and many other uses.
Within the software development process, many metrics are that are all
connected. Software metrics are similar to the four functions of management:
Planning, Organization, Control, or Improvement.
Process Metrics:
• Process metrics pay particular attention on enhancing the long term process of the
team or organization.
Project Metrics:
• The project matrix describes the project characteristic and execution
process. Number of software developer
• Staffing pattern over the life cycle of
software Cost and schedule
• Productivity
Halestead’s
Software
Science
Halestead’s Software
Science
Measurement
Advantages:
Predicts error rate.
Predicts maintenance
effort Simple to
calculate Measure
overall quality Used for
any language
Disadvantages:
Depends on complete
code
Complexity increases as program level
decreases Difficult to compute
Function Point
(FP) Based
Measures
Function Point (FP) Based
Measures
Function point is used in the estimation of software development
is the most important potential use of function point data.
cost which
Organizations that use function point method develop criteria for determining
whether a particular entry is low, average or high.
Function Point (FP) Based
Measures
There are three types
External Inputs
of transaction functions.
External
Outputs
External
Inquiries
Advantages:
Size oriented
metrics Language
dependent
Understood by the
non technical user
To estimate cost
and resources
required for
software
development
Function Point (FP) Based
Measures
Cyclomatic
Complexity
Measures
Cyclomatic Complexity Measures
Cyclomatic complexity is a software metric used to measure the complexity of a
program. It gives the quantitative measure of logical complexity of the program.
Disadvantages:
Measures program’s control complexity and not the data
complexity Nested conditional structures are harder to
understand
Ignore the size of the program