Question: Q 4 . Consider the following program, and judge whether the three integer side lengths can form a triangle. This triangle can be general triangle,

Q4. Consider the following program, and judge whether the three integer side lengths can form a triangle. This triangle can be general triangle, an isosceles triangle or an equilateral triangle, and finally outputs the triangle type. [Note: The sum of the two sides is greater than the third side, and the absolute value of the difference between any two sides is less than the third side. It can form a triangle](6 Marks]
a. Draw the CFG of the program and calculate the full complexity.
b. Write the basic paths covered.
c. Design a set of 4 test cases to meet the basic test path coverage criteria.
Following is the set of input data:
 Q4. Consider the following program, and judge whether the three integer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!