A county permits portal must send weekend submissions to an on-call clerk queue instead of the weekday planner queue. Which conditional pattern correctly implements that after-hours routing?
Select an answer to reveal the explanation.
Short Explanation
Weekends are just a calendar fork in the road—check the day, then pick the on-call lane. An if/else on Saturday or Sunday sends permits to clerks; weekdays stay with planners.
Full Explanation
Conditional control flow evaluates a boolean predicate and selects one execution path. For a county permits portal that must send weekend submissions to an on-call clerk queue instead of the weekday planner queue, the predicate should inspect the submission timestamp (or derived calendar day) and branch accordingly. If the day is Saturday or Sunday, route to the on-call clerk queue; otherwise route to the weekday planner queue. That if/else pattern encodes the after-hours business rule directly and keeps weekday and weekend destinations mutually exclusive. Always posting to the planner queue and emailing clerks only when the API returns 500 conflates transport failure handling with calendar-based staffing. Clerks would not receive routine weekend work, and 500 responses are not a proxy for Saturday or Sunday. Randomly choosing a queue for load balancing ignores the staffing model: weekend on-call and weekday planners are role-based destinations, not interchangeable workers in a pool. Random routing breaks accountability and SLAs. Routing every submission to both queues and letting clerks discard duplicates wastes capacity, creates duplicate work items, and still fails to implement exclusive after-hours routing. Exam caveat: define weekend boundaries in the jurisdiction's local time zone, and decide whether Friday evening after-hours or holiday calendars also count as on-call—stem language here keys on Saturday or Sunday, so match that predicate unless policy expands it. Operational check: feed sample submissions with weekday and weekend timestamps, assert each lands in the expected queue, confirm no dual-queue side effects, and review the first live weekend batch against the on-call roster before declaring the change successful.