You are on page 1of 6
Chegg Find answers in our Expert Q&A Learn / Computer Science / Common Coupling Common Coupling Common Coupling Definition Common coupling or Global coupling is defined as a form of coupling where different modules share some information through the global data Overview of Common Coupling Coupling is a measure of the interdependence between multiple modules in a software development process. It represents how software components are reliant on each other. For well- designed software, there should be low coupling and high cohesion to maintain its reliability and efficiency. Coupling is affected by a variety of connections between modules, complication in the interfaces, flow of information between modules or some external factors. Common coupling is one of the forms of coupling in which two or more modules share some global data such as global data structures. Different modules read from and write their data to a common global field that has some information regarding the operations to be performed is an example of common coupling. Any change performed on global data field leads to back track all the modules that have accessed the information through it. Common coupling may create undesirable error transmission and Chegg Got a ques ind answers in our Expert Q&A What you'll learn: non this topic? < Common Coupling Definition Overview of Common Coupling Common Coupling Common coupling in programming paradigm 4666 Factors affecting global coupling Common Coupling Related Topics Vv ‘Common coupled modules are combined together by global data structures. All the modules have read or write access and data exchange through a global data block. It is necessary to minimize common coupling within software to reduce the complications that occur while making changes in a few modules. Common coupling can be controlled by reducing the use of common global data or providing an abstraction. This can be achieved while designing patterns for different modules and making it convenient for achieving an acceptable design. Chegg modified. Common coupling comes under the category of high-level tight coupling which is not desirable but sometimes necessary within the software design process. Tight coupling or strong coupling means that different modules within a program are strongly dependent on one another. Usually, common coupling offers tight coupling which reduces the module's flexibility and re- usability. Common coupling in programming paradigm In programming language, common coupling take place while declaring global variables within a program. The classes using this global variable get coupled to each other and even a small change in this variable will disturb all classes. One has to look at every module or class to check the state of a variable. Generally common coupling is suitable for constants across the whole program. When the same situation arises, the coupled classes that rely on the constants or any rearrangements performed on the constants will affected the classes. A resolution to this problem can be provided by the use of singleton class which will hold the functions for changing its internal state and the accessors to access the states of other classes. If there is a need to change the declared variables within a singleton class, only this class will be affected; all other classes are left unchanged and they can use same functions. Factors affecting global coupling © Degree: Degree is the amount of connectivity between the modules and other elements like global data in common coupling. It is desirable for the degree amount to be small. There will be very less exchange of data between the modules and data store. © Ease: It defines how simple are the connections within the modules and the shared data store. Just establish simplified communication between the modules and the global data Chegg interchanged with some other device, how easily it can adjust without disturbing the whole system. The system is flexible enough that any change in global data set may not affect the functioning of the modules that accessed the global data store. Control Coupling Pseudocode Module Coupling Module Cohesion ‘Communicational Cohesion Data Coupling Global Data Functional Cohesion COMPANY vy LEGAL & POLICIES Vv CHEGG PRODUCTS AND SERVICES, v CHEGG NETWORK Vv CUSTOMER SERVICE v = Chegg © 2003-2022 Chegg Inc. All rights reserved.

You might also like