SlideShare a Scribd company logo
1 of 26
Download to read offline
Software Design
Goutam Majumder
National Institute of Technology Mizoram
Asst. Professor
Department of CSE
goutam.nita@gmail.com
March 23, 2017
Goutam Majumder (NITMZ) SD March 23, 2017 1 / 26
Overview
1 Introduction to software design
2 Outcome of a Design Process
Classification of Design Activities
Classification of Design Methodologies
Analysis vs Design
3 Goodness of a design
4 Functional Independence
5 Cohesion and Coupling
Classification of cohesiveness
Classification of Coupling
6 Function-oriented design vs. Object-oriented design
Goutam Majumder (NITMZ) SD March 23, 2017 2 / 26
Introduction
Design phase transforms SRS document:
To a form easily implementable in some programming language
Figure: Software Design Process
Goutam Majumder (NITMZ) SD March 23, 2017 3 / 26
Outcome of a Design Process
Different Modules Required: Different modules must be clearly iden-
tified and documented. Modules name must be given as their task (e.g.
handle registration task)
Control Relationship among Modules:It is arise due to function call
between the modules. It must be identified and documented
Interface among different modules: It identifies the exact data items
exchanged between the module.
Data structure of the individual modules: Each module store some
data that the function of the module need to share to accomplish the
overall responsibility.
Algorithm required to implement the individual modules: Each
function in a module do some specific task. Required algorithm must
be clearly designed and documented with due consideration to the ac-
curacy of the result, space and time.
Goutam Majumder (NITMZ) SD March 23, 2017 4 / 26
Classification of Design Activities
A good software design is a single step procedure but rather by iterating
over a series of design activities. Activities are classify into two stages:
High Level Design
A problem is decomposed into set of modules, the control relationship
among various modules identified, and also the interfaces among various
modules are identified.
Detailed Design
Each module is examined carefully to design its data structures and the
algorithms.
Outcome of detailed design is Module specification (MSPEC)
document
Goutam Majumder (NITMZ) SD March 23, 2017 5 / 26
High Level Design
It identifying the followings:
Modules; Control relationships among modules; Interfaces among
modules.
Several notations are available to represent high-level design:
Usually a tree-like diagram called structure chart is used.
Other notations: Jackson diagram or Warnier-Orr diagram can also be
used.
The outcome of high-level design: Program structure (or software
architecture).
Figure: High Level Design
Goutam Majumder (NITMZ) SD March 23, 2017 6 / 26
Outcome of a Design Process
Classification of Design Methodologies
It is roughly classify these methodologies into two:
procedural
object-oriented
Does a design technique ensure a unique solution?
Designer must employ many design technique (candidate). Among them
designer must choose superior one
Analysis vs Design
An analysis technique helps elaborate the customer requirements through
careful thinking–at the same time consciously avoids making any decisions
regarding implementation.
In function oriented: analysis (DFD) and design (structure chart)
In object-oriented: UML for analysis and design
Goutam Majumder (NITMZ) SD March 23, 2017 7 / 26
Goodness of a design
It can vary depending on the exact application being designed. For example
memory issue for embedded software. Characteristics for good software
design for general application have the following:
Should implement all functionalities of the system correctly.
Should be easily understandable.
Should be efficient.
Should be easily amenable to change (i.e. easily maintainable).
Understandability of a design is a major issue
To determines the goodness of design:
A design that is easy to understand and also easy to maintain and change.
Unless a design is easy to understand,
Tremendous effort needed to maintain it
We already know that about 60% effort is spent in maintenance
If the software is not easy to understand: Maintenance effort would
increase many times.
Goutam Majumder (NITMZ) SD March 23, 2017 8 / 26
Goodness of a design
Understandability of a design is a major issue
Use consistent and meaningful names: For various design components.
Should make use of abstraction and decomposition principles in ample
measure
How are Abstraction and Decomposition Principles Used in Design?
By two principal ways:
1 Modularity: It is a fundamental attributes of any good design.
Decomposition of a problem cleanly into modules
Modules are almost independent of each other
Divide and conquer principle
If modules are independent:
Modules can be understood separately,
Reduces the complexity greatly
2 Layered Design: It is one in which when the call relations among dif-
ferent modules are represented graphically
Goutam Majumder (NITMZ) SD March 23, 2017 9 / 26
Goodness of a design
Can we quantitatively measure the modularity of a design solution?
No other solution is available
No quantitative metrics available to directly measure the modularity
But we can quantitatively characterise the modularity of a design
solution
using cohesion and
coupling
A good design with high cohesion and low coupling among modules is
the effective problem decomposition
Goutam Majumder (NITMZ) SD March 23, 2017 10 / 26
Goodness of a design
Layered design
Figure: Two design solution
Goutam Majumder (NITMZ) SD March 23, 2017 11 / 26
Goodness of a design
Layered design
A module can invoke only module in the layer immediately below.
A layered design can be considered to be implementing control abstrac-
tion
It makes debugging easy. Since one would need to concentrate only on
a few modules to detect the error
It makes easy to understand how the lower layer module works
Superordinate and subordinate modules
Visibility
Depth and Width: It indicates number of layers and the overall span
of control respectively
Fan-out: it measures the number of modules that are directly controlled
by a given module. High fan-out numbers is not a good design
Fan-in: number of modules that directly invoke a given module
Goutam Majumder (NITMZ) SD March 23, 2017 12 / 26
Functional Independence
We mean that a module performs a single task and needs very little inter-
action with other modules.
Functional independence reduces error propagation
Degree of interaction between modules is low.
An error existing in one module does not directly affect other modules
Reuse of modules is possible : Can be easily taken out and reused in a
different program
Each module does some well-defined and precise function
The interfaces of a module with other modules is simple and minimal
Goutam Majumder (NITMZ) SD March 23, 2017 13 / 26
Cohesion and Coupling
Cohesion
When the functions of the module cooperate with each other for performing
a single objective, then the module has good cohesion.
Functional strength of a module.
A cohesive module performs a single task or function
Coupling
It is a measure of the degree of the interdependence between the two mod-
ules. Two modules are said to be highly coupled, if they are:
1 If the function call between two modules involve passing large chunks
of shared data, the modules are tightly coupled
2 If the interactions occur through some shared data, then also we say
that they are highly coupled
If two modules either do not interact with each other or interact by a few
primitive data items, they are said to have low coupling.
Goutam Majumder (NITMZ) SD March 23, 2017 14 / 26
Classification of Cohesiveness
Classification is often subjective:
Yet gives us some idea about cohesiveness of a module
By examining the type of cohesion exhibited by a module
We can roughly tell whether it displays high cohesion or low cohesion
Figure: Classification of Cohesion
Goutam Majumder (NITMZ) SD March 23, 2017 15 / 26
Classification of Cohesiveness
Coincidental Cohesion
The module performs a set of tasks: Which relate to each other very
loosely, if at all
The module contains a random collection of functions
Functions have been put in the module out of pure coincidence
without any thought or design
Logical Cohesion
All elements of the module perform similar operations: e.g. error handling,
data input, data output, etc.
An example of logical cohesion: A set of print functions to generate
an output report arranged into a single module
Goutam Majumder (NITMZ) SD March 23, 2017 16 / 26
Classification of Cohesiveness
Temporal Cohesion
The module contains tasks that are related by the fact: All the tasks must
be executed in the same time span. Example:
The set of functions responsible for initialization,
start-up, shut-down of some process, etc.
Procedural Cohesion
The set of functions of the module:
All part of a procedure (algorithm)
Certain sequence of steps have to be carried out in a certain order for
achieving an objective (e.g. the algorithm for decoding a message)
Communicational Cohesion
All functions of the module: Reference or update the same data structure
(e.g. The set of functions defined on an array or a stack)
Goutam Majumder (NITMZ) SD March 23, 2017 17 / 26
Classification of Cohesiveness
Sequential Cohesion
Elements of a module form different parts of a sequence
Output from one element of the sequence is input to the next
e.g. sort→search→display
Functional Cohesion
Different elements of a module cooperate:
To achieve a single function,
e.g. managing an employee’s pay-roll
When a module displays functional cohesion,
We can describe the function using a single sentence.
Goutam Majumder (NITMZ) SD March 23, 2017 18 / 26
Determining Cohesiveness
Write down a sentence to describe the function of the module
If the sentence is compound,
It has a sequential or communicational cohesion
If it has words like first, next, after, then, etc.
It has sequential or temporal cohesion
If it has words like initialize
It probably has temporal cohesion
Goutam Majumder (NITMZ) SD March 23, 2017 19 / 26
Classification of Coupling
Coupling indicates:
How closely two modules interact or how interdependent they are.
The degree of coupling between two modules depends on their
interface complexity.
There are no ways to precisely determine coupling between two
modules:
Classification of different types of coupling will help us to
approximately estimate the degree of coupling between two modules
Five types of coupling can exist between any two modules
Figure: Coupling Classes
Goutam Majumder (NITMZ) SD March 23, 2017 20 / 26
Classification of Coupling
Data Coupling
Two modules are data coupled - If they communicate via a parameter:
an elementary data item e.g an integer, a float, a character, etc.
The data item should be problem related: Not used for control purpose.
Stamp Coupling
Two modules are stamp coupled - If they communicate via a composite data
item - such as a record in PASCAL or a structure in C.
Control Coupling
Data from one module is used to direct the order of instruction
execution in another
e.g. A flag set in one module and tested in another module
Goutam Majumder (NITMZ) SD March 23, 2017 21 / 26
Classification of Coupling
Common Coupling
If module share some global data items
Content Coupling
Content coupling exists between two modules:
If they share code
e.g, branching from one module into another module
The degree of coupling increases
from data coupling to content coupling
Goutam Majumder (NITMZ) SD March 23, 2017 22 / 26
Design Approaches
Two fundamentally different software design approaches:
Function-oriented design
Object-oriented design
These two design approaches are radically different
However, are complementary – Rather than competing techniques.
Each technique is applicable at – Different stages of the design process
Function-oriented Design
A system is looked upon as something – That performs a set of
functions
Starting at this high-level view of the system:
Each function is successively refined into more detailed functions.
Functions are mapped to a module structure.
The function create-new-library- member
Creates the record for a new member
Assigns a unique membership number
Prints a bill towards the membership
Goutam Majumder (NITMZ) SD March 23, 2017 23 / 26
Design Approaches
Function Oriented Design
The system state is centralized:
Accessible to different functions
Member–records – Available for reference and updation to several
functions
Create-new-member
Delete-member
Update-member-record
Several function-oriented design approaches have been developed
Structured design (Constantine and Yourdon, 1979)
Jackson’s structured design (Jackson, 1975)
Warnier-Orr methodology
Wirth’s step-wise refinement
Hatley and Pirbhai’s Methodology
Goutam Majumder (NITMZ) SD March 23, 2017 24 / 26
Design Approaches
Object–Oriented Design
System is viewed as a collection of objects (i.e. entities).
System state is decentralized among the objects – Each object
manages its own state information
Library Automation Software:
Each library member is a separate object – With its own data and
functions
Functions defined for one object – Cannot directly refer to or change
data of other objects
Objects have their own internal data – Defines their state.
Similar objects constitute a class – Each object is a member of some
class.
Classes may inherit features – From a super class.
Conceptually, objects communicate by message passing.
Goutam Majumder (NITMZ) SD March 23, 2017 25 / 26
The End
Goutam Majumder (NITMZ) SD March 23, 2017 26 / 26

