title: Passing Scanner object as a constructor parameter to the UserInterface class
body: <p>While I was watching a youtube video on how to seperate UserInterface from the program logic, the guy on the video passed the scanner class object as a parameter to the UserInterface class's constructor from the main method. Like this:</p>
  <pre><code>public class UserInterface {
  TodoList list;
  Scanner input;
  
  UserInterface(TodoList list,Scanner input){
      this.list=list;
      
      this.input=input;
      
  }
  }
  </code></pre>
  <p>My question is that why didn't he create a Scanner class object in the UserInterface class instead of passing the Scanner object as a parameter from Main class.</p>