SlideShare a Scribd company logo
1 of 31
Cohesion
 In computer programming, cohesion refers to the degree
to which the elements of a module belong together. Thus,
cohesion measures the strength of relationship between
pieces of functionality within a given module. For
example, in highlycohesive systems functionality is
stronglyrelated.
 Cohesion is an ordinal type of measurement and is
usuallydescribed as “high cohesion” or “low cohesion”.
Logical cohesion
Logical cohesion is when parts of a module are grouped because
they are logically categorized to do the same thing even though
they are different by nature (e.g. grouping all mouse and
keyboard input handling routines).
Temporal cohesion
Temporal cohesion is when parts of a module are grouped by
when they are processed - the parts are processed at a particular
time in program execution (e.g. a function which is called after
catching an exception which closes open files, creates an error
log, and notifies the user).
Procedural cohesion
Procedural cohesion is when parts of a module are
grouped because they always follow a certain sequence
of execution (e.g. a function which checks file
permissions and then opens thefile).
Communicational/informational
cohesion
Communicational cohesion is when parts of a module are
grouped because they operate on the same data (e.g. a module
which operates on the same record of information).
Sequential cohesion
Sequential cohesion is when parts of a module are grouped
because the output from one part is the input to another part like
an assembly line (e.g. a function which reads data from a file and
processes the data).
Functional cohesion (best)
Functional cohesion is when parts of a module are grouped
because they all contribute to a single well- defined task of the
module (e.g. Lexical analysis of an XML string).
While functional cohesion is considered the most
desirable type of cohesion for a software module, it may
not be achievable. There are cases where
communicational cohesion is the highest level of
cohesion that can be attained under the circumstances.
Examples of Cohesion
COUPLING
Coupling (computer programming)
 In software Engenering, coupling is the degree of
interdependence between software modules; a measure of how
closely connected two routines or modules are; the strength of
the relationships between modules.
 Coupling is usually contrasted with cohesion. Low coupling often
correlates with high cohesion, and vice versa. Low coupling is
often a sign of a well- structured computer system and a good
design, and when combined with high cohesion, supports the
general goals of high readability andmaintainability.
Content coupling (high)
Content coupling (also known as Pathological coupling) occurs
when one module modifies or relies on the internal workings of
another module (e.g., accessing local data of another module). In
this situation, a change in the way the second module produces
data (location, type, timing) might also require a change in the
dependent module.
Example of Content
coupling
Common coupling
Common coupling (also known as Global coupling) occurs when
two modules share the same global data (e.g., a global variable).
Changing the shared resource might imply changing all the
modulesusing it.
Example of
Common coupling
Control coupling
Control coupling is one module controlling the flow of another,
by passing it information on what to do (e.g., passing a what-to-
doflag).
Example of Control
coupling
Stamp coupling (Data-structured
coupling)
In this type of coupling, the data structure is used to transfer
information from on component to another.
Example of Stamp
coupling
Data coupling
The modules are connected by the data coupling, if only data
can be passed between them.
Example of Data coupling
Message coupling (low)
This is the loosest type of coupling. It can be achieved by state
decentralization (as in objects) and component communication is
done via parameters or message passing.
Example of Message coupling
External coupling
External coupling occurs when two modules share an externally
imposed data format, communication protocol, or device
interface. This is basically related to the communication to
external tools and devices.
Example of External coupling
No coupling
Modules do not communicateat all with one another.
Example of No coupling
Coupling , Cohesion and there Types

More Related Content

What's hot

Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality AssuranceSaqib Raza
 
Modules and modularization criteria
Modules and modularization criteriaModules and modularization criteria
Modules and modularization criteriaUmaselvi_R
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignHaitham El-Ghareeb
 
Software architecture Unit 1 notes
Software architecture Unit 1 notesSoftware architecture Unit 1 notes
Software architecture Unit 1 notesSudarshan Dhondaley
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assuranceAman Adhikari
 
System Models in Software Engineering SE7
System Models in Software Engineering SE7System Models in Software Engineering SE7
System Models in Software Engineering SE7koolkampus
 
Function oriented design
Function oriented designFunction oriented design
Function oriented designVidhun T
 
Phased life cycle model
Phased life cycle modelPhased life cycle model
Phased life cycle modelStephennancy
 
Software engineering: design for reuse
Software engineering: design for reuseSoftware engineering: design for reuse
Software engineering: design for reuseMarco Brambilla
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Ramakant Soni
 
Real time and distributed design
Real time and distributed designReal time and distributed design
Real time and distributed designpriyapavi96
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-designOliver Cheng
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagramsSwathy T
 

