当前位置:网站首页>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 :
边栏推荐
- RTKLIB: demo5 b34f. 1 vs b33
- 系统设计学习(三)Design Amazon‘s sales rank by category feature
- Counter attack of flour dregs: redis series 52 questions, 30000 words + 80 pictures in detail.
- Small exercise of library management system
- 121道分布式面试题和答案
- Rt-ppp test using rtknavi
- TYUT太原理工大学2022软工导论考试题型大纲
- Usage differences between isempty and isblank
- Common method signatures and meanings of Iterable, collection and list
- 阿里云微服务(一)服务注册中心Nacos以及REST Template和Feign Client
猜你喜欢
[algorithm] sword finger offer2 golang interview question 2: binary addition
Wechat applet development experience
Redis介绍与使用
[algorithm] sword finger offer2 golang interview question 10: subarray with sum K
Answer to "software testing" exercise: Chapter 1
3月15号 Go 1.18 正式版发布 了解最新特色以及使用方法
Interview Essentials: talk about the various implementations of distributed locks!
MySQL 30000 word essence summary + 100 interview questions, hanging the interviewer is more than enough (Collection Series
XV Function definition and call
What are the advantages of using SQL in Excel VBA
随机推荐
Record: the solution of MySQL denial of access when CMD starts for the first time
继承和多态(下)
Inheritance and polymorphism (Part 2)
[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等
MYSQL索引钟B-TREE ,B+TREE ,HASH索引之间的区别和应用场景
一文搞定 UDP 和 TCP 高频面试题!
[算法] 剑指offer2 golang 面试题13:二维子矩阵的数字之和
[算法] 剑指offer2 golang 面试题1:整数除法
Music playback (toggle & playerprefs)
Alibaba cloud microservices (I) service registry Nacos, rest template and feign client
【无标题】
闇の連鎖(LCA+树上差分)
TYUT太原理工大学2022数据库大题之E-R图转关系模式
XV Function definition and call
3月15号 Go 1.18 正式版发布 了解最新特色以及使用方法
国企秋招经验总结
阿里云微服务(三)Sentinel开源流控熔断降级组件
WSL common commands
Implementation of Excel import and export functions
The port is occupied because the service is not shut down normally