Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.
Fun, engaging games to boost memory, math fluency, typing speed, and English skillsβperfect for learners of all ages.
Listen to a student-teacher conversation explaining the topic in a relatable way.
Signup and Enroll to the course for listening the Audio Lesson
Today, we are diving into the concept of cohesion. What do you think cohesion means in the context of software design?
I think it's about how closely related the tasks within a module are?
Exactly, cohesion refers to the degree to which elements within a module belong together. The higher the cohesion, the more focused the module is on a specific task. Remember the acronym 'MURD' for maintainability, understandability, reusability, and reduced complexity.
What types of cohesion are there?
Great question! There are several, including functional, sequential, communicational, procedural, temporal, logical, and coincidental cohesion, each with different implications for the design.
Signup and Enroll to the course for listening the Audio Lesson
Now let's focus on communicational cohesion. Can anyone explain what that means?
Itβs when different functions in a module use the same data?
Exactly! Communicational cohesion occurs when the different operations of a module use the same input or output data. For example, if a module manages customer operations that involve functions like getting and updating customer details, all can share the same customer data.
So, it's good for making the code cleaner and easier to maintain?
Precisely! High cohesion reduces complexity and enhances reusability. Think of it as keeping your tasks organized around common goals or data.
Signup and Enroll to the course for listening the Audio Lesson
Why do you think high cohesion is essential for software design?
Because it makes modules easier to understand?
Absolutely! It also promotes reusability and makes modules simpler to test and maintain. Always aim for high cohesion in your designs.
What type of cohesion should we strive for?
Functional, sequential, and communicational cohesion are the best types to look for. This approach keeps your modules robust and manageable.
Signup and Enroll to the course for listening the Audio Lesson
Letβs discuss practical applications. Can someone give an example of a module that exhibits communicational cohesion?
How about a module that handles student records?
Perfect! If the module gets, updates, and deletes student records all referencing the same student data, it demonstrates communicational cohesion beautifully.
Does this mean we can link all functions that share the same data?
Exactly! Just ensure they work cohesively to avoid unnecessary complexity.
Read a summary of the section's main ideas. Choose from Basic, Medium, or Detailed.
This section discusses communicational cohesion as one of the types of cohesion in software modules, emphasizing its importance in maintaining high cohesion, which contributes to a module's effectiveness and maintainability by ensuring all elements operate on the same input or output data.
Communicational cohesion is a type of cohesion characterized by all elements of a module performing different functions that share common input data or produce the same output data. This section extensively covers the significance of communicational cohesion within the context of module design, explaining how modules that exhibit this type of cohesion can effectively centralize data operations, thus enhancing both maintainability and understanding of the system's architecture. The discussion highlights practical examples, such as a module that updates customer records, as an ideal representation of communicational cohesion, demonstrating the advantages of grouping related operations on shared data, which contributes to a higher cohesive design overall. The section reinforces the principles of high cohesion as favorable, given their role in reducing complexity and promoting reusability across software systems.
Dive deep into the subject with an immersive audiobook experience.
Signup and Enroll to the course for listening the Audio Book
Communicational Cohesion (High Cohesion):
Communicational cohesion refers to a scenario where different parts of a module work with the same data. Even though each part has a distinct role or function, they are logically connected because they manipulate or utilize shared data. This type of cohesion helps ensure that the different functionalities are organized around a central concept or data entity.
Imagine a restaurant where the kitchen staff prepares different dishes using the same ingredients. For instance, if tomatoes are used, one chef might make a salad while another makes a salsa. Both dishes are distinct but rely on the shared ingredient β tomatoes. Similarly, in software, various functions may operate on the same set of data, like a CustomerOperations module that retrieves and updates customer data.
Signup and Enroll to the course for listening the Audio Book
The key characteristic of communicational cohesion is the relationship between activities within the module that rely on the same input or output data. This shared focus means that even if different processes are happening, they all contribute to a coherent goal related to that specific data. Modules with communicational cohesion help keep related processes together, which simplifies understanding and debugging.
Think of a team of chefs in a kitchen preparing a meal. Each chef has a different task (like grilling, frying, or garnishing), but they are all working with the same set of ingredients (like chicken, vegetables, and spices). Their work is cohesive because they are all contributing to the same dish, similar to how functions within a module work with common data.
Signup and Enroll to the course for listening the Audio Book
In the given example of a CustomerOperations module, multiple functions (like getting details, updating an address, or deleting a record) are all interacting with the same customer data object. This showcases communicational cohesion as all these functions revolve around shared customer data, emphasizing the importance and utility of that data in multiple contexts.
Think of an online banking system where a user can view their account balance, make transfers, and update their personal information. All these actions (viewing, transferring, updating) are related because they manipulate the same bank account data, similar to a team of mechanics working on a car, each doing different tasks but all focusing on the same vehicle's performance.
Learn essential terms and foundational ideas that form the basis of the topic.
Key Concepts
Cohesion: Refers to the degree to which the elements of a module belong together.
Communicational Cohesion: A form of high cohesion where different functions operate on shared data.
High Cohesion: Desirable as it enhances module maintainability and understandability.
See how the concepts apply in real-world scenarios to understand their practical implications.
A module named 'CustomerOperations()' that contains functions to 'GetCustomerDetails()', 'UpdateCustomerAddress()', and 'DeleteCustomerRecord()', all sharing the 'customer data'.
A module that calculates average temperature and displays a temperature graph, both of which use the same temperature data.
Use mnemonics, acronyms, or visual cues to help remember key information more easily.
When your module's functions unite, sharing data feels just right, communicational cohesion's the key, to design that's harmonious and free.
Imagine a librarian who manages books. Each functionβchecking out, returning, and updatingβis linked by a common library database, illustrating communicational cohesion.
Remember the term 'HERC', which stands for High Energy Resulting Cohesion. The higher the energy, the better the relatedness of functions!
Review key concepts with flashcards.
Review the Definitions for terms.
Term: Cohesion
Definition:
A qualitative measure of how strongly related and focused the responsibilities of a single module are.
Term: Communicational Cohesion
Definition:
A type of cohesion where all elements of the module operate on the same input data or produce the same output data.
Term: High Cohesion
Definition:
A desirable design principle where a module performs a well-defined task or closely related set of responsibilities.
Term: Module
Definition:
A self-contained unit of code that performs a specific function within a software system.