当前位置:网站首页>Tyut Taiyuan University of technology 2022 introduction to software engineering summary
Tyut Taiyuan University of technology 2022 introduction to software engineering summary
2022-07-06 13:13:00 【Lala Lulu^_^】
Design questions and analysis questions are similar , The test site is also similar , does “1 Complexity 、2 test 、6 chart ”:
Calculate the ring complexity
Black box testing 、 White box testing
Data flow diagram 、 Software structure diagram 、PAD chart 、 Box chart 、 Use case diagram 、 Class diagram
“1 Complexity ”
One 、 Calculate the ring complexity of flow graph
* Definition of flow graph *
Flow chart ( Also called program diagram , Program control flow chart ), yes “ Degraded ” Program flow chart ( The program flow chart is the one learned in high school )
* The problem solving steps *
In the exam , If he gives PDL( Pseudo code ), We need to put the pseudo code first transformation It is the program flow chart ( I believe everyone will ), Then we need to put the program flow chart mapping Flow graph
* Method of mapping flow graph *
The method of mapping program flow diagram to flow diagram is as follows :
(1) Set diamond 、 Replace rectangle with circle ( Circle is node )
(2) Single in single out nodes should be merged into one node
(3) There will be no diamond 、 rectangular , But a line with branches is converted into a node
(4) Connect the nodes according to the program flow chart , Pay attention to distinguish between input and output
* Calculate the ring complexity of flow graph *
3 Methods :
(1) The number of regions in the flow graph is equal to the ring complexity .
(2) Flow chart G Ring complexity of V(G)=E-N+2, among ,E Is the number of edges in a flow graph ,N It's the number of knots .
(3) Flow chart G Ring complexity of V(G)=P+1, among ,P Is the number of decision nodes in the flow graph .Didn't learn , Click here :https://jingyan.baidu.com/article/9faa7231621806073c28cbdd.html
“2 test ”
One 、 Black box testing
* Black box test classification *
Black box tests contain equivalence classes 、 Boundary value analysis 、 A false assumption
When considering boundary value analysis , You just need to write : Input 、 The expected output is enough ( The input data should be divided into exact and boundary values >、<、= Three types of ); Wrong conjectures can only be tested in small questions
* Equivalence partition of black box test *
Method
(1) Write the equivalence class partition table
The table should contain “ Input condition ”、“ Effective equivalence class ”、“ Invalid equivalence class ”
The question of input condition will tell you , Effective equivalence classes should be divided according to the requirements of the topic , Invalid equivalence class can be written directly as the opposite word of effective equivalence class
(2) Design test case table
Table contains “ Test data ”、“ Expected results ”、“ Coverage ”
For valid equivalence classes , A test case can cover multiple valid equivalence classes
For invalid equivalence classes , A test case can only cover an invalid equivalence class , And the test cases cannot be repeated
* Example *
The following is a real problem of last year , The teacher said in class
Two 、 White box testing
Let's just talk about logical coverage in white box test , As for the control structure test, blind guess is not tested
Let's look at the examples in the book
* Statement override ( I passed the exam in previous years )*
requirement : Execute each statement at least once , It means that the test path should go through all diamonds and rectangles
example :A=2,B=0,X=4 The execution path is sacbed
* Determine coverage *
requirement : Not only should the test path go through all diamonds and rectangles , And walk through all branches of all diamonds
example :(1)A=3,B=0,X=3 The execution path is sacbd
(2)A=2,B=1,X=1 The execution path is sabed
* Conditional coverage *
requirement : Not only should the test path go through all diamonds and rectangles , And every condition in the diamond should get all kinds of possible results
namely :a The conditions in the diamond appear A>1,A<=1,B=0,B!=0
b The conditions in the diamond appear A=2,A!=2,X>1,X<=1
example :(1)A=2,B=0,X=4 The execution path is sacbed
(2)A=1,B=1,X=1 The execution path is sabd
* determine / Conditional coverage *
requirement : At the same time, it meets the decision coverage 、 Conditional coverage
example :(1)A=2,B=0,X=4 The execution path is sacbed
(2)A=1,B=1,X=1 The execution path is sabd
* Conditional combination covering ( I passed the exam in previous years )*
requirement : Various possible combinations of conditions in each diamond appear at least once
The above question covers 8 Two combination conditions :
example :(1) Input :A=2,B=0,X=4 Expected output : A little ( Exam to write )
(2) Input :A=2,B=1,X=1 Expected output : A little ( Exam to write )
(3) Input :A=1,B=0,X=2 Expected output : A little ( Exam to write )
(4) Input :A=1,B=1,X=1 Expected output : A little ( Exam to write )
The standard answer in previous years :
“6 chart ”
One 、 Box chart (N-S)
* Every picture must be remembered *
* The problem solving steps *
(1) Draw the program flow chart according to the algorithm ( If the title is not required, you can not draw )
(2) Choose whether to add according to your habits “ Additional flag variables flag”
(3) Draw the box diagram according to the basic symbols and program flow of the box diagram
* Example *
Draw the box graph according to the following algorithm (N-S chart )
max = a[1];
for ( i = 2 ; i <= n ; i++ )
if ( max < a[i] )
max = a[i]
Explain :
stay for In circulation for(a;b;c)
{ The loop body }
Execution order :b It's true , Execution loop body , Re execution c.therefore ,
* More examples *
N-S chart 、PAD chart ( Example )_Jia_plus The blog of -CSDN Blog _pad chart
https://blog.csdn.net/tango_wolf/article/details/116191348?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165491834716781435446377%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=165491834716781435446377&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_click~default-2-116191348-null-null.142%5Ev13%5Epc_search_result_control_group,157%5Ev14%5Enew_3&utm_term=%E7%9B%92%E5%9B%BE%E4%BE%8B%E9%A2%98&spm=1018.2226.3001.4187
Two 、PAD chart
* Operation principle *
(1)PAD chart , It's easy to understand , Everyone recite the following pictures , Just do a few questions to familiarize yourself
(2) Remember PAD Principle of operation : From top to bottom , From left to right , Traverse all nodes
notes : The vertical line on the left is the main line of the program , That is, the first layer structure , Every time you add a level , The graph extends a vertical line to the right
* Must recite symbol *
* Example *
N-S chart 、PAD chart ( Example )_Jia_plus The blog of -CSDN Blog _pad chart
https://blog.csdn.net/tango_wolf/article/details/116191348?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165491834716781435446377%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=165491834716781435446377&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_click~default-2-116191348-null-null.142%5Ev13%5Epc_search_result_control_group,157%5Ev14%5Enew_3&utm_term=%E7%9B%92%E5%9B%BE%E4%BE%8B%E9%A2%98&spm=1018.2226.3001.4187
3、 ... and 、 Data flow diagram (DFD)
* brief introduction *
(1) First, let's briefly understand his concept : Data flow diagram is to depict information flow and data from Input Move to Output The transformation experienced in the process of
(2) There are four elements in the data flow diagram : Source end , Data flow , data storage , Handle
* classification *
Data flow diagram , According to the hierarchy, it is divided into top-level data flow diagram 、 Middle level data flow diagram and bottom level data flow diagram . In addition to the top-level data flow diagram , Other data flow diagrams are numbered from zero .
* Must recite symbol *
* Drawing steps *
(1) Extract information from the topic , Find the source and destination , Data flow , data storage , Handle , And categorize
(2) Draw a top-level data flow diagram
The top-level data flow diagram contains only one process to represent the whole system ; The output data stream and input data stream are the input data and output data of the system , Indicates the scope of the system
(3) Draw the first 0 Layer data flow graph
(4) Draw the first 1 Layer data flow graph
Draw a data flow diagram , Bloggers have no good way , I can only say more practice , Practice makes perfect
Four 、 Software structure diagram
* Drawing principles *
(1) The software structure diagram tests the data flow diagram (DFD) Convert to software structure diagram
(2)DFD It can be divided into transaction flow and transformation flow , Generally speaking , be-all DFD Can be used as transform stream , But when there is an obvious processing center , It can be done as a transaction flow
(3) In the structure diagram , A box represents a module , The name or main function of the module shall be indicated in the box ; The arrows and lines between the boxes represent the calling relationship of the module ; The arrow at the end of the hollow circle indicates that the data is transmitted , The arrow at the end of the solid circle indicates that the control information is transmitted .
(4) We're dividing DFD Use two dashed lines to draw DFD The graph is divided into input streams 、 Change Center 、 Output stream , Where the input stream 、 The boundary division of the output stream is related to the designers' interpretation of them , Therefore, the input and output streams set by different designers may be different
* Drawing steps *
(1) Divide DFD The figure shows the input flow 、 Change Center 、 Output stream
(2) complete “ The first level of decomposition ”( It won't be all right , Here are some examples , As soon as we see it )
(3) complete “ The second level of decomposition ”
* Elementary example *
* Advanced example *
5、 ... and 、 Use case diagram
* Use case diagram elements *
The central idea of use case diagrams is : What should the system do for each user
Drawing a use case diagram needs to include :
1、 System ( Square box )
2、 Actors ( Human symbol )
3、 Use cases ( The ellipse )
Such as :
* Use case relationships *
(1) contain —— Containment relationship means that a use case can simply contain the behavior of other use cases , And take the use case behavior it contains as part of its own behavior . stay UML in , The containment relationship is added by a dashed segment with an arrow <> Words to indicate , The arrow consists of the basic use case (Base) Point to the included use case (Inclusion).
(2) Expand —— under certain conditions , Add new behaviors to existing use cases , The new use cases obtained are called extended use cases (Extension), The original use case is called the basic use case (Base), The relationship from the extended use case to the basic use case is the extended relationship . A basic use case can have one or more extended use cases
(3) generalization —— In the generalization of use cases , The child use case inherits all the structure of the parent use case 、 Behavior and relationships , A child use case is a special form of a parent use case , The generalization relationship of use cases is represented by a triangular arrow from the child use case to the parent use case .
3 The arrows of these relationships point to : Content 、 Multi functional ——> Content 、 Less functional
* Example *
UML new ( The third chapter Use case and use case diagram exercises and reference answers ) - 360 library
https://wenku.so.com/d/44b0092c219da66e386676c286fd7721
This link was not off the shelf when I wrote my blog , But I just looked at it and got off the shelf , There's no way , I didn't save it at that time
None of the examples he gave were boxed , Let's add
6、 ... and 、 Class diagram
* Defining classes *
We directly use a graph to explain the definition of classes in the class diagram
* Relationships between classes *
The book only talks about 5 Kind of relationship : relation 、 Gather 、 Inherit ( generalization )、 rely on 、 elaboration .( The exam only tests relevance 、 Aggregation and generalization )
(1) relation : As long as two classes can be related , Let's say he is related ( Use a straight line to represent )
Such as : Writers use computers
(2) Gather : As long as there is a whole and part relationship between classes , That is, the inclusion relationship , Let's say he has a gathering relationship
( Use diamond arrows to indicate )
1> Shared aggregation : If * stay “ The big side ”, Arrow head , Is shared aggregation ( Represented by a hollow diamond arrow )
2> Combinatorial aggregation : If * stay “ The small side ”, At the end of the arrow , Then it is combined aggregation ( Use a solid diamond arrow to indicate )
(3) Inherit ( generalization ): We've all learned java, Because you should know inheritance , That's not to say ( Use triangle arrows to indicate )
1> General generalization :( Represented by a hollow triangular arrow )
2> Restricted generalization : A little
* Test question type *
We should draw such a picture during the exam :
边栏推荐
- Alibaba cloud microservices (III) sentinel open source flow control fuse degradation component
- 《软件测试》习题答案:第一章
- [algorithm] sword finger offer2 golang interview question 6: sum of two numbers in the sorting array
- Alibaba cloud side: underlying details in concurrent scenarios - pseudo sharing
- GNSS positioning accuracy index calculation
- 4.30动态内存分配笔记
- Error: sorting and subscript out of bounds
- TYUT太原理工大学2022数据库大题之概念模型设计
- [algorithm] sword finger offer2 golang interview question 10: subarray with sum K
- Abstract classes and interfaces
猜你喜欢
Problems and solutions of robust estimation in rtklib single point location spp
[算法] 剑指offer2 golang 面试题6:排序数组中的两个数字之和
121 distributed interview questions and answers
服务未正常关闭导致端口被占用
Redis介绍与使用
[GNSS data processing] Helmert variance component estimation analysis and code implementation
十分鐘徹底掌握緩存擊穿、緩存穿透、緩存雪崩
TYUT太原理工大学2022数据库大题之数据库操作
Alibaba cloud microservices (III) sentinel open source flow control fuse degradation component
[算法] 剑指offer2 golang 面试题10:和为k的子数组
随机推荐
[GNSS] robust estimation (robust estimation) principle and program implementation
【无标题】
Error: symbol not found
编辑距离(多源BFS)
阿里云微服务(一)服务注册中心Nacos以及REST Template和Feign Client
KF UD decomposition pseudo code implementation advanced [2]
继承和多态(下)
[algorithm] sword finger offer2 golang interview question 12: the sum of the left and right sub arrays is equal
System design learning (I) design pastebin com (or Bit.ly)
Record: I accidentally wrote a recursion next time
MySQL 三万字精华总结 + 面试100 问,吊打面试官绰绰有余(收藏系列
Basic DOS commands
[algorithm] sword finger offer2 golang interview question 6: sum of two numbers in the sorting array
[算法] 劍指offer2 golang 面試題2:二進制加法
Novatel board oem617d configuration step record
Abstract classes and interfaces
TYUT太原理工大学2022数据库大题之分解关系模式
[algorithm] sword finger offer2 golang interview question 1: integer division
[算法] 剑指offer2 golang 面试题7:数组中和为0的3个数字
面试必备:聊聊分布式锁的多种实现!