Question: Describe what the code seems to be doing Draw the reduced CFG (DD-path graph) - use the line numbers provided Determine the Cyclomatic complexity Develop

Describe what the code seems to be doing

Draw the reduced CFG (DD-path graph) - use the line numbers provided

Determine the Cyclomatic complexity

Develop the basis paths using the Cyclomatic complexity. Use all True paths as the initial basis path to make it easier to grade.

Develop the test cases using required input values to achieve boundary value coverage. Use a test case table to develop the test case number, inputs, expected outputs.

Determine the code coverage achieved (decision, statement, condition, etc.)

Do the test cases and outputs refute or support the code functional description?

2) Use basis path testing to test the following. Use the value of 5 for x and the variable y as your return value in your test cases. Use the following template for the test case table.

1 public int returnInput(int x, boolean one, boolean two)

2 {

3 int y = x;

4

5 if (one)

6 y = x-1;

7

8 if (two)

9 y = x+1;

10

11 return y;

12 }

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!