title: Where to Process User Input in the Command Pattern
body: <p>I'm currently processing user input in client classes, however I feel that by doing this the command object's execute method I would be increasing the capability for reuse as one would only need to instantiate the command object to use its functionality rather than relying on the implementation from the client. </p>
  
  <p>As a result, a command object may look like this:</p>
  
  <pre><code>public class CommandA implements Command {
      ReceiverA receiverA;
  
      public CommandA(RecieverA receiverA) {
          this.receiverA = receiverA;
      }
  
      @Override
      public void execute() {
          Scanner scanner = new Scanner(System.in);
  
          String x = scanner.nextLine();
  
          receiverA.methodA(x);
  
      }
  }
  </code></pre>
  
  <p>I've found a lack of examples so I was wondering if this was a 'good' practice as in the examples I have seen a command object simply uses a method of a receiver. </p>