More Related Content

What's hot

software design principles
software design principlessoftware design principles
software design principlesCristal Ngo
 
Software design principles
Software design principlesSoftware design principles
Software design principlesRitesh Singh
 
07 software design
07   software design07   software design
07 software designkebsterz
 
Chapter 4 software design
Chapter 4  software designChapter 4  software design
Chapter 4 software designCliftone Mullah
 
SWE-401 - 6. Software Analysis and Design Tools
SWE-401 - 6. Software Analysis and Design ToolsSWE-401 - 6. Software Analysis and Design Tools
SWE-401 - 6. Software Analysis and Design Toolsghayour abbas
 
Distributed computing by Dr.C.R.Dhivyaa, Assistant Professor, Kongu Engineeri...
Distributed computing by Dr.C.R.Dhivyaa, Assistant Professor, Kongu Engineeri...Distributed computing by Dr.C.R.Dhivyaa, Assistant Professor, Kongu Engineeri...
Distributed computing by Dr.C.R.Dhivyaa, Assistant Professor, Kongu Engineeri...Dhivyaa C.R
 
Lakshmi varagand ramanandg_grishagarwal
Lakshmi varagand  ramanandg_grishagarwalLakshmi varagand  ramanandg_grishagarwal
Lakshmi varagand ramanandg_grishagarwalPMI2011
 
