Question: Part (a): Create test cases to satisfy statement coverage and branch coverage for the following. Also draw its control flow graph. // Program to

Part (a): Create test cases to satisfy statement coverage and branch coverage for the following. Also draw its control flow graph. // Program to

Part (a): Create test cases to satisfy statement coverage and branch coverage for the following. Also draw its control flow graph. // Program to print positive number entered by the user // If the user enters a negative number, it is skipped #include using namespace std; int main() { int number; cout < > number; // checks if the number is positive if (number> 0) { " cout < < "You entered a positive integer: < < number < < endl; } cout < < "This statement is always executed."; return 0; Part (b): Create Test cases to satisfy condition coverage and multiple condition coverage for the following. Also draw its control flow graph. #include #include using namespace std; int main() { } int a-10, b-8, c=12,d=14; if(! (a==0)) else cout

Step by Step Solution

3.37 Rating (150 Votes )

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 Algorithms Questions!