Bird
0
0

Which component in the Command pattern is responsible for executing the request?

easy🧠 Conceptual Q2 of 15
LLD - Behavioral Design Patterns — Part 1
Which component in the Command pattern is responsible for executing the request?
AInvoker
BClient
CReceiver
DCommand
Step-by-Step Solution
Solution:
  1. Step 1: Identify roles in Command pattern

    The Receiver is the object that knows how to perform the actual work when a command is executed.
  2. Step 2: Differentiate other components

    The Invoker calls the command, the Client creates commands, and the Command defines the interface.
  3. Final Answer:

    The Receiver executes the request. -> Option C
  4. Quick Check:

    Executor in Command pattern = Receiver [OK]
Quick Trick: Receiver executes commands, Invoker calls them [OK]
Common Mistakes:
MISTAKES
  • Confusing Invoker with executor
  • Thinking Client executes commands
  • Assuming Command itself executes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes