The conclusion in the previous article is to link the previous big knowledge, but for better understanding, we need to refine the knowledge. Next we will talk about the module structure of the program. The term "module" is widely used and usually corresponds to a program statement that can be called with a name. The module has four attributes: input and output, logical function, running program, and internal data.
The conclusion in the previous article is to link the previous big knowledge, but for better understanding, we need to refine the knowledge. Next we will talk about the module structure of the program. The term "module" is widely used and usually corresponds to a program statement that can be called with a name. The module has four attributes: input and output, logical function, running program, and internal data.
The conclusion in the previous article is to link the previous big knowledge, but for better understanding, we need to refine the knowledge. Next we will talk about the module structure of the program.
The term "module" is widely used and usually corresponds to a program statement that can be called with a name. The module has four attributes: input and output, logical function, running program, and internal data.
We can use the module structure diagram (MSC) to reflect the hierarchical calls and contact modules in the program and perform physical descriptions.
The main components in the module structure diagram are:
Module: rectangular Representation
Call: it is indicated by an arrow (from the call module to the called module. Divided into loop call and conditional call) <喎?http: www.2cto.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + ICAgICAgICAgICA8aW1nIHNyYz0 = "http://www.2cto.com/uploadfile/Collfiles/20141117/20141117092746196.png" alt = "\">
Arc indicates loop call, and diamond indicates conditional call.
Data: Use a small arrow with a circle to represent the data (practical) transmitted from one module to another)
Control Information: Use a small arrow with a black circle to indicate the control information transmitted by one module to another.
The system is divided into easy-to-understand module structures. Then abstract, that is, remove non-essential factors and only consider the essential factors.
When dividing modules, we should pay attention to the relative independence between modules, which produces two standards: coupling between modules and cohesion between modules. We 'd better achieve high cohesion and low coupling.
Coupling: Relationship between modules
Cohesion: the relationship between elements in a module
Coupling types: Data coupling, tag coupling, control coupling, public environment coupling, and content coupling (Principle: Use Data coupling whenever possible, use less control coupling, and limit public coupling, NO content coupling is required .)
The types of cohesion include: Accidental cohesion, logical cohesion, time cohesion, step cohesion, communication cohesion, sequential cohesion, and function cohesion.
The fan-in of a module refers to the number of computer modules that call it.
The number of fan-out modules refers to the number of modules directly under the module.
Depth indicates the level of the module (preferably no more than Layer 7 ).
The width indicates the number of modules in the largest layer.
After learning about the system software we want to implement, we must divide it into modules, clarify the relationship between modules, and have a holistic view so that we can fully consider the problem and hold on to the general direction!
Let's refine some knowledge to better understand ......