Identifying Thresholds for Distance Design-based Direct Class Cohesion (D3C2)...
Identifying Thresholds for Distance Design-based Direct Class Cohesion (D3C2)...Identifying Thresholds for Distance Design-based Direct Class Cohesion (D3C2)...
Identifying Thresholds for Distance Design-based Direct Class Cohesion (D3C2)...IJECEIAES
 

What's hot (20)

software design principles
software design principlessoftware design principles
software design principles
 
Design final
Design finalDesign final
Design final
 
Unit i software design principles 9
Unit i software design principles 9Unit i software design principles 9
Unit i software design principles 9
 
Software design
Software designSoftware design
Software design
 
Software design
Software designSoftware design
Software design
 
unit 3 Design 1
unit 3 Design 1unit 3 Design 1
unit 3 Design 1
 
Software design principles
Software design principlesSoftware design principles
Software design principles
 
07 software design
07   software design07   software design
07 software design
 
Software design
Software designSoftware design
Software design
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
 
Chapter 4 software design
Chapter 4  software designChapter 4  software design
Chapter 4 software design
 
Ey36927936
Ey36927936Ey36927936
Ey36927936
 
Software design
Software designSoftware design
Software design
 
Hld lld
Hld lldHld lld
Hld lld
 
SWE-401 - 6. Software Analysis and Design Tools
SWE-401 - 6. Software Analysis and Design ToolsSWE-401 - 6. Software Analysis and Design Tools
SWE-401 - 6. Software Analysis and Design Tools
 
