Solved Exercise on Modified Condition Decision Coverage (MCDC)

By: Prof. Dr. Fazal Rehman Shamil | Last updated: January 31, 2025

Question #1: Solution

Write Test requirements and Test cases required according to MCDC criteria.

Question #2:

Design a set of test cases to achieve 100% MCDC for the following C++ if statement:

Question #3:

Write the minimal test cases required to achieve MCDC for the following C++ code:

Question #4:

Generate test cases to achieve MCDC coverage for the following C++ if statement:

Question #5:

Write the test cases to achieve MCDC for the following C++ condition:

Question #6:

Generate the test cases to achieve MCDC for the following C++ ternary operator:

Question #7:

Design test cases to achieve MCDC for the following C++ decision:

Question #8:

Generate test cases to achieve MCDC for the following C++ code: