Detailed design (flow chart, box diagram, decision table, decision tree)

1. Detailed design

Fundamental goal:
determine how to implement the required system in detail.

1. Structure program design
Three basic control structures:

  • order
  • select
  • cycle

The program has only one entrance and one exit.

2. Human-machine interface design

What are the four problems that are almost always encountered in human-machine interface design?
1. System response time
2. User help facility
3. Error message processing
4. Command interaction

Human-machine interface design process?

  1. Create a design model
  2. Prototype implementation model
  3. Trial and evaluation
  4. modify

Two, process design tools

1. Program flow chart
Insert picture description here

2. Box diagram
Insert picture description here
Insert picture description here

Insert picture description here
Insert picture description here

3. PAD diagram
Problem analysis diagram

4. Judgment table

A decision table consists of four parts. The upper left part lists all the conditions, the lower left part is all possible actions, the upper right part is a matrix representing various condition combinations, and the lower right part is the action corresponding to each condition combination.

5. Decision tree

The following takes the algorithm of checked baggage charges as an example to illustrate the organization of the judgment table. Suppose that an airline stipulates that passengers can check baggage up to 30kg for free. When the baggage weight exceeds 30kg, the domestic passenger in the first-class cabin will be charged RMB 4 per kilo for the overweight part, and the domestic passenger in other cabins will be charged RMB 6 per kilogram for the overweight part. The foreign passenger will be charged twice as much per kilogram as the domestic passenger. The charge per kilogram for the overweight part of passengers with disabilities is half that of normal passengers. The decision table can clearly indicate the algorithm for calculating the baggage fee corresponding to each combination of the above conditions.

Insert picture description here
Insert picture description here

The recruitment examination assesses three courses of mathematics, English, and computer. The admission rules are:
(1) Admission with a total score of 240 points or more (inclusive);
(2) Those with a total score of 240 points or less (not included) and 180 points or more (inclusive) , If both math and English scores are above 60 points (inclusive), you need to participate in an interview; if there is 1 subject in mathematics or English with scores below 60 points (not included), you need to retake the course before deciding whether to admit;
(3 ) No admission under other circumstances. Draw the decision table and decision tree for this process.
Insert picture description here
Insert picture description here

6. Process design language
PDL

Three, data structure-oriented design method

Jackson

4. Quantitative measurement of program complexity

1. The McCabe method

  • Flow graph
  • Calculate the loop complexity of the flow graph: the number of regions (the number of closed regions and other unclosed regions)

2, Halstead method

Five, summary

Human-machine interface design
Program flowchart
Box diagram
Decision table
Decision tree

Guess you like

Origin blog.csdn.net/weixin_44366125/article/details/105900659