Which of the following types of cohesion can be considered as the best form of cohesion a logic B coincidental C temporal D functional?

  • Technical Blogs
  • Technology
Cohesion – Types of cohesion

By

Brijesh Yadav

-

July 16, 2021

Facebook

Twitter

Pinterest

WhatsApp

Which of the following types of cohesion can be considered as the best form of cohesion a logic B coincidental C temporal D functional?

Cohesion is the measure of functional relatedness of elements within a single module. When dividing a system into modules, it must ensure that the activities within the module are tightly bound to one another.
There are seven types of cohesion:
1. Functional cohesion
2. Sequential cohesion
3. Communicational cohesion
4. Procedural cohesion
5. Temporal cohesion
6. Logical cohesion
7. Coincidental cohesion

Types of cohesion

Functional cohesion:

  1. All activities in the module are functionally related or they are performing a similar function.
  2. The chances of a change request affecting more than one module are low if the modules are based on functionality. Hence, this is the best form of cohesion.

Sequential cohesion:

  1. In this scheme of cohesion, modules are divided into a series of activities such that the output of one module becomes the input to the next module and the chain continues.

Communicational cohesion:

  1. This form of cohesion relates to a situation where all modules share some common data.
  2. This form of cohesion has clearly defined boundaries, inputs, and outputs.

Procedural cohesion:

  1. In this type of cohesion, activities share the same procedural implementation.

Temporal cohesion:

  1. In this type of module division, activities occurring in the same period are grouping together.
  2. The set of functions responsible for initialization, start-up activities such as setting program counters or control flags associated with programs exhibit temporal cohesion.

Logical cohesion:

  1. In logical cohesion, activities belonging to the same category are grouped together.
  2. We can group all reporting activities together or all querying activities together.

Coincidental cohesion:

  1. The Coincidental cohesion exists in modules that contain instructions that have little or no relationship to one another.
  2. Coincidental cohesion is can be avoid as far as possible.

Read more about Coupling

Facebook

Twitter

Pinterest

WhatsApp

Previous articleCoupling – Types of coupling

Next articleNEXT GENERATION QUANTUM COMPUTING

Which of the following types of cohesion can be considered as the best form of cohesion a logic B coincidental C temporal D functional?

Brijesh Yadav

Coincidental cohesion is when parts of a module are grouped arbitrarily; the only relationship between the parts is that they have been grouped together (e.g., a “Utilities” class).

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 the file).

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).

What is the best form of cohesion?

Functional cohesion -- this is the best and the most preferred type of cohesion in which the degree of cohesion is the highest. In this type of cohesion, the elements of a module are functionally grouped into a logical unit and they work together as a logical unit -- this also promotes flexibility and reusability.

Which type of cohesion is the strongest form of cohesion?

Functional CohesionFunctional cohesion is the strongest form of cohesion. All the items in functionally cohesive module are focused on performing a single,well-defined task; no matter how simple or complex the task.

Which are the best two types of cohesion?

Studies by various people including Larry Constantine, Edward Yourdon, and Steve McConnell indicate that the first two types of cohesion are inferior; communicational and sequential cohesion are very good; and functional cohesion is superior.

Which of the following is considered as the strongest level of cohesiveness?

The best level of cohesion is functional cohesion.