Question: Use the following function to answer the questions given below. double exponent (double a, int b) { // This function computes ab double result 1.0;

Use the following function to answer the questions given below. double exponent (double a, int b) { // This function computes ab double result 1.0; if (b 0) { result = result * b = b -1; } return result; } 1. Draw the graph path and show the statements associated to the basic blocks. 2. Find the cyclomatic complexity and list all alternative paths that can be used for defect testing. 3. For each path identified in (2), derive test cases and test data that can be used for defect testing. Identify potential defects, if any. Use the following function to answer the questions given below. double exponent (double a, int b) { // This function computes ab double result 1.0; if (b 0) { result = result * b = b -1; } return result; } 1. Draw the graph path and show the statements associated to the basic blocks. 2. Find the cyclomatic complexity and list all alternative paths that can be used for defect testing. 3. For each path identified in (2), derive test cases and test data that can be used for defect testing. Identify potential defects, if any
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
