Bird
Raised Fist0

Which of the following is a valid state transition in a typical order tracking state machine?

easy🧠 Conceptual Q2 of Q15
LLD - Design — Food Delivery System
Which of the following is a valid state transition in a typical order tracking state machine?
AFrom 'delivered' to 'shipped'
BFrom 'placed' to 'cancelled'
CFrom 'cancelled' to 'processing'
DFrom 'returned' to 'placed'
Step-by-Step Solution
Solution:
  1. Step 1: Identify typical order states and transitions

    Orders usually move forward: placed -> processing -> shipped -> delivered. Cancellation can happen after placing.
  2. Step 2: Check each option

    From 'placed' to 'cancelled' is valid: an order can be cancelled after being placed. Other options reverse or skip states, which is invalid.
  3. Final Answer:

    From 'placed' to 'cancelled' -> Option B
  4. Quick Check:

    Valid order transition = placed to cancelled [OK]
Quick Trick: Orders move forward or cancel, not backward [OK]
Common Mistakes:
MISTAKES
  • Assuming orders can revert to earlier states
  • Ignoring cancellation as a valid transition
  • Confusing 'returned' with initial states

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes