Choose Between Nested Decisions and Combined AND
Scenario
A lab equipment loan desk requires two things: a valid student ID (hasStudentId == true) and zero overdue items (overdueCount == 0). The desk wants to tell students exactly why a request was declined.
Try it yourself
Predict what happens to the error message when hasStudentId is true and overdueCount is 2 under a single combined AND diamond.
| Case | Result |
|---|---|
| hasStudentId = true, overdueCount = 0 | Select a choice above to see what happens. |
| hasStudentId = false, overdueCount = 0 | Select a choice above to see what happens. |
| hasStudentId = true, overdueCount = 2 | Select a choice above to see what happens. |
Reveal the explanation
- hasStudentId = true, overdueCount = 0
Approved
- hasStudentId = false, overdueCount = 0
Combined: Declined | Nested: Declined: Missing student ID
- hasStudentId = true, overdueCount = 2
Combined: Declined | Nested: Declined: Return overdue items first
Use combined AND when a simple Yes/No answer is enough. Use nested decisions when users need actionable feedback telling them which specific requirement failed.
Download shared test cases
Your turn
Design a study-room booking check for two rules: groupSize >= 2 and roomIsFree == true. Choose nested or combined AND so the student knows whether to add a teammate or pick another time.
Common mistake Using a combined AND diamond that only outputs Booking Rejected when distinct instructions are required.
Check your work
A nested two-diamond flowchart where groupSize >= 2 failing outputs Need at least 2 students, and roomIsFree == true failing outputs Room already booked.
Quick check
This browser could not save your progress. Changes last until you leave the page.