// Main links together the model, view, and controller in a triangle class Main { public static void main(String argv[]) { View v = new View(); Model m = new Model(); Controller c = new Controller(m,v); // the controller is a listener for the view v.register(c); // the view is a listener for the model m.addListener(v); } }