예제 #1
0
  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();
  }
예제 #2
0
파일: Run.java 프로젝트: guygolanIL/CLI
  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();
  }