Software Engineering ------------- Heuristic Rules

1. What are the inspiration rules for software design?

Answer: First, improve the software structure to increase the independence of the module
, that is, reduce the coupling and improve cohesion through module decomposition or merger.
Two aspects:
1. The module function is improved. A complete module contains: the part that performs the specified function, the part that handles the error, and returns an "end mark"
2. Eliminate duplicate functions and improve the software structure. Complete similarity and partial similarity
II. The module size should be moderate.
Generally speaking, the module independence should not be reduced after decomposition.
Too little greater than the effective operation of the module overhead, the number of modules and make the system too complicated interfaces
three, depth, width, fan-out and fan-in should be suitably
four, should be within the scope of the control module field of
the design of a very In a good system, all modules affected by the decision should belong to the module that made the decision, preferably limited to the module that made the decision itself and its immediate subordinate modules.
5. Strive to reduce the complexity of the module interface The complexity of the
module interface is a major cause of software errors. The module interface should be carefully designed to make information transfer simple and consistent with the function of the module.
6. Designing modules with single entry and single exit
Warn software engineers not to allow content coupling between modules. When entering the module from the top and exiting from the bottom, the software is easier to understand and therefore easier to maintain.
7. The function of the module should be predictable
The function of the module should be predictable, but the function of the module should also be prevented from being excessively limited.

2. What are the differences between the hierarchy chart, HIPO chart and structure chart?

Answer: Hierarchical chart (H chart) is
used to describe the hierarchical structure of software. Very suitable for use in the process of designing software from top to bottom.
HIPO diagram
HIPO diagram is the English abbreviation of "level diagram + input / processing / output diagram" invented by IBM in the United States.
In order to make the HIPO diagram traceable, in the H diagram (level diagram), except for the topmost box, each box is numbered.
Corresponding to each box in H, there should be an IPO picture depicting the processing of the module represented by this box. The number of the module in the H picture is convenient for tracking and understanding the position of this module in the software structure.
Structure Diagram
The structure diagram proposed by Yourdon is another powerful tool for software structure design. Structural diagrams are similar to hierarchical diagrams, and are also graphical tools for describing software structures.
Basic symbols:
squares represent a module;
linear relation between the blocks represent modules invoked;
tail circular hollow arrows represent the transfer of data;
tail closed circles arrows represent transfer of control information.

Hierarchy and structure diagrams do not strictly represent the calling order of modules, and most people are used to drawing modules from left to right in the calling order;
hierarchy and structure diagrams do not indicate when to call lower modules;
hierarchy and structure diagrams only indicate a module Calling those modules does not indicate whether there are other components in the module;
usually a hierarchy chart is used as a document to describe the software structure;
the process of deriving the structure chart from the hierarchy chart can be used as a good method to check the design correctness and evaluate the independence of the module.

3. What symbols are used to draw the data flow graph? What are the steps?

A:
There are four basic graphical symbols in the data flow diagram:
arrows, which indicate data flow;
circles or ellipses, which indicate processing;
parallel bars, which indicate data storage; and
boxes, which indicate the source or end point of the data.

Step 1. Concept The
data flow-oriented design method maps the information flow into a software structure. The type of information flow determines the mapping method.
Step 2: Transformation concept
Transformation analysis is the general term for a series of design steps. After these steps, the data flow graph with the characteristics of the transformation flow is mapped into a software structure according to a predetermined pattern.
Step 3: Transaction analysis
Although transformation analysis can be used to design software structures in any case, when the data flow has obvious transaction characteristics, that is, there is an obvious "launch center" (transaction center), it is still used Transaction analysis method is appropriate.
Step 4. Design optimization
Design optimization should strive to use the minimum number of modules under the premise of effective modularization and the simplest data structure under the premise of meeting information requirements.

Published 27 original articles · praised 3 · visits 1422

Guess you like

Origin blog.csdn.net/weixin_41860600/article/details/105316137