EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login
Home Software Development Software Development Tutorials Software Engineering Tutorial Cohesion in Software Engineering
Secondary Sidebar
Software Engineering Tutorial
  • Advanced
    • Functional Point Analysis
    • Software Quality Control
    • Quality Assurance Tools
    • Prototype model advantages and disadvantages
    • UML Modelling Tools
    • Tomcat Server
    • Quality Software
    • UI Prototyping
    • Hybrid Model
    • Behavioral Model in Software Engineering
    • Flowchart symbols
    • Critical System
    • Legacy System
    • SOA Architecture
    • Software Quality Attributes
    • Software Maintenance
    • Software Cost Estimation
    • Software Inspection
    • Cohesion in Software Engineering
    • Coupling in Software Engineering
    • Component-based Software Engineering
    • Design Modeling in Software Engineering
    • Iterative Methodology
    • System Flow Diagram
    • Data Flow Architecture
    • SEICMM
    • Function Oriented Design
  • Basic
    • What is Software Engineering?
    • What is SDET
    • What Is SDLC
    • SDLC Methodologies
    • Software Classification
    • Software Design
    • Software Design Principles
    • Software Metrics
    • Utility Software Types
    • UI Design Tools
    • User Interface Design Principles
    • Architectural Design in Software Engineering
    • Software Configuration Management
    • Software Configuration Management Tools
    • What is Risk Management?
    • System Engineering
    • Object oriented programming paradigm
    • CASE Tools
  • Models
    • Prototype Model
    • What is Spiral Model
    • Waterfall?Model
    • Prototyping Tools
    • Incremental Model
    • Iterative Model
    • RAD Model
    • Fish Model
    • What is Scrum Methodology?
    • RUP? Methodology
    • COCOMO Model
    • Big Bang Model
    • System Models
    • People Capability Maturity Model
    • Analysis Modeling
    • User Interface Design
    • Capability Maturity Model Integration
    • What is Agile Development?
    • Agile Model Advantages and Disadvantages
    • Agile Process Model
    • Rational Unified Process
  • UML Daigram
    • StarUML
    • Architecture of UML
    • StarUML? Download
    • Types of UML Diagrams
    • UML Activity Diagram
    • UML Component?Diagram
    • UML Deployment Diagram
    • UML Diagram Softwares
    • UML Object?Diagram
    • UML Sequence Diagram
    • UML Use Case Diagram
    • State Diagram
    • Class Diagram
    • UML Dependency
    • UML Interaction Diagrams
    • Data Flow Diagrams
  • Interview Questions
    • Software Engineering Interview Questions
    • SDLC Interview Questions

Related Courses

Software Testing Course

Cyber Security Training

Software Development Course Training

Cohesion in Software Engineering

By Shobha ShivakumarShobha Shivakumar

Cohesion in Software Engineering

Introduction to Cohesion in Software Engineering

The measure of how strongly the elements are related functionally inside a module is called cohesion in software engineering and the elements inside a module can be instructions, groups of instructions, definition of data, call from another module etc. and the aim is always for functions that are strongly related and the expectation is for everything inside the module to be in connection with one another where the focus is on the task and this strong relations reduces modules minimize coupling.

Types of Cohesion in Software Engineering

Below are several types of cohesion in software engineering. They are:

1. Functional Cohesion

  • The execution of the task related to the problem is the only concern from all the elements inside the module.
  • The purpose of functional cohesion is single minded, strong and focused.
  • All the elements in the module perform only the necessary activities.
  • Some of the examples of functional cohesion are read transaction record, cosine angle computation, seat assignment to an airline passenger etc.

2. Sequential Cohesion

  • The data which is the output of one activity is used an input data for the next activity, the involvement of elements is as such.
  • Sequential cohesion is easy maintenance and provides a good coupling.
  • Sequential cohesion cannot be reused readily because of the activities that are not useful even when used together.
  • Some of the examples of sequential cohesion are cross validate record and formatting of module, raw records usage, formatting of raw records, cross validation of fields in raw records, returning of formatted cross validated records.