5 software design
5 software design5 software design
5 software design
 
Distributed computing by Dr.C.R.Dhivyaa, Assistant Professor, Kongu Engineeri...
Distributed computing by Dr.C.R.Dhivyaa, Assistant Professor, Kongu Engineeri...Distributed computing by Dr.C.R.Dhivyaa, Assistant Professor, Kongu Engineeri...
Distributed computing by Dr.C.R.Dhivyaa, Assistant Professor, Kongu Engineeri...
 
Lakshmi varagand ramanandg_grishagarwal
Lakshmi varagand  ramanandg_grishagarwalLakshmi varagand  ramanandg_grishagarwal
Lakshmi varagand ramanandg_grishagarwal
 
Hld and lld
Hld and lldHld and lld
Hld and lld
 
Identifying Thresholds for Distance Design-based Direct Class Cohesion (D3C2)...
Identifying Thresholds for Distance Design-based Direct Class Cohesion (D3C2)...Identifying Thresholds for Distance Design-based Direct Class Cohesion (D3C2)...
Identifying Thresholds for Distance Design-based Direct Class Cohesion (D3C2)...
 

Similar to Chapter 5 software design

SE2018_Lec 15_ Software Design
SE2018_Lec 15_ Software DesignSE2018_Lec 15_ Software Design
SE2018_Lec 15_ Software DesignAmr E. Mohamed
 
Design concept -Software Engineering
Design concept -Software EngineeringDesign concept -Software Engineering
Design concept -Software EngineeringVarsha Ajith
 
Software Engineering unit 3
Software Engineering unit 3Software Engineering unit 3
Software Engineering unit 3Abhimanyu Mishra
 
