![]() Functional Cohesion: Functional Cohesion is said to exist if the different elements of a module, cooperate to achieve a single function.For example, in highly cohesive systems, functionality is strongly related.Ĭohesion is an ordinal type of measurement and is generally described as "high cohesion" or "low cohesion." Types of Modules Cohesion Thus, cohesion measures the strength of relationships between pieces of functionality within a given module. In computer programming, cohesion defines to the degree to which the elements of a module belong together. ![]() Content Coupling: Content Coupling exists among two modules if they share code, e.g., a branch from one module into another module. Common Coupling: Two modules are common coupled if they share information through some global data items.ħ. This is related to communication to external tools and devices.Ħ. External Coupling: External Coupling arises when two modules share an externally imposed data format, communication protocols, or device interface. Control Coupling: Control Coupling exists among two modules if data from one module is used to direct the structure of instruction execution in another.ĥ. For example, passing structure variable in C or object in C++ language to a module.Ĥ. When the module passes non-global data structure or entire structure to another module, they are said to be stamp coupled. Stamp Coupling: Two modules are stamp coupled if they communicate using composite data items such as structure, objects, etc. Data Coupling: When data of one module is passed to another module, this is called data coupling.ģ. ![]() In this case, modules are subordinates to different modules. No Direct Coupling: There is no direct coupling between M1 and M2. Thus, it can be said that a design with high coupling will have more errors. That is, the coupling increases as the number of calls between modules increase or the amount of shared data is large. ![]() Coupling is measured by the number of relations between the modules. The various types of coupling techniques are shown in fig:Ī good design is the one that has low coupling. Uncoupled modules have no interdependence at all within them. ![]() However, two modules that are loosely coupled are not dependent on each other. Two modules that are tightly coupled are strongly dependent on each other. In software engineering, the coupling is the degree of interdependence between software modules. Next → ← prev Coupling and Cohesion Module Coupling ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |