public static void main(String[] args) { MyView view = new MyView(); MyModel model = new MyModel(); Presenter presenter = new Presenter(model, view); model.addObserver(presenter); view.addObserver(presenter); view.start(); }
public static void main(String[] args) { MyModel model = new MyModel(); MyView view = new MyView( new BufferedReader(new InputStreamReader(System.in)), new PrintWriter(System.out)); MyController controller = new MyController(model, view); model.setController(controller); view.setController(controller); view.start(); }