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

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

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!