Consider the code fragment provided below:

How many test cases are needed for the code fragment lines 26 - 37 to achieve 100% modified condition/decision coverage?
Suggested Answer: B
Get Premium CTAL-TTA Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
Modified condition/decision coverage (MC/DC) requires each condition in a decision to be shown to independently affect the decision's outcome. For the code fragment provided, we have three independent conditions that need to be evaluated both as true and false. The minimum number of test cases needed to satisfy MC/DC for three conditions is four, which would allow each condition to be shown to independently affect the outcome of the decision.
21 comments · newest first
KA
Kami
10 months ago
8 test cases might be overkill, but better safe than sorry!
OL
Oliva
11 months ago
I counted 6 test cases, not sure where the 4 comes from.
LA
Lavina
11 months ago
Wait, are we sure about that? Seems like it could be more.
WI
Willow
11 months ago
Definitely agree, 4 seems right!
AN
Annelle
11 months ago
I think it’s 4 test cases for full coverage.
PA
Paola
12 months ago
I’m leaning towards 8 test cases, but I need to double-check how many conditions are actually being tested in those lines.
LY
Lyla
12 months ago
I feel like 6 test cases might be too many, but I can't recall the exact logic for modified condition/decision coverage.
CH
Cherry
12 months ago
I remember a similar question where we had to cover all branches, and I think it was around 4 test cases.
LI
Lili
1 year ago
I think we need to consider both conditions and decisions separately, but I'm not sure how many unique paths there are.
YV
Yvette
1 year ago
This seems straightforward. I think I can get 100% modified condition/decision coverage with just 2 test cases. I'll double-check my work, but I'm feeling good about this one.
RU
Rusty
1 year ago
Okay, I've got a strategy. I'll start by identifying the decision points in the code and then work through the different combinations of conditions to ensure I cover all the possible outcomes.
LO
Louann
1 year ago
Hmm, I'm a bit confused by the concept of modified condition/decision coverage. I'll need to review my notes on that before I can confidently approach this question.
JA
Jackie
1 year ago
This looks like a tricky one. I'll need to carefully analyze the code and think through all the possible conditions to determine the minimum number of test cases.
EM
Emile
1 year ago
I'm not sure I fully understand the question. Maybe I should ask the instructor for some clarification before attempting to solve this.
PA
Pamela
1 year ago
Dynamic dashboards can be powerful, but they do require more planning and configuration. I'll make sure to consider the maintenance and user experience factors.
GL
Glory
1 year ago
This question seems straightforward. I think the answer is D - Alarm sensor, since that's a device designed to respond to changes in conditions.
AZ
Azzie
2 years ago
I see, that makes sense. I change my answer to C) 6 test cases then.
GL
Gladis
2 years ago
I also think it's 6 test cases because each condition needs to be met in at least one test case.
DO
Dorethea
2 years ago
Can you explain your rationale for choosing 6 test cases?
AZ
Azzie
2 years ago
I disagree, I believe the answer is C) 6 test cases.
DO
Dorethea
2 years ago
I think the answer is B) 4 test cases.