UNIT3 PART2.pptx dhfdifhdsfvgudf dhfbdhbffdvf
UNIT3 PART2.pptx dhfdifhdsfvgudf dhfbdhbffdvfUNIT3 PART2.pptx dhfdifhdsfvgudf dhfbdhbffdvf
UNIT3 PART2.pptx dhfdifhdsfvgudf dhfbdhbffdvfputtipavan23022023
 
Function oriented design
Function oriented designFunction oriented design
Function oriented designVidhun T
 
Unit3 Software engineering UPTU
Unit3 Software engineering UPTUUnit3 Software engineering UPTU
Unit3 Software engineering UPTUMohammad Faizan
 
Software Engineering Unit 3 PPT Software Design
Software Engineering Unit 3 PPT Software DesignSoftware Engineering Unit 3 PPT Software Design
Software Engineering Unit 3 PPT Software Designmayanksingh678141
 
Software Design ppt.pptx
Software Design ppt.pptxSoftware Design ppt.pptx
Software Design ppt.pptxSeemaSarvath1
 
Software engg. pressman_ch-9
Software engg. pressman_ch-9Software engg. pressman_ch-9
Software engg. pressman_ch-9Dhairya Joshi
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Kuwait10
 
CS8494 SOFTWARE ENGINEERING Unit-3
CS8494 SOFTWARE ENGINEERING Unit-3CS8494 SOFTWARE ENGINEERING Unit-3
CS8494 SOFTWARE ENGINEERING Unit-3SIMONTHOMAS S
 
Software Design abtic.pptx
Software Design abtic.pptxSoftware Design abtic.pptx
Software Design abtic.pptxssuser8c0d24
 
5.Software Design.ppt it is for software eng students
5.Software Design.ppt it is for software eng students5.Software Design.ppt it is for software eng students
5.Software Design.ppt it is for software eng studentsrajvirsinghkanwar200
 
"Design Phase: A Deep Dive into Software Design and Development"
"Design Phase: A Deep Dive into Software Design and Development""Design Phase: A Deep Dive into Software Design and Development"
"Design Phase: A Deep Dive into Software Design and Development"babulaldta
 
SWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design BasicsSWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design Basicsghayour abbas
 
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptxUNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptxLeahRachael
 

Similar to Chapter 5 software design (20)

SE2018_Lec 15_ Software Design
SE2018_Lec 15_ Software DesignSE2018_Lec 15_ Software Design
SE2018_Lec 15_ Software Design
 
SE UNIT-3.pdf
SE UNIT-3.pdfSE UNIT-3.pdf
SE UNIT-3.pdf
 
Design concept -Software Engineering
Design concept -Software EngineeringDesign concept -Software Engineering
Design concept -Software Engineering
 
Software Engineering unit 3
Software Engineering unit 3Software Engineering unit 3
Software Engineering unit 3
 
UNIT3 PART2.pptx dhfdifhdsfvgudf dhfbdhbffdvf
UNIT3 PART2.pptx dhfdifhdsfvgudf dhfbdhbffdvfUNIT3 PART2.pptx dhfdifhdsfvgudf dhfbdhbffdvf
UNIT3 PART2.pptx dhfdifhdsfvgudf dhfbdhbffdvf
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
 
Unit 3
Unit 3Unit 3
Unit 3
 
Unit3 Software engineering UPTU
Unit3 Software engineering UPTUUnit3 Software engineering UPTU
Unit3 Software engineering UPTU
 
6&8-Design.ppt
6&8-Design.ppt6&8-Design.ppt
6&8-Design.ppt
 
Software Engineering Unit 3 PPT Software Design
Software Engineering Unit 3 PPT Software DesignSoftware Engineering Unit 3 PPT Software Design
Software Engineering Unit 3 PPT Software Design
 
Software Design ppt.pptx
Software Design ppt.pptxSoftware Design ppt.pptx
Software Design ppt.pptx
 
Software engg. pressman_ch-9
Software engg. pressman_ch-9Software engg. pressman_ch-9
Software engg. pressman_ch-9
 
114 425-433
114 425-433114 425-433
114 425-433
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10
 
