Joke Collection Website - Mood Talk - Feature coupling in software engineering. How to give an example.

Feature coupling in software engineering. How to give an example.

Example: Module A needs to call the ID number to give all the identity information data structure of the whole person (including ID number, name, age, address, phone number, etc.). Module A only needs to call ID number. The data actually used by module A is larger than the data actually needed, and feature coupling occurs.

Feature coupling refers to the coupling between two modules that are both related to the same data structure. Since the same data structure is used at the same time, when the data structure changes, it will inevitably affect these two modules, thus increasing the dependence between modules and reducing module independence.

Extended information

When changes in one subsystem (or class) have little impact on another subsystem (or class), they are said to be loosely coupled; vice versa; , if the impact of the change is large, they are said to be tightly coupled.

The strength of coupling depends on the complexity of the interface between modules, the location of the referenced module and the method of data transmission. When designing, you should try to keep the coupling between modules as small as possible. The coupling between modules directly affects the understandability, testability, reliability and maintainability of the system.

The strength of coupling depends on whether the division of modules is reasonable and the complexity of the interfaces between modules. Therefore, when dividing modules, you should try your best to do the following:

1. Eliminate unnecessary connections between modules.

2. Reduce the number of essential connections between modules.

3. The closeness of the connections between loose modules.