Question: Consider the code of the method getDescription(int a, int b, int c) three parameters: a, b, and c. The method has a. Draw a

Consider the code of the method getDescription(int a, int b, int c) three parameters: a, b, and c. The method has a. Draw a control flow graph for the program and clearly label each node to show its correspondence to a statement. b. Calculate the program's cyclomatic complexity. What does this mean in terms of the number of test cases to cover the code with respect to its branches? c. Develop a set of test cases to achieve full decision coverage. For each test case, you must provide the input values and the expected output in addition to the covered path. Fill the following table: Test Case Identifier Input Values Expected Actual Outputs Outputs Test Case Result (Pass/Fail) Path Covered 1 public static String getDescription(int a, int b, int c){ 2 3 4 boolean c1, c2, c3; String rs = ""; c1 = (1
Step by Step Solution
3.36 Rating (146 Votes )
There are 3 Steps involved in it
a Control Flow Graph 1 c1 2 c2 3 c3 4 c1 5 rs1 6 c2 7 rs2 8 c3 9 rs3 10 c1 c2 c3 11 isATriangle 12 a b b c 13 rs4 14 a b c b a c c a b 15 rs5 16 rs6 1... View full answer
Get step-by-step solutions from verified subject matter experts
