Multiple choice technology testing

Consider the following: Pick up and read the newspaper Look at what is on television If there is a program that you are interested in watching then switch the the television on and watch the program Otherwise Continue reading the newspaper If there is a crossword in the newspaper then try and complete the crossword

  1. Statement Coverage (SC) = 1 and Decesion Coverage (DC) = 1

  2. SC = 1 and DC = 2

  3. SC = 1 and DC = 3

  4. SC = 2 and DC = 3

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To achieve full statement coverage, we need two test cases: one where you watch television (covering the IF block) and one where you continue reading and complete the crossword (covering the ELSE block and second IF). Achieving full decision coverage requires three test cases to evaluate all True/False outcomes of both decisions.