0% found this document useful (0 votes)
7 views67 pages

Unit 3 Software engineering

This document covers various aspects of software design, including concepts, architectural and procedural design, modularization, and design metrics. It emphasizes the importance of correctness, completeness, efficiency, and maintainability in software design, and discusses techniques such as function-oriented and object-oriented design. Additionally, it introduces key measurement metrics like Halstead's Software Science and Cyclomatic Complexity to assess software quality and complexity.

Uploaded by

aviral830351
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views67 pages

Unit 3 Software engineering

This document covers various aspects of software design, including concepts, architectural and procedural design, modularization, and design metrics. It emphasizes the importance of correctness, completeness, efficiency, and maintainability in software design, and discusses techniques such as function-oriented and object-oriented design. Additionally, it introduces key measurement metrics like Halstead's Software Science and Cyclomatic Complexity to assess software quality and complexity.

Uploaded by

aviral830351
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 67

SOFTWARE ENGINEERING

UNIT-3
Topics to be
covered...
Concept of Software Design
Architectural and Procedural Design
Modularization
Design Structure Charts
Pseudo Codes
Coupling and Cohesion Measures
Function Oriented Design
Object Oriented Design
Top-Down and Bottom-Up Design
Measurement and Metrics
Halestead’s Software Science
Function Point (FP) Based Measures
Cyclomatic Complexity Measures
Happy Ending!
Concept of
Software Design
Concept of Software
Design
Software design is a mechanism to transform user requirements into some suitable
form, which helps the programmer in software coding and implementation.
It allows the software engineer to create the model of the software that is to be
developed.
The software design phase is the first step in SDLC (Software Design Life
Cycle), which moves the concentration from the problem domain to the
solution domain.
General task involved in design process:
1. Design the overall the system processes.
2. Segmenting the system into smaller
modules. 3. Designing the database
structure.
4. Documenting the system design.
Concept of Software
Design
Objectives:
1. Correctness: Software design should be correct as per requirement. It
should correctly implement all the functionalities of the system.
2. Completeness: The design should have all components like data
structures, modules, and external interfaces, etc.
3. Efficiency: Resources should be used efficiently by
the program. 4. Flexibility: Able to modify on changing
needs.
5. Consistency: There should not be any inconsistency in the design.
6. Maintainability: The design should be so simple so that it can be easily
maintainable by other designers.
Concepts of Software Design:
The software design concept simply means the idea or principle behind the design.
It describes how you plan to solve the problem of designing software, the logic, or
thinking behind how you will design software. It allows the software engineer to
create the model of the system or software or product that is to be developed or
built.
Architectural and
Procedural Design
Architectural
Design
The process of defining a collection of hardware and software components
and their interfaces to establish the framework for the development of a
computer system.
The output of this design process is a description of the software
architecture. Architectural design is an early stage of the system
design process.
It represents the link between specification and design processes and is often
carried out in parallel with some specification activities.

A set of components(eg: a database,


computational modules) that will perform a
function required by the system.
The set of connectors will help in
coordination, communication, and
cooperation between the components.
Conditions that how components can be
integrated to form the system.
Design
Architectural

Data Centered Architecture:


Data Centered Architecture is a layered process which provides architectural
guidelines in data center development.
Data Centered Architecture is also known as Database Centric Architecture.
This architecture is the physical and logical layout of the resources and
equipment within a data center facility.
Architectural Design

Data flow architectures:


This kind of architecture is used when input data to be transformed into
output data through a series of computational manipulative components.
The figure represents pipe-and-filter architecture since it uses both pipe and
filter and it has a set of components called filters connected by pipes.
Pipes are used to transmit data from one component to the next.
Procedural
Design
Procedural design used to model programs that have an obvious flow of data
from input to output.
It represents the architecture of a program as a set of interacting processes
that pass data from one to another.
Procedural design is also called components design. It is completely based on
process and control specification.
The "state transition diagram" of the requirement analysis model is
also used in components design.
Components design is usually done after user interface design.
Modularization
Modularization
Modularity in design refers to the splitting of a large software system
into smaller connected modules.
Modules are interconnected through their interfaces.
The interconnection should be simple to avoid costly maintenance.
Two modules are directly connected if one module can call the other module.

Modularity has several key benefits:


Testing & Debugging Since each component is self-contained, you mitigate
dependency issues. It becomes easy to test each component in isolation by
using a mocking or isolation framework.
Reusability If you discover you need the same functionality in a new
project, you can package the existing functionality into something reusable
by multiple projects without copying and pasting the code.
Extensibility Your software now runs as a set of independent components
connected by an abstraction layer.
Advantage of
modularization
Smaller components are easier to maintain
Program can be divided based on functional
aspects
Easier because programmer only focus on one small simple problem rather
than a large complex problem.
Testing and Debugging easier.
Easy to isolate bugs and easy to fix bugs.
Design Structure
Charts
Design Structure
Charts
A Structure Chart (SC) in software engineering and organizational theory is a
chart which shows the breakdown of a system to its lowest manageable
levels.

They are used in structured programming to arrange program modules into


a tree. Each module is represented by a box, which contains the module's
name.

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 Cohesion
Coupling is also called Inter-Module Cohesion is also called Intra-Module
Binding. Binding.
Coupling shows the relationships Cohesion shows the relationship within
between modules. 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.

Need of Software Measurement:


Software is measured to:
Create the quality of the current product or
process. Anticipate future qualities of the
product or process. Enhance the quality of a
product or process.
Regulate the state of the project in relation to budget and schedule.
Metrics
A metric is a measurement of the level that any impute belongs to a
system product or process.

There are 4 functions related to software


metrics: 1. Planning
2.
Organizing
3.
Controlling
4.
Improving
Metrics
Classification of Software
Metrics: There are 3 types of
software metrics: Product
Metrics:
Product metrics are used to evaluate the state of the product, tracing risks and
undercovering prospective problem areas. The ability of team to control quality is
evaluated.

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 cost which is the
most important potential use of function point data.

Function point may be used to compute the following importance metrics:


Productivity = FP/persons-
months Quality = Defects/FP
Cost = Rupees/FP

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 of transaction functions.
External Inputs
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

Disadvantages:
Manually Counting
Process Difficult to
Understand
Requires Experience
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.

How to Calculate Cyclomatic Complexity?


McCabe proposed the cyclomatic number, V (G) of graph theory as an indicator of
software complexity. The cyclomatic number is equal to the number of linearly
independent paths through a program in its graphs representation. For a program
control graph G, cyclomatic number, V (G), is given as:
V (G) = E - N + 2 * P
E = The number of edges in
graphs G N = The number of
nodes in graphs G
P = The number of connected components in graph G.
Cyclomatic Complexity Measures
Cyclomatic Complexity Measures
Advantages:
Gives complexity of various
designs Computed early in life
cycle
Easy to apply
Measures minimum effort

Disadvantages:
Measures program’s control complexity and not the data
complexity Nested conditional structures are harder to
understand
Ignore the size of the program

You might also like