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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started