What's hot (20)

Domain object model
Domain object modelDomain object model
Domain object model
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
Ch 11-component-level-design
Ch 11-component-level-designCh 11-component-level-design
Ch 11-component-level-design
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Modules and modularization criteria
Modules and modularization criteriaModules and modularization criteria
Modules and modularization criteria
 
CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Software architecture Unit 1 notes
Software architecture Unit 1 notesSoftware architecture Unit 1 notes
Software architecture Unit 1 notes
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Software design
Software designSoftware design
Software design
 
System Models in Software Engineering SE7
System Models in Software Engineering SE7System Models in Software Engineering SE7
System Models in Software Engineering SE7
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
 
Phased life cycle model
Phased life cycle modelPhased life cycle model
Phased life cycle model
 
Software engineering: design for reuse
Software engineering: design for reuseSoftware engineering: design for reuse
Software engineering: design for reuse
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram
 
Component level design
Component   level designComponent   level design
Component level design
 
Real time and distributed design
Real time and distributed designReal time and distributed design
Real time and distributed design
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-design
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagrams
 

Similar to Coupling , Cohesion and there Types

Software Design abtic.pptx
Software Design abtic.pptxSoftware Design abtic.pptx
Software Design abtic.pptxssuser8c0d24
 
software engineering
software engineeringsoftware engineering
software engineeringAbinaya B
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design conceptssrijavel
 
Designing PrinciplesOf Software
Designing PrinciplesOf Software Designing PrinciplesOf Software
Designing PrinciplesOf Software Ankita Agrawal
 
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
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principlessaurabhshertukde
 
4 B-Coupling and Cohesion-1.pptx
4 B-Coupling and Cohesion-1.pptx4 B-Coupling and Cohesion-1.pptx
4 B-Coupling and Cohesion-1.pptxzeenatparveen24
 
5.Software Design.ppt
5.Software Design.ppt5.Software Design.ppt
5.Software Design.pptssuser1288e7
 
Coupling Coupling can be low (loose) or high (tight).Types of cou.pdf
Coupling Coupling can be low (loose) or high (tight).Types of cou.pdfCoupling Coupling can be low (loose) or high (tight).Types of cou.pdf
Coupling Coupling can be low (loose) or high (tight).Types of cou.pdfanuradhasilks
 
Multi-GranularityUser Friendly List Locking Protocol for XML Repetitive Data
Multi-GranularityUser Friendly List Locking Protocol for XML Repetitive DataMulti-GranularityUser Friendly List Locking Protocol for XML Repetitive Data
Multi-GranularityUser Friendly List Locking Protocol for XML Repetitive DataWaqas Tariq
 
chapter 5.ppt
chapter 5.pptchapter 5.ppt
chapter 5.pptEIjerry
 
Data and Computation Interoperability in Internet Services
Data and Computation Interoperability in Internet ServicesData and Computation Interoperability in Internet Services
Data and Computation Interoperability in Internet ServicesSergey Boldyrev
 
SWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design BasicsSWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design Basicsghayour abbas
 
From Simulation to Online Gaming: the need for adaptive solutions
From Simulation to Online Gaming: the need for adaptive solutions From Simulation to Online Gaming: the need for adaptive solutions
From Simulation to Online Gaming: the need for adaptive solutions Gabriele D'Angelo
 
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesionSe 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesionbabak danyal
 
Distributed Algorithms
Distributed AlgorithmsDistributed Algorithms
Distributed Algorithms913245857
 

Similar to Coupling , Cohesion and there Types (20)

Software Design abtic.pptx
Software Design abtic.pptxSoftware Design abtic.pptx
Software Design abtic.pptx
 
software engineering
software engineeringsoftware engineering
software engineering
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
 
software engineering
software engineeringsoftware engineering
software engineering
 
Designing PrinciplesOf Software
Designing PrinciplesOf Software Designing PrinciplesOf Software
Designing PrinciplesOf Software
 
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
 
Slides chapter 11
Slides chapter 11Slides chapter 11
Slides chapter 11
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
 
4 B-Coupling and Cohesion-1.pptx
4 B-Coupling and Cohesion-1.pptx4 B-Coupling and Cohesion-1.pptx
4 B-Coupling and Cohesion-1.pptx
 
5.Software Design.ppt
5.Software Design.ppt5.Software Design.ppt
5.Software Design.ppt
 
Coupling Coupling can be low (loose) or high (tight).Types of cou.pdf
Coupling Coupling can be low (loose) or high (tight).Types of cou.pdfCoupling Coupling can be low (loose) or high (tight).Types of cou.pdf
Coupling Coupling can be low (loose) or high (tight).Types of cou.pdf
 
