LLD - Behavioral Design Patterns — Part 1Which component in the Command pattern is responsible for executing the request?AInvokerBClientCReceiverDCommandCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify roles in Command patternThe Receiver is the object that knows how to perform the actual work when a command is executed.Step 2: Differentiate other componentsThe Invoker calls the command, the Client creates commands, and the Command defines the interface.Final Answer:The Receiver executes the request. -> Option CQuick Check:Executor in Command pattern = Receiver [OK]Quick Trick: Receiver executes commands, Invoker calls them [OK]Common Mistakes:MISTAKESConfusing Invoker with executorThinking Client executes commandsAssuming Command itself executes
Master "Behavioral Design Patterns — Part 1" in LLD9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More LLD Quizzes Behavioral Design Patterns — Part 1 - Template Method pattern - Quiz 5medium Behavioral Design Patterns — Part 1 - Strategy pattern - Quiz 7medium Behavioral Design Patterns — Part 2 - Memento pattern - Quiz 3easy Behavioral Design Patterns — Part 2 - Why more behavioral patterns solve communication - Quiz 15hard Design — Elevator System - Multiple elevator coordination - Quiz 1easy Design — Library Management System - Search functionality design - Quiz 15hard Design — Library Management System - Reservation and hold system - Quiz 5medium Design — Parking Lot System - Requirements analysis - Quiz 14medium Design — Parking Lot System - Payment handling - Quiz 8hard Design — Tic-Tac-Toe Game - Board, Player, Game classes - Quiz 4medium