Controllers and Mocks
1 Controllers and Mocks
 

Controllers and Mocks

CS 3500, Fall 2019

Recall: The MVC Architecture

Controller

Model, View and Controller relative to each other

Ignorance is bliss

An example: PyramidSolitaireController

How to handle user input?

Synchronous Controllers

Asynchronous Controllers

Who is the puppeteer?

public class MainRunner {
   public static void main(String[] args) {
     IModel theModel = makeAModel();
     IView aView = makeAView();
     IController theController = makeController(theModel, aView);
     theController.go();
   }
}

Simple input and output

Mocks