Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can u help me with this q4 A+b+c Q4. Consider the following program, and judge whether the three integer side lengths can form a triangle.
can u help me with this q4 A+b+c 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] 1. a=1,b=2,c=5 2. a=4,b=5,c=3 3, a=3,b=3,c=4 4. a=3,b=3,c=3 int maino : Scanner input-new Scanner(System.in); int a,b,c; System.out.printin("Please enter the length of the three sides of the triangle (CM): "); a-input.nextInt 0 : b=input.nextInt 0 ; c=input.nextInt 0 ; if (a+b=cabs(ac)>=babs(bc)>=a) System.out.println("The three sides cannot form a triangle"); \} else : if (a=ba=cb=c){ if (a=b&&b=c) \} System.out.printin("Equilateral triangle"); \} clse : System.out.printin("Isosceles triangle"); | \} else \{ System.out.println("common triangle"); } \} return 0; 1 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
can u help me with this q4 A+b+c
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started