CS8494 SOFTWARE ENGINEERING Unit-3
CS8494 SOFTWARE ENGINEERING Unit-3CS8494 SOFTWARE ENGINEERING Unit-3
CS8494 SOFTWARE ENGINEERING Unit-3
 
Software Design abtic.pptx
Software Design abtic.pptxSoftware Design abtic.pptx
Software Design abtic.pptx
 
5.Software Design.ppt it is for software eng students
5.Software Design.ppt it is for software eng students5.Software Design.ppt it is for software eng students
5.Software Design.ppt it is for software eng students
 
"Design Phase: A Deep Dive into Software Design and Development"
"Design Phase: A Deep Dive into Software Design and Development""Design Phase: A Deep Dive into Software Design and Development"
"Design Phase: A Deep Dive into Software Design and Development"
 
SWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design BasicsSWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design Basics
 
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptxUNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
 

Recently uploaded

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 

Recently uploaded (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 

Chapter 5 software design

  • 1. Software Design Goutam Majumder National Institute of Technology Mizoram Asst. Professor Department of CSE goutam.nita@gmail.com March 23, 2017 Goutam Majumder (NITMZ) SD March 23, 2017 1 / 26
  • 2. Overview 1 Introduction to software design 2 Outcome of a Design Process Classification of Design Activities Classification of Design Methodologies Analysis vs Design 3 Goodness of a design 4 Functional Independence 5 Cohesion and Coupling Classification of cohesiveness Classification of Coupling 6 Function-oriented design vs. Object-oriented design Goutam Majumder (NITMZ) SD March 23, 2017 2 / 26
  • 3. Introduction Design phase transforms SRS document: To a form easily implementable in some programming language Figure: Software Design Process Goutam Majumder (NITMZ) SD March 23, 2017 3 / 26
  • 4. Outcome of a Design Process Different Modules Required: Different modules must be clearly iden- tified and documented. Modules name must be given as their task (e.g. handle registration task) Control Relationship among Modules:It is arise due to function call between the modules. It must be identified and documented Interface among different modules: It identifies the exact data items exchanged between the module. Data structure of the individual modules: Each module store some data that the function of the module need to share to accomplish the overall responsibility. Algorithm required to implement the individual modules: Each function in a module do some specific task. Required algorithm must be clearly designed and documented with due consideration to the ac- curacy of the result, space and time. Goutam Majumder (NITMZ) SD March 23, 2017 4 / 26
  • 5. Classification of Design Activities A good software design is a single step procedure but rather by iterating over a series of design activities. Activities are classify into two stages: High Level Design A problem is decomposed into set of modules, the control relationship among various modules identified, and also the interfaces among various modules are identified. Detailed Design Each module is examined carefully to design its data structures and the algorithms. Outcome of detailed design is Module specification (MSPEC) document Goutam Majumder (NITMZ) SD March 23, 2017 5 / 26
  • 6. High Level Design It identifying the followings: Modules; Control relationships among modules; Interfaces among modules. Several notations are available to represent high-level design: Usually a tree-like diagram called structure chart is used. Other notations: Jackson diagram or Warnier-Orr diagram can also be used. The outcome of high-level design: Program structure (or software architecture). Figure: High Level Design Goutam Majumder (NITMZ) SD March 23, 2017 6 / 26
  • 7. Outcome of a Design Process Classification of Design Methodologies It is roughly classify these methodologies into two: procedural object-oriented Does a design technique ensure a unique solution? Designer must employ many design technique (candidate). Among them designer must choose superior one Analysis vs Design An analysis technique helps elaborate the customer requirements through careful thinking–at the same time consciously avoids making any decisions regarding implementation. In function oriented: analysis (DFD) and design (structure chart) In object-oriented: UML for analysis and design Goutam Majumder (NITMZ) SD March 23, 2017 7 / 26
  • 8. Goodness of a design It can vary depending on the exact application being designed. For example memory issue for embedded software. Characteristics for good software design for general application have the following: Should implement all functionalities of the system correctly. Should be easily understandable. Should be efficient. Should be easily amenable to change (i.e. easily maintainable). Understandability of a design is a major issue To determines the goodness of design: A design that is easy to understand and also easy to maintain and change. Unless a design is easy to understand, Tremendous effort needed to maintain it We already know that about 60% effort is spent in maintenance If the software is not easy to understand: Maintenance effort would increase many times. Goutam Majumder (NITMZ) SD March 23, 2017 8 / 26
  • 9. Goodness of a design Understandability of a design is a major issue Use consistent and meaningful names: For various design components. Should make use of abstraction and decomposition principles in ample measure How are Abstraction and Decomposition Principles Used in Design? By two principal ways: 1 Modularity: It is a fundamental attributes of any good design. Decomposition of a problem cleanly into modules Modules are almost independent of each other Divide and conquer principle If modules are independent: Modules can be understood separately, Reduces the complexity greatly 2 Layered Design: It is one in which when the call relations among dif- ferent modules are represented graphically Goutam Majumder (NITMZ) SD March 23, 2017 9 / 26
  • 10. Goodness of a design Can we quantitatively measure the modularity of a design solution? No other solution is available No quantitative metrics available to directly measure the modularity But we can quantitatively characterise the modularity of a design solution using cohesion and coupling A good design with high cohesion and low coupling among modules is the effective problem decomposition Goutam Majumder (NITMZ) SD March 23, 2017 10 / 26
  • 11. Goodness of a design Layered design Figure: Two design solution Goutam Majumder (NITMZ) SD March 23, 2017 11 / 26
  • 12. Goodness of a design Layered design A module can invoke only module in the layer immediately below. A layered design can be considered to be implementing control abstrac- tion It makes debugging easy. Since one would need to concentrate only on a few modules to detect the error It makes easy to understand how the lower layer module works Superordinate and subordinate modules Visibility Depth and Width: It indicates number of layers and the overall span of control respectively Fan-out: it measures the number of modules that are directly controlled by a given module. High fan-out numbers is not a good design Fan-in: number of modules that directly invoke a given module Goutam Majumder (NITMZ) SD March 23, 2017 12 / 26
  • 13. Functional Independence We mean that a module performs a single task and needs very little inter- action with other modules. Functional independence reduces error propagation Degree of interaction between modules is low. An error existing in one module does not directly affect other modules Reuse of modules is possible : Can be easily taken out and reused in a different program Each module does some well-defined and precise function The interfaces of a module with other modules is simple and minimal Goutam Majumder (NITMZ) SD March 23, 2017 13 / 26
  • 14. Cohesion and Coupling Cohesion When the functions of the module cooperate with each other for performing a single objective, then the module has good cohesion. Functional strength of a module. A cohesive module performs a single task or function Coupling It is a measure of the degree of the interdependence between the two mod- ules. Two modules are said to be highly coupled, if they are: 1 If the function call between two modules involve passing large chunks of shared data, the modules are tightly coupled 2 If the interactions occur through some shared data, then also we say that they are highly coupled If two modules either do not interact with each other or interact by a few primitive data items, they are said to have low coupling. Goutam Majumder (NITMZ) SD March 23, 2017 14 / 26
  • 15. Classification of Cohesiveness Classification is often subjective: Yet gives us some idea about cohesiveness of a module By examining the type of cohesion exhibited by a module We can roughly tell whether it displays high cohesion or low cohesion Figure: Classification of Cohesion Goutam Majumder (NITMZ) SD March 23, 2017 15 / 26
  • 16. Classification of Cohesiveness Coincidental Cohesion The module performs a set of tasks: Which relate to each other very loosely, if at all The module contains a random collection of functions Functions have been put in the module out of pure coincidence without any thought or design Logical Cohesion All elements of the module perform similar operations: e.g. error handling, data input, data output, etc. An example of logical cohesion: A set of print functions to generate an output report arranged into a single module Goutam Majumder (NITMZ) SD March 23, 2017 16 / 26
  • 17. Classification of Cohesiveness Temporal Cohesion The module contains tasks that are related by the fact: All the tasks must be executed in the same time span. Example: The set of functions responsible for initialization, start-up, shut-down of some process, etc. Procedural Cohesion The set of functions of the module: All part of a procedure (algorithm) Certain sequence of steps have to be carried out in a certain order for achieving an objective (e.g. the algorithm for decoding a message) Communicational Cohesion All functions of the module: Reference or update the same data structure (e.g. The set of functions defined on an array or a stack) Goutam Majumder (NITMZ) SD March 23, 2017 17 / 26
  • 18. Classification of Cohesiveness Sequential Cohesion Elements of a module form different parts of a sequence Output from one element of the sequence is input to the next e.g. sort→search→display Functional Cohesion Different elements of a module cooperate: To achieve a single function, e.g. managing an employee’s pay-roll When a module displays functional cohesion, We can describe the function using a single sentence. Goutam Majumder (NITMZ) SD March 23, 2017 18 / 26
  • 19. Determining Cohesiveness Write down a sentence to describe the function of the module If the sentence is compound, It has a sequential or communicational cohesion If it has words like first, next, after, then, etc. It has sequential or temporal cohesion If it has words like initialize It probably has temporal cohesion Goutam Majumder (NITMZ) SD March 23, 2017 19 / 26
  • 20. Classification of Coupling Coupling indicates: How closely two modules interact or how interdependent they are. The degree of coupling between two modules depends on their interface complexity. There are no ways to precisely determine coupling between two modules: Classification of different types of coupling will help us to approximately estimate the degree of coupling between two modules Five types of coupling can exist between any two modules Figure: Coupling Classes Goutam Majumder (NITMZ) SD March 23, 2017 20 / 26
  • 21. Classification of Coupling Data Coupling Two modules are data coupled - If they communicate via a parameter: an elementary data item e.g an integer, a float, a character, etc. The data item should be problem related: Not used for control purpose. Stamp Coupling Two modules are stamp coupled - If they communicate via a composite data item - such as a record in PASCAL or a structure in C. Control Coupling Data from one module is used to direct the order of instruction execution in another e.g. A flag set in one module and tested in another module Goutam Majumder (NITMZ) SD March 23, 2017 21 / 26
  • 22. Classification of Coupling Common Coupling If module share some global data items Content Coupling Content coupling exists between two modules: If they share code e.g, branching from one module into another module The degree of coupling increases from data coupling to content coupling Goutam Majumder (NITMZ) SD March 23, 2017 22 / 26
  • 23. Design Approaches Two fundamentally different software design approaches: Function-oriented design Object-oriented design These two design approaches are radically different However, are complementary – Rather than competing techniques. Each technique is applicable at – Different stages of the design process Function-oriented Design A system is looked upon as something – That performs a set of functions Starting at this high-level view of the system: Each function is successively refined into more detailed functions. Functions are mapped to a module structure. The function create-new-library- member Creates the record for a new member Assigns a unique membership number Prints a bill towards the membership Goutam Majumder (NITMZ) SD March 23, 2017 23 / 26
  • 24. Design Approaches Function Oriented Design The system state is centralized: Accessible to different functions Member–records – Available for reference and updation to several functions Create-new-member Delete-member Update-member-record Several function-oriented design approaches have been developed Structured design (Constantine and Yourdon, 1979) Jackson’s structured design (Jackson, 1975) Warnier-Orr methodology Wirth’s step-wise refinement Hatley and Pirbhai’s Methodology Goutam Majumder (NITMZ) SD March 23, 2017 24 / 26
  • 25. Design Approaches Object–Oriented Design System is viewed as a collection of objects (i.e. entities). System state is decentralized among the objects – Each object manages its own state information Library Automation Software: Each library member is a separate object – With its own data and functions Functions defined for one object – Cannot directly refer to or change data of other objects Objects have their own internal data – Defines their state. Similar objects constitute a class – Each object is a member of some class. Classes may inherit features – From a super class. Conceptually, objects communicate by message passing. Goutam Majumder (NITMZ) SD March 23, 2017 25 / 26
  • 26. The End Goutam Majumder (NITMZ) SD March 23, 2017 26 / 26