Question: What is the job of the controller as a component in MVC?

  1. The controller handles data passed to it by the view, and also passes data to the view. It interprets data sent by the view and disperses that data to the approrpiate models awaiting results to pass back to the view.
  2. The controller is a mechanism that allows you to create reusable code in languages such as PHP, where multiple inheritance is not supported.
  3. The controller presents content through the user interface, after communicating directly with the database.
  4. The controller handles specific tasks related to a specific area of functionality, handles business logic related to the results, and communicates directly with the database.

Answer: The correct answer of the above question is Option A:The controller handles data passed to it by the view, and also passes data to the view. It interprets data sent by the view and disperses that data to the approrpiate models awaiting results to pass back to the view.