Unit 2
Unit 2Unit 2
Unit 2
 
Multi-GranularityUser Friendly List Locking Protocol for XML Repetitive Data
Multi-GranularityUser Friendly List Locking Protocol for XML Repetitive DataMulti-GranularityUser Friendly List Locking Protocol for XML Repetitive Data
Multi-GranularityUser Friendly List Locking Protocol for XML Repetitive Data
 
chapter 5.ppt
chapter 5.pptchapter 5.ppt
chapter 5.ppt
 
Data and Computation Interoperability in Internet Services
Data and Computation Interoperability in Internet ServicesData and Computation Interoperability in Internet Services
Data and Computation Interoperability in Internet Services
 
SWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design BasicsSWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design Basics
 
From Simulation to Online Gaming: the need for adaptive solutions
From Simulation to Online Gaming: the need for adaptive solutions From Simulation to Online Gaming: the need for adaptive solutions
From Simulation to Online Gaming: the need for adaptive solutions
 
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesionSe 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
 
Multi tasking learning
Multi tasking learningMulti tasking learning
Multi tasking learning
 
Distributed Algorithms
Distributed AlgorithmsDistributed Algorithms
Distributed Algorithms
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Coupling , Cohesion and there Types

  • 1.
  • 2. Cohesion  In computer programming, cohesion refers to the degree to which the elements of a module belong together. Thus, cohesion measures the strength of relationship between pieces of functionality within a given module. For example, in highlycohesive systems functionality is stronglyrelated.  Cohesion is an ordinal type of measurement and is usuallydescribed as “high cohesion” or “low cohesion”.
  • 3.
  • 4. Logical cohesion Logical cohesion is when parts of a module are grouped because they are logically categorized to do the same thing even though they are different by nature (e.g. grouping all mouse and keyboard input handling routines).
  • 5. Temporal cohesion Temporal cohesion is when parts of a module are grouped by when they are processed - the parts are processed at a particular time in program execution (e.g. a function which is called after catching an exception which closes open files, creates an error log, and notifies the user).
  • 6. Procedural cohesion Procedural cohesion is when parts of a module are grouped because they always follow a certain sequence of execution (e.g. a function which checks file permissions and then opens thefile).
  • 7. Communicational/informational cohesion Communicational cohesion is when parts of a module are grouped because they operate on the same data (e.g. a module which operates on the same record of information).
  • 8. Sequential cohesion Sequential cohesion is when parts of a module are grouped because the output from one part is the input to another part like an assembly line (e.g. a function which reads data from a file and processes the data).
  • 9. Functional cohesion (best) Functional cohesion is when parts of a module are grouped because they all contribute to a single well- defined task of the module (e.g. Lexical analysis of an XML string).
  • 10. While functional cohesion is considered the most desirable type of cohesion for a software module, it may not be achievable. There are cases where communicational cohesion is the highest level of cohesion that can be attained under the circumstances.
  • 13. Coupling (computer programming)  In software Engenering, coupling is the degree of interdependence between software modules; a measure of how closely connected two routines or modules are; the strength of the relationships between modules.  Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa. Low coupling is often a sign of a well- structured computer system and a good design, and when combined with high cohesion, supports the general goals of high readability andmaintainability.
  • 14.
  • 15. Content coupling (high) Content coupling (also known as Pathological coupling) occurs when one module modifies or relies on the internal workings of another module (e.g., accessing local data of another module). In this situation, a change in the way the second module produces data (location, type, timing) might also require a change in the dependent module.
  • 17. Common coupling Common coupling (also known as Global coupling) occurs when two modules share the same global data (e.g., a global variable). Changing the shared resource might imply changing all the modulesusing it.
  • 19. Control coupling Control coupling is one module controlling the flow of another, by passing it information on what to do (e.g., passing a what-to- doflag).
  • 21. Stamp coupling (Data-structured coupling) In this type of coupling, the data structure is used to transfer information from on component to another.
  • 23. Data coupling The modules are connected by the data coupling, if only data can be passed between them.
  • 24. Example of Data coupling
  • 25. Message coupling (low) This is the loosest type of coupling. It can be achieved by state decentralization (as in objects) and component communication is done via parameters or message passing.
  • 26. Example of Message coupling
  • 27. External coupling External coupling occurs when two modules share an externally imposed data format, communication protocol, or device interface. This is basically related to the communication to external tools and devices.
  • 29. No coupling Modules do not communicateat all with one another.
  • 30. Example of No coupling