3. Communicational Cohesion

  • The activities using the same input data or output data are contributed by the elements inside the module.
  • Communicational cohesion is not flexible like we can only focus on some of the activities and not others at once.
  • Communicational cohesion consists of the links because of which the activities affect each other.
  • The cohesive ones that are functional are split by communicational cohesion.
  • Some of the examples of communicational cohesion are customer details determining modules, usage of customer account number, finding the name of the customer, finding the loan balance of the customer, returning loan balance and the name of the customer etc.

4. Procedural Cohesion

  • The activities are related if the elements in the module are related by sequence, otherwise they are not related.
  • Procedural cohesion and sequential cohesion are like each other except that the elements in the module of procedural cohesion are not related.
  • Procedural cohesion is found at the top of the hierarchy like the module of main program.
  • Some of the examples of procedural cohesion are read, write, edit of the module, record use out, writing out the record, reading the record, zero padding to the numeric fields, returning records etc.

5. Temporal Cohesion

  • The activities related in time consists of elements from the module.
  • Temporal cohesion is found in the modules of initialization and termination.
  • The module cannot be reused because the elements in the module are not related to each other.
  • The best practice in temporal cohesion is to terminate as early as possible and initialize as late as possible.
  • Some of the examples of temporal cohesion are initialization of module, setting the counter to zero, opening the student file, clearing the variables of error message, initializing the array etc.

6. Logical Cohesion

  • The activities of the same type or same general category is contributed by the elements in the module.
  • Examples of activities of the same type or same general category being contributed by the elements in the module include a report module, display module or intput output module.
  • Logical cohesion consists of control coupling as one of the activities will be selected.
  • Some of the examples of logical cohesion are module for displaying record as below:
    • Use type of the record as record.
    • If type of the record is student. then,
    • Display the record from student.
    • Else if the type of the record is staff, then
    • Display the record from staff.

7. Coincidental Cohesion

  • The activities with meaningless relationship with one another are contributed by the elements in the module.
  • Coincidental cohesion and logical cohesion are like each other except that the activities will be of different types.
  • Coincidental cohesion consists combination of activities like rojak.
  • Understanding and maintenance of Coincidental cohesion is difficult and there are possibilities of side effects whenever there is modification in the module.
  • Some of the examples of coincidental cohesion are module for miscellaneous functions, customer record usage, displaying of customer record, calculation of total sales, reading the transaction record etc.

Advantages of Cohesion is Software Engineering

Below are the advantages using Cohesion is Software Engineering:

  1. The complexity of the modules can be reduced using cohesion in software engineering. The modules can be made simpler consisting of very few operations using cohesion in software engineering.
  2. The maintainability of the system can be increased using cohesion in software engineering because whenever there are logical changes in the domain, only fewer modules are affected and change in one module cause very few changes in other modules.
  3. The reusability of the modules can be increased by using cohesion in software engineering because the components needed by the developers of the application can be found easily in a cohesive set of operations produced by the module using cohesion in software engineering.
  4. Cohesion in software engineering has a balance between both unit complexity and coupling because a perfect cohesion is possible in a module if only it consists of single element that is atomic and consisting of only one function. Such module consisting of only one element can be either too complicated in order to be able to achieve the task or can be too narrow while being in tight coupling with other modules.

Recommended Articles

This is a guide to Cohesion in Software Engineering. Here we discuss the Introduction and different types of Cohesion in Software Engineering along with its examples. You can also go through our suggested articles to learn more –

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

  1. Software Design Principles
  2. Software Engineering Interview Questions
  3. Software System Architecture
  4. Software Configuration Management
Popular Course in this category
All in One Software Development Bundle (600+ Courses, 50+ projects)
  600+ Online Courses |  3000+ Hours |  Verifiable Certificates |  Lifetime Access
4.6
Price

View Course

Related Courses

All in One Software Development Bundle(600+ Courses, 50+ projects)
Python TutorialC SharpJavaJavaScript
C Plus PlusSoftware TestingSQLKali Linux
Price
View Courses
600+ Online Courses | 50+ projects | 3000+ Hours | Verifiable Certificates | Lifetime Access
4.6 (86,754 ratings)
Software Testing Training (11 Courses, 2 Projects)4.9
Cyber Security Training (10 Courses, 3 Projects)4.8
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Software Development Course

C# Programming, Conditional Constructs, Loops, Arrays, OOPS Concept

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more