SlideShare a Scribd company logo
1 of 40
Coupling and Cohesion Pfleeger, S.,  Software Engineering Theory and Practice. Prentice Hall, 2001.
Characteristics of Good Design ,[object Object],[object Object],[object Object],[object Object],[object Object]
Coupling: Degree of dependence among components No dependencies Loosely coupled-some dependencies Highly coupled-many dependencies High coupling makes modifying parts of the system difficult, e.g., modifying a component affects all the components to which the component is connected.
Range of Coupling High Coupling Loose Low Content Common Control Stamp Data Uncoupled
Content coupling ,[object Object],[object Object],[object Object],[object Object],[object Object]
Example of Content Coupling-1 ,[object Object],[object Object]
Example of Content Coupling-2 ,[object Object],[object Object],[object Object],[object Object]
Common Coupling  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example-1 ,[object Object],Process control component maintains current data about state of operation. Gets data from multiple sources. Supplies data to multiple sinks.
Example-2 ,[object Object],[object Object],[object Object],Process control component maintains current data about state of operation. Gets data from multiple sources. Supplies data to multiple sinks.
Control Coupling ,[object Object],[object Object],[object Object],[object Object]
Example ,[object Object],[object Object]
Stamp Coupling ,[object Object],[object Object],[object Object]
Example-1 ,[object Object],Customer billing system
Example-2 ,[object Object],[object Object],[object Object],Customer Billing System
Data Coupling ,[object Object],[object Object],[object Object],[object Object]
Key Idea in Object-Oriented Programming ,[object Object]
Cohesion ,[object Object],[object Object],[object Object],[object Object]
Range of Cohesion High Cohesion Low Functional Informational Sequential Communicational Procedural Temporal Logical Coincidental
Coincidental Cohesion  ,[object Object],[object Object],[object Object],[object Object]
Example ,[object Object],[object Object],[object Object],[object Object]
Logical Cohesion ,[object Object],[object Object]
Example-1 ,[object Object],[object Object]
Example-2 ,[object Object],[object Object],[object Object]
Temporal Cohesion  ,[object Object],[object Object],[object Object],[object Object]
Example-1 ,[object Object]
Example-2 ,[object Object],[object Object],[object Object],[object Object]
Procedural Cohesion ,[object Object],[object Object]
Example ,[object Object],[object Object],[object Object],[object Object],[object Object]
Communicational Cohesion ,[object Object]
Example ,[object Object],[object Object],[object Object]
Sequential Cohesion ,[object Object],[object Object],[object Object]
Informational Cohesion ,[object Object],[object Object],[object Object],[object Object],[object Object]
Functional Cohesion ,[object Object],[object Object],[object Object]
Examples of Cohesion-1 Function A Function B Function D Function C Function  E Coincidental Parts unrelated Function A Function A’ Function A’’ logic Logical Similar functions Time t 0 Time t 0  + X Time t 0  + 2X Temporal Related by time Function A Function B Function C Procedural Related by order of functions
Examples of Cohesion-2 Function A part 1 Function A part 2 Function A part 3 Functional Sequential with complete, related functions Function A Function B Function C Communicational Access same data Function A Function B Function C Sequential Output of one is input to another
p q t r s u 1 2 3 4 5 6 No.  In  Out Interface Description p, t, u access the same database in update mode Problem: Define coupling between pairs of modules. 1 Aircraft type Status flag 2 ----- List of aircraft parts 3 Function code ----- 4 ----- List of aircraft parts 5 Part number Part manufacturer 6 Part number Part name
Coupling between pairs of modules q r s t u p q --- --- r --- --- s --- t
Problem: Classify cohesion for each module ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
In Class ,[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Software design principles
Software design principlesSoftware design principles
Software design principles
Ritesh Singh
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
saurabhshertukde
 
Chapter 4 software design
Chapter 4  software designChapter 4  software design
Chapter 4 software design
Cliftone Mullah
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-design
Oliver Cheng
 
Design process and concepts
Design process and conceptsDesign process and concepts
Design process and concepts
Slideshare
 

What's hot (20)

Design Principles
Design PrinciplesDesign Principles
Design Principles
 
Design final
Design finalDesign final
Design final
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and Modularity
 
Software design principles
Software design principlesSoftware design principles
Software design principles
 
Seii unit7 component-level-design
Seii unit7 component-level-designSeii unit7 component-level-design
Seii unit7 component-level-design
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
 
Chapter 4 software design
Chapter 4  software designChapter 4  software design
Chapter 4 software design
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-design
 
Unit iii(part d - component level design)
Unit   iii(part d - component level design)Unit   iii(part d - component level design)
Unit iii(part d - component level design)
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
 
Design process and concepts
Design process and conceptsDesign process and concepts
Design process and concepts
 
Design techniques
Design techniquesDesign techniques
Design techniques
 
Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software Engineering
 
Monolithic and Procedural Programming
Monolithic and Procedural ProgrammingMonolithic and Procedural Programming
Monolithic and Procedural Programming
 
Programming using MPI and OpenMP
Programming using MPI and OpenMPProgramming using MPI and OpenMP
Programming using MPI and OpenMP
 
SE UNIT-3.pdf
SE UNIT-3.pdfSE UNIT-3.pdf
SE UNIT-3.pdf
 
Software design
Software designSoftware design
Software design
 
5 software design
5 software design5 software design
5 software design
 
Coupling coheshion tps
Coupling coheshion tpsCoupling coheshion tps
Coupling coheshion tps
 
Software architecture
Software architectureSoftware architecture
Software architecture
 

Viewers also liked

Data structure and algorithms in c++
Data structure and algorithms in c++Data structure and algorithms in c++
Data structure and algorithms in c++
Karmjeet Chahal
 
C++: inheritance, composition, polymorphism
C++: inheritance, composition, polymorphismC++: inheritance, composition, polymorphism
C++: inheritance, composition, polymorphism
Jussi Pohjolainen
 

Viewers also liked (20)

Universal Declarative Services
Universal Declarative ServicesUniversal Declarative Services
Universal Declarative Services
 
Iterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design patternIterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design pattern
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
C++ Inheritance
C++ InheritanceC++ Inheritance
C++ Inheritance
 
Polymorphism and Software Reuse
Polymorphism and Software ReusePolymorphism and Software Reuse
Polymorphism and Software Reuse
 
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
 
XKE - Programming Paradigms & Constructs
XKE - Programming Paradigms & ConstructsXKE - Programming Paradigms & Constructs
XKE - Programming Paradigms & Constructs
 
Hashing and Hash Tables
Hashing and Hash TablesHashing and Hash Tables
Hashing and Hash Tables
 
The Data Link Layer
The Data Link LayerThe Data Link Layer
The Data Link Layer
 
The Physical Layer
The Physical LayerThe Physical Layer
The Physical Layer
 
Classes And Methods
Classes And MethodsClasses And Methods
Classes And Methods
 
Syntax part 6
Syntax part 6Syntax part 6
Syntax part 6
 
04 design concepts_n_principles
04 design concepts_n_principles04 design concepts_n_principles
04 design concepts_n_principles
 
Association agggregation and composition
Association agggregation and compositionAssociation agggregation and composition
Association agggregation and composition
 
Data structure and algorithms in c++
Data structure and algorithms in c++Data structure and algorithms in c++
Data structure and algorithms in c++
 
WSO2 Complex Event Processor
WSO2 Complex Event ProcessorWSO2 Complex Event Processor
WSO2 Complex Event Processor
 
C++: inheritance, composition, polymorphism
C++: inheritance, composition, polymorphismC++: inheritance, composition, polymorphism
C++: inheritance, composition, polymorphism
 
Cohesion & Coupling
Cohesion & Coupling Cohesion & Coupling
Cohesion & Coupling
 
Cohesion and coherence
Cohesion and coherenceCohesion and coherence
Cohesion and coherence
 
The Network Layer
The Network LayerThe Network Layer
The Network Layer
 

Similar to 12 couplingand cohesion-student

Components in real time systems
Components in real time systemsComponents in real time systems
Components in real time systems
Saransh Garg
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
Bala Ganesh
 
Program logic and design
Program logic and designProgram logic and design
Program logic and design
Chaffey College
 

Similar to 12 couplingand cohesion-student (20)

SE-coupling and cohesion.ppt
SE-coupling and cohesion.pptSE-coupling and cohesion.ppt
SE-coupling and cohesion.ppt
 
Lect17
Lect17Lect17
Lect17
 
Unit-III(Design).pptx
Unit-III(Design).pptxUnit-III(Design).pptx
Unit-III(Design).pptx
 
Software design i (2) (1)
Software design   i (2) (1)Software design   i (2) (1)
Software design i (2) (1)
 
11.3.14&22.1.16
11.3.14&22.1.1611.3.14&22.1.16
11.3.14&22.1.16
 
Software Design
Software Design Software Design
Software Design
 
Components in real time systems
Components in real time systemsComponents in real time systems
Components in real time systems
 
Cloud Storage and Security
Cloud Storage and SecurityCloud Storage and Security
Cloud Storage and Security
 
Online eaxmination
Online eaxminationOnline eaxmination
Online eaxmination
 
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
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
 
5010
50105010
5010
 
Process management seminar
Process management seminarProcess management seminar
Process management seminar
 
IRJET- An Integrity Auditing &Data Dedupe withEffective Bandwidth in Cloud St...
IRJET- An Integrity Auditing &Data Dedupe withEffective Bandwidth in Cloud St...IRJET- An Integrity Auditing &Data Dedupe withEffective Bandwidth in Cloud St...
IRJET- An Integrity Auditing &Data Dedupe withEffective Bandwidth in Cloud St...
 
Program logic and design
Program logic and designProgram logic and design
Program logic and design
 
Human Machine Learning and Analysis
Human Machine Learning and AnalysisHuman Machine Learning and Analysis
Human Machine Learning and Analysis
 
IRJET- Secure Scheme For Cloud-Based Multimedia Content Storage
IRJET-  	  Secure Scheme For Cloud-Based Multimedia Content StorageIRJET-  	  Secure Scheme For Cloud-Based Multimedia Content Storage
IRJET- Secure Scheme For Cloud-Based Multimedia Content Storage
 
Data mining model for the data retrieval from central server configuration
Data mining model for the data retrieval from central server configurationData mining model for the data retrieval from central server configuration
Data mining model for the data retrieval from central server configuration
 
Software maintenance
Software maintenanceSoftware maintenance
Software maintenance
 
Programming Without Coding Technology (PWCT) Features - Programming Paradigm
Programming Without Coding Technology (PWCT) Features - Programming ParadigmProgramming Without Coding Technology (PWCT) Features - Programming Paradigm
Programming Without Coding Technology (PWCT) Features - Programming Paradigm
 

More from randhirlpu

system software
system software system software
system software
randhirlpu
 
16 user interfacedesign
16 user interfacedesign16 user interfacedesign
16 user interfacedesign
randhirlpu
 
15 object orienteddesign
15 object orienteddesign15 object orienteddesign
15 object orienteddesign
randhirlpu
 
14 functional design
14 functional design14 functional design
14 functional design
randhirlpu
 
13 configuration management
13  configuration management13  configuration management
13 configuration management
randhirlpu
 
9 project planning
9 project planning9 project planning
9 project planning
randhirlpu
 
8 project planning
8 project planning8 project planning
8 project planning
randhirlpu
 
7(srs template)
7(srs template)7(srs template)
7(srs template)
randhirlpu
 
5(re dfd-erd-data dictionay)
5(re dfd-erd-data dictionay)5(re dfd-erd-data dictionay)
5(re dfd-erd-data dictionay)
randhirlpu
 

More from randhirlpu (14)

system software
system software system software
system software
 
16 user interfacedesign
16 user interfacedesign16 user interfacedesign
16 user interfacedesign
 
15 object orienteddesign
15 object orienteddesign15 object orienteddesign
15 object orienteddesign
 
14 functional design
14 functional design14 functional design
14 functional design
 
13 configuration management
13  configuration management13  configuration management
13 configuration management
 
9 project planning
9 project planning9 project planning
9 project planning
 
8 project planning
8 project planning8 project planning
8 project planning
 
7(srs template)
7(srs template)7(srs template)
7(srs template)
 
5(re dfd-erd-data dictionay)
5(re dfd-erd-data dictionay)5(re dfd-erd-data dictionay)
5(re dfd-erd-data dictionay)
 
4
44
4
 
3
33
3
 
2
22
2
 
1
11
1
 
Cocomo m odel
Cocomo m odelCocomo m odel
Cocomo m odel
 

Recently uploaded

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

12 couplingand cohesion-student

  • 1. Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
  • 2.
  • 3. Coupling: Degree of dependence among components No dependencies Loosely coupled-some dependencies Highly coupled-many dependencies High coupling makes modifying parts of the system difficult, e.g., modifying a component affects all the components to which the component is connected.
  • 4. Range of Coupling High Coupling Loose Low Content Common Control Stamp Data Uncoupled
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Range of Cohesion High Cohesion Low Functional Informational Sequential Communicational Procedural Temporal Logical Coincidental
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. Examples of Cohesion-1 Function A Function B Function D Function C Function E Coincidental Parts unrelated Function A Function A’ Function A’’ logic Logical Similar functions Time t 0 Time t 0 + X Time t 0 + 2X Temporal Related by time Function A Function B Function C Procedural Related by order of functions
  • 36. Examples of Cohesion-2 Function A part 1 Function A part 2 Function A part 3 Functional Sequential with complete, related functions Function A Function B Function C Communicational Access same data Function A Function B Function C Sequential Output of one is input to another
  • 37. p q t r s u 1 2 3 4 5 6 No. In Out Interface Description p, t, u access the same database in update mode Problem: Define coupling between pairs of modules. 1 Aircraft type Status flag 2 ----- List of aircraft parts 3 Function code ----- 4 ----- List of aircraft parts 5 Part number Part manufacturer 6 Part number Part name
  • 38. Coupling between pairs of modules q r s t u p q --- --- r --- --- s --- t
  • 39.
  • 40.

Editor's Notes

  1. Pp220+ pfleeger
  2. Pp220+ pfleeger
  3. Example of good: Sort that takes a comparison function as an argument. The sort function is clearly defined: return a list in sorted order, where sorted is determined by a parameter.
  4. In right hand side, the sort code is unchanged.
  5. Be sure you know the difference between the insightful designer and the lazy programmer. Know what tradeoffs you are making in your design.
  6. I don’t even want to think about it.
  7. I don’t even want to think about it.
  8. I don’t even want to think about it.
  9. I don’t even want to think about it.
  10. I don’t even want to think about it.
  11. I don’t even want to think about it.
  12. I don’t even want to think about it.