Given the following code, which is true about the minimum number of test cases required for full statement and branch coverage:

Read P Read Q IF P+Q > 100 THEN Print “Large” E NDIF If P > 50 THEN Print “P Large” E NDIF

  • A. 1 test for statement coverage, 3 for branch coverage
  • B. 1 test for statement coverage, 2 for branch coverage
  • C. 1 test for statement coverage, 1 for branch coverage
  • D. 2 tests for statement coverage, 3 for branch coverage
  • E. 2 tests for statement coverage, 2 for branch coverage

